@PublicApi
public interface JiraLicenseService
Modifier and Type | Interface and Description |
---|---|
static interface |
JiraLicenseService.ValidationResult
Holds the validated license and potential errors
|
Modifier and Type | Method and Description |
---|---|
Optional<LicenseDetails> |
getLicenseDetails(String licenseString,
I18nHelper i18nHelper) |
Iterable<LicenseDetails> |
getLicenses()
Retrieve a list of all products licenses installed in this instance.
|
String |
getServerId()
Returns the server ID of this JIRA instance, creating it if necessary.
|
SortedSet<String> |
getSupportEntitlementNumbers()
Retrieves the SEN (Support Entitlement Number) of all installed licenses and orders them in a consistent manner.
|
boolean |
isDataCenterLicensed()
Returns whether or not Jira is licensed for DataCenter.
|
boolean |
isLicenseSet()
Returns true if at least one license has been
set . |
JiraLicenseService.ValidationResult |
validate(com.atlassian.application.api.ApplicationKey applicationKey,
String licenseString,
I18nHelper i18nHelper)
Validates a JIRA application license string in preparation for setting that string as the license for the
specified application.
|
Iterable<JiraLicenseService.ValidationResult> |
validate(I18nHelper i18n)
Checks that all
existing licenses are valid . |
Iterable<JiraLicenseService.ValidationResult> |
validate(I18nHelper i18n,
Iterable<String> licenses)
Validates each license String provided in preparation for setting them.
|
JiraLicenseService.ValidationResult |
validate(I18nHelper i18nHelper,
String licenseString)
Performs minimum validation on the license.
|
JiraLicenseService.ValidationResult |
validateApplicationLicense(I18nHelper i18nHelper,
String licenseString)
|
Collection<LicenseValidationInformation> |
validateMultiLicenses(Collection<LicenseValidationInformation> licenseValidationInformations,
I18nHelper i18nHelper)
Validates a JIRA application multiple license string in preparation for setting that string as the license for the
specified application.
|
@Nonnull String getServerId()
@ExperimentalApi @Nonnull Iterable<LicenseDetails> getLicenses()
In JIRA 6.3 this method returns an iterable containing at most one license. In later versions it may contain more.
Optional<LicenseDetails> getLicenseDetails(@Nullable String licenseString, @Nonnull I18nHelper i18nHelper)
licenseString
- the license to validatei18nHelper
- the helper for i18nJiraLicenseService.ValidationResult validate(I18nHelper i18nHelper, String licenseString)
i18nHelper
- the helper for i18nlicenseString
- the license to validateJiraLicenseService#validate(com.atlassian.application.api.ApplicationKey, String, com.atlassian.jira.util.I18nHelper)}.
JiraLicenseService.ValidationResult validate(@Nonnull com.atlassian.application.api.ApplicationKey applicationKey, @Nonnull String licenseString, @Nonnull I18nHelper i18nHelper)
applicationKey
- the application key this license is forlicenseString
- the license to validatei18nHelper
- the helper for i18nCollection<LicenseValidationInformation> validateMultiLicenses(@Nonnull Collection<LicenseValidationInformation> licenseValidationInformations, @Nonnull I18nHelper i18nHelper)
licenseValidationInformations
- the license validation information of the licenses that will get validatedi18nHelper
- the helper for i18nJiraLicenseService.ValidationResult validateApplicationLicense(@Nonnull I18nHelper i18nHelper, @Nonnull String licenseString)
validate(com.atlassian.application.api.ApplicationKey, java.lang.String, com.atlassian.jira.util.I18nHelper)
It is recommended that validate(com.atlassian.application.api.ApplicationKey, java.lang.String, com.atlassian.jira.util.I18nHelper)
is used instead of this method.
i18nHelper
- i18n helper used for messaging.licenseString
- the license to validateIterable<JiraLicenseService.ValidationResult> validate(I18nHelper i18n, Iterable<String> licenses)
i18n
- the helper for i18n - used to populate the error messageslicenses
- the licenses to validate@Nonnull Iterable<JiraLicenseService.ValidationResult> validate(I18nHelper i18n)
existing licenses
are valid
.boolean isLicenseSet()
set
.JiraLicenseManager.isLicenseSet()
@ExperimentalApi boolean isDataCenterLicensed()
SortedSet<String> getSupportEntitlementNumbers()
SortedSet
of the SEN. The ordere of SENs in the set will be maintained as far as the
consistency of the licenses installed doesn't change.LicenseDetails.getSupportEntitlementNumber()
Copyright © 2002-2024 Atlassian. All Rights Reserved.