Package com.atlassian.jira.license
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 Summary
Modifier and TypeMethodDescriptionOptional<com.atlassian.application.api.ApplicationKey>
com.atlassian.sal.api.validate.LicenseValidationResult
boolean
boolean
boolean
boolean
boolean
with
(com.atlassian.sal.api.validate.LicenseValidationResult licenseValidationResult) withWarning
(com.atlassian.sal.api.validate.LicenseWarningCode licenseWarningCode, String warningMessage) withWarnings
(Set<com.atlassian.sal.api.validate.LicenseValidationWarning> warnings)
-
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 togetApplicationKey()
, false otherwise.
-
needMoreValidation
boolean needMoreValidation()- Returns:
- true if the
getLicenseValidationResult()
is valid, false when thegetLicenseDetail()
has failed at least one validation orisDeleteLicense()
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 codeerrorMessage
- 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 codewarningMessage
- 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
-