public class LicenseValidationInfo extends Object implements LicenseValidationInformation
ApplicationKey
of the currently installed license.| Constructor and Description |
|---|
LicenseValidationInfo(com.atlassian.sal.api.license.RawProductLicense rawProductLicense,
Optional<LicenseDetails> licenseDetail) |
LicenseValidationInfo(com.atlassian.sal.api.license.RawProductLicense rawProductLicense,
Optional<LicenseDetails> licenseDetail,
com.atlassian.sal.api.validate.LicenseValidationResult licenseValidationResult) |
| Modifier and Type | Method and Description |
|---|---|
Optional<com.atlassian.application.api.ApplicationKey> |
getApplicationKey() |
Optional<LicenseDetails> |
getLicenseDetail() |
com.atlassian.sal.api.validate.LicenseValidationResult |
getLicenseValidationResult() |
boolean |
isDeleteLicense() |
boolean |
isLicenseDetailsValid() |
boolean |
isLicensePairWithCorrectProductKey() |
boolean |
isProductKeyValid() |
boolean |
needMoreValidation() |
LicenseValidationInfo |
with(com.atlassian.sal.api.validate.LicenseValidationResult licenseValidationResult) |
LicenseValidationInfo |
withError(com.atlassian.sal.api.validate.LicenseErrorCode licenseErrorCode,
String errorMessage) |
LicenseValidationInfo |
withWarning(com.atlassian.sal.api.validate.LicenseWarningCode licenseWarningCode,
String warningMessage) |
LicenseValidationInfo |
withWarnings(Set<com.atlassian.sal.api.validate.LicenseValidationWarning> warnings) |
public LicenseValidationInfo(@Nonnull com.atlassian.sal.api.license.RawProductLicense rawProductLicense, @Nonnull Optional<LicenseDetails> licenseDetail)
rawProductLicense - the productKey and license string that plan to be validated.licenseDetail - the license detail of the RawProductLicense.getLicense()public LicenseValidationInfo(@Nonnull com.atlassian.sal.api.license.RawProductLicense rawProductLicense, @Nonnull Optional<LicenseDetails> licenseDetail, @Nonnull com.atlassian.sal.api.validate.LicenseValidationResult licenseValidationResult)
rawProductLicense - the productKey and license string that plan to be validated.licenseDetail - the license detail of the RawProductLicense.getLicense()licenseValidationResult - the licenseDetail's validation resultpublic Optional<LicenseDetails> getLicenseDetail()
getLicenseDetail in interface LicenseValidationInformationOptional of the license detail.public com.atlassian.sal.api.validate.LicenseValidationResult getLicenseValidationResult()
getLicenseValidationResult in interface LicenseValidationInformationpublic boolean isDeleteLicense()
isDeleteLicense in interface LicenseValidationInformationLicenseValidationInformation.getLicenseDetail() out from the product, false otherwise.public Optional<com.atlassian.application.api.ApplicationKey> getApplicationKey()
getApplicationKey in interface LicenseValidationInformationpublic boolean isProductKeyValid()
isProductKeyValid in interface LicenseValidationInformationLicenseValidationInformation.getApplicationKey() is valid, false otherwise.public boolean isLicenseDetailsValid()
isLicenseDetailsValid in interface LicenseValidationInformationLicenseValidationInformation.getLicenseDetail() is valid, false otherwise.public boolean isLicensePairWithCorrectProductKey()
isLicensePairWithCorrectProductKey in interface LicenseValidationInformationLicenseValidationInformation.getLicenseDetail() can apply to LicenseValidationInformation.getApplicationKey(), false otherwise.public boolean needMoreValidation()
needMoreValidation in interface LicenseValidationInformationLicenseValidationInformation.getLicenseValidationResult() is valid,
false when the LicenseValidationInformation.getLicenseDetail() has failed at least one validation
or LicenseValidationInformation.isDeleteLicense() is true.public LicenseValidationInfo with(@Nonnull com.atlassian.sal.api.validate.LicenseValidationResult licenseValidationResult)
with in interface LicenseValidationInformationLicenseValidationResult.public LicenseValidationInfo withError(@Nonnull com.atlassian.sal.api.validate.LicenseErrorCode licenseErrorCode, @Nonnull String errorMessage)
withError in interface LicenseValidationInformationlicenseErrorCode - the validation error codeerrorMessage - the error messagepublic LicenseValidationInfo withWarning(@Nonnull com.atlassian.sal.api.validate.LicenseWarningCode licenseWarningCode, @Nonnull String warningMessage)
withWarning in interface LicenseValidationInformationlicenseWarningCode - the validation warning codewarningMessage - the warning messagepublic LicenseValidationInfo withWarnings(@Nonnull Set<com.atlassian.sal.api.validate.LicenseValidationWarning> warnings)
withWarnings in interface LicenseValidationInformationwarnings - the list of warning validation resultsCopyright © 2002-2021 Atlassian. All Rights Reserved.