@ParametersAreNonnullByDefault public class DefaultLicenseService extends Object implements LicenseServiceInternal
LicenseManager. Delegates the validation to
LicenseValidator and all storage operations to LicenseStore.| Constructor and Description |
|---|
DefaultLicenseService(LicenseStoreInternal store,
com.atlassian.extras.api.LicenseManager decoder,
LicenseValidator validator) |
| Modifier and Type | Method and Description |
|---|---|
com.atlassian.extras.api.confluence.ConfluenceLicense |
assertConfluenceLicense(com.atlassian.extras.api.AtlassianLicense license) |
com.atlassian.extras.api.ProductLicense |
assertProductLicense(com.atlassian.extras.api.AtlassianLicense license,
com.atlassian.extras.api.Product product) |
com.atlassian.extras.api.AtlassianLicense |
decode(String licenseString) |
@NonNull com.atlassian.extras.api.confluence.ConfluenceLicense |
install(String licenseString)
Validates and installs a given encrypted license.
|
boolean |
isLicensed()
Returns whether there is a currently installed license.
|
boolean |
isLicensedForDataCenter()
Returns whether currently installed license is for Data Center.
|
boolean |
isLicensedForDataCenterOrExempt()
Returns whether the currently installed license is for Data Center, or if the license should be
treated as exempt from Data Center checks for testing purposes.
|
@NonNull com.atlassian.extras.api.confluence.ConfluenceLicense |
retrieve()
Retrieves the currently installed Confluence license.
|
@NonNull com.atlassian.fugue.Maybe<com.atlassian.extras.api.ProductLicense> |
retrieve(com.atlassian.extras.api.Product product)
Deprecated.
since 7.0.1. Use
LicenseService.retrieveForProduct(Product) |
@NonNull com.atlassian.extras.api.AtlassianLicense |
retrieveAtlassianLicense()
Retrieves the currently installed Atlassian license.
|
String |
sanitise(String licenseString) |
@NonNull com.atlassian.extras.api.confluence.ConfluenceLicense |
validate(String licenseString)
Validates the given encrypted license.
|
@NonNull com.atlassian.extras.api.ProductLicense |
validate(String licenseString,
com.atlassian.extras.api.Product product)
Validates the given encrypted license.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitretrieveForProductpublic DefaultLicenseService(LicenseStoreInternal store, com.atlassian.extras.api.LicenseManager decoder, LicenseValidator validator)
public @NonNull com.atlassian.extras.api.confluence.ConfluenceLicense retrieve()
LicenseService
This is a convenience method for LicenseService.retrieveForProduct(Product) with Product.CONFLUENCE.
retrieve in interface LicenseServicepublic @NonNull com.atlassian.extras.api.AtlassianLicense retrieveAtlassianLicense()
throws LicenseException
LicenseServiceretrieveAtlassianLicense in interface LicenseServiceLicenseException - if no license is installed or the license could not be de-crypted@Deprecated public @NonNull com.atlassian.fugue.Maybe<com.atlassian.extras.api.ProductLicense> retrieve(com.atlassian.extras.api.Product product) throws LicenseException
LicenseService.retrieveForProduct(Product)LicenseServiceretrieve in interface LicenseServiceproduct - the product for which the license is requestedLicenseException - if no license is installed or the license could not be de-cryptedpublic @NonNull com.atlassian.extras.api.confluence.ConfluenceLicense install(String licenseString)
LicenseServiceinstall in interface LicenseServicelicenseString - the encrypted licensepublic boolean isLicensed()
throws LicenseException
LicenseServiceInternalLicenseService.retrieveAtlassianLicense() is non-null.isLicensed in interface LicenseServiceInternalLicenseException - if no license is installed or the license could not be de-cryptedpublic boolean isLicensedForDataCenter()
LicenseServiceProductLicense.isClusteringEnabled() with LicenseService.retrieve().isLicensedForDataCenter in interface LicenseServicepublic boolean isLicensedForDataCenterOrExempt()
LicenseServiceisLicensedForDataCenterOrExempt in interface LicenseServicepublic @NonNull com.atlassian.extras.api.confluence.ConfluenceLicense validate(String licenseString)
LicenseServicevalidate in interface LicenseServiceLicenseService.install(String)public @NonNull com.atlassian.extras.api.ProductLicense validate(String licenseString, com.atlassian.extras.api.Product product) throws LicenseException
LicenseServicevalidate in interface LicenseServiceLicenseExceptionLicenseService.validate(String, com.atlassian.extras.api.Product)public com.atlassian.extras.api.AtlassianLicense decode(String licenseString)
public com.atlassian.extras.api.confluence.ConfluenceLicense assertConfluenceLicense(com.atlassian.extras.api.AtlassianLicense license)
public com.atlassian.extras.api.ProductLicense assertProductLicense(com.atlassian.extras.api.AtlassianLicense license,
com.atlassian.extras.api.Product product)
Copyright © 2003–2020 Atlassian. All rights reserved.