Interface JiraLicenseService

All Known Subinterfaces:
JiraLicenseUpdaterService
All Known Implementing Classes:
JiraLicenseServiceImpl

@PublicApi public interface JiraLicenseService
A service for get license information. (readonly)
Since:
v4.0
  • Method Details

    • getServerId

      @Nonnull String getServerId()
      Returns the server ID of this JIRA instance, creating it if necessary.
      Returns:
      see above
    • getLicenses

      @ExperimentalApi @Nonnull Iterable<LicenseDetails> getLicenses()
      Retrieve a list of all products licenses installed in this instance.

      In JIRA 6.3 this method returns an iterable containing at most one license. In later versions it may contain more.

      Returns:
      all product licenses installed in this instance.
      Since:
      6.3
    • getLicenseDetails

      Optional<LicenseDetails> getLicenseDetails(@Nullable String licenseString, @Nonnull I18nHelper i18nHelper)
      Parameters:
      licenseString - the license to validate
      i18nHelper - the helper for i18n
      Returns:
    • validate

      JiraLicenseService.ValidationResult validate(I18nHelper i18nHelper, String licenseString)
      Performs minimum validation on the license. But won't check if the license gives you access to applications. Populates the ValidationResult with errors while validating.
      Parameters:
      i18nHelper - the helper for i18n
      licenseString - the license to validate
      Returns:
      a validation result with the validated license and potential errors.
    • validate

      JiraLicenseService.ValidationResult validate(@Nonnull com.atlassian.application.api.ApplicationKey applicationKey, @Nonnull String licenseString, @Nonnull I18nHelper i18nHelper)
      Validates a JIRA application license string in preparation for setting that string as the license for the specified application. This validation does not include checking if the license provides access to the given application, and populates the returned ValidationResult with any errors.
      Parameters:
      applicationKey - the application key this license is for
      licenseString - the license to validate
      i18nHelper - the helper for i18n
      Returns:
      a validation result with the validated license and potential errors.
      Since:
      v7.0
    • validateMultiLicenses

      Collection<LicenseValidationInformation> validateMultiLicenses(@Nonnull Collection<LicenseValidationInformation> licenseValidationInformations, @Nonnull I18nHelper i18nHelper)
      Validates a JIRA application multiple license string in preparation for setting that string as the license for the specified application. This validation does not include checking if the licenses provides access to the given applications, and populates the returned LicenseValidationInformation with any errors
      Parameters:
      licenseValidationInformations - the license validation information of the licenses that will get validated
      i18nHelper - the helper for i18n
      Returns:
      Since:
      v8.9
    • validateApplicationLicense

      JiraLicenseService.ValidationResult validateApplicationLicense(@Nonnull I18nHelper i18nHelper, @Nonnull String licenseString)
      Validates the passed license string against all installed JIRA applications in preparation for setting a new JIRA application license. That is, will the new license cause loss of access to any of the applications under the conditions of the current license. The returned ValidationResult will contain any errors found in the process.

      It is recommended that validate(com.atlassian.application.api.ApplicationKey, java.lang.String, com.atlassian.jira.util.I18nHelper) is used instead of this method.

      Parameters:
      i18nHelper - i18n helper used for messaging.
      licenseString - the license to validate
      Returns:
      a validation result with the validated license and potential errors.
      Since:
      v7.0
    • validate

      Validates each license String provided in preparation for setting them. Populates the resulting ValidationResults with errors while validating.
      Parameters:
      i18n - the helper for i18n - used to populate the error messages
      licenses - the licenses to validate
      Returns:
      all the validation results for the validated licenses including errors
    • validate

      Checks that all existing licenses are valid.
      Returns:
      an ErrorCollection containing 0-many license validation error messages.
      Since:
      7.0
    • isLicenseSet

      boolean isLicenseSet()
      Returns true if at least one license has been set.
      Since:
      7.0
      See Also:
    • isDataCenterLicensed

      @ExperimentalApi boolean isDataCenterLicensed()
      Returns whether or not Jira is licensed for DataCenter.
      Returns:
      whether or not Jira is licensed for DataCenter.
      Since:
      8.16
    • getSupportEntitlementNumbers

      SortedSet<String> getSupportEntitlementNumbers()
      Retrieves the SEN (Support Entitlement Number) of all installed licenses and orders them in a consistent manner. The order is guaranteed for a given set of licenses. It may change when licenses are added or removed. Clients that used to use a single SEN can easily retrieve the first item. That will suffice in most cases, though ensure to consider the consequences of when the licenses changes.
      Returns:
      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.
      Since:
      7.0
      See Also: