Interface LicenseValidationInformation

All Known Implementing Classes:
LicenseValidationInfo

public interface LicenseValidationInformation
A set of methods which describe the validation information of a specific license details of a specific ApplicationKey of the currently installed license.
Since:
v8.9
  • Method Details

    • getLicenseDetail

      Optional<LicenseDetails> getLicenseDetail()
      Returns:
      the Optional of the license detail.
    • getApplicationKey

      Optional<com.atlassian.application.api.ApplicationKey> getApplicationKey()
      Returns:
      the valid application key that the license is applied to
    • getLicenseValidationResult

      com.atlassian.sal.api.validate.LicenseValidationResult getLicenseValidationResult()
      Returns:
      the license validation result
    • isDeleteLicense

      boolean isDeleteLicense()
      Returns:
      true if plan to removed getLicenseDetail() out from the product, false otherwise.
    • isProductKeyValid

      boolean isProductKeyValid()
      Returns:
      true if the value of getApplicationKey() is valid, false otherwise.
    • isLicenseDetailsValid

      boolean isLicenseDetailsValid()
      Returns:
      true if the getLicenseDetail() is valid, false otherwise.
    • isLicensePairWithCorrectProductKey

      boolean isLicensePairWithCorrectProductKey()
      Returns:
      true if getLicenseDetail() can apply to getApplicationKey(), false otherwise.
    • needMoreValidation

      boolean needMoreValidation()
      Returns:
      true if the getLicenseValidationResult() is valid, false when the getLicenseDetail() has failed at least one validation or isDeleteLicense() is true.
    • with

      LicenseValidationInformation with(@Nonnull com.atlassian.sal.api.validate.LicenseValidationResult licenseValidationResult)
      Returns:
      a defensive copy of this LicenseValidationInformation with a giving LicenseValidationResult.
    • withError

      LicenseValidationInformation withError(@Nonnull com.atlassian.sal.api.validate.LicenseErrorCode licenseErrorCode, @Nonnull String errorMessage)
      Parameters:
      licenseErrorCode - the validation error code
      errorMessage - the error message
      Returns:
      a defensive copy of this LicenseValidationInformation with error validation result
    • withWarning

      LicenseValidationInformation withWarning(@Nonnull com.atlassian.sal.api.validate.LicenseWarningCode licenseWarningCode, @Nonnull String warningMessage)
      Parameters:
      licenseWarningCode - the validation warning code
      warningMessage - the warning message
      Returns:
      a defensive copy of this LicenseValidationInformatio with warning validation result
    • withWarnings

      LicenseValidationInformation withWarnings(@Nonnull Set<com.atlassian.sal.api.validate.LicenseValidationWarning> warnings)
      Parameters:
      warnings - the list of warning validation results
      Returns:
      a defensive copy of this LicenseValidationInformatio with warning validation result