Package com.atlassian.sal.crowd.license
Class CrowdLicenseHandler
java.lang.Object
com.atlassian.sal.crowd.license.CrowdLicenseHandler
- All Implemented Interfaces:
com.atlassian.sal.api.license.LicenseHandler
public class CrowdLicenseHandler
extends Object
implements com.atlassian.sal.api.license.LicenseHandler
Crowd license handler that stores the license
- Since:
- 2.0
-
Constructor Summary
ConstructorDescriptionCrowdLicenseHandler
(CrowdLicenseManager licenseManager, I18nHelper i18nHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProductLicense
(String productKey, String license) void
addProductLicenses
(Set<com.atlassian.sal.api.license.RawProductLicense> rawProductLicenses) com.atlassian.sal.api.license.MultiProductLicenseDetails
decodeLicenseDetails
(String license) Collection<com.atlassian.sal.api.license.MultiProductLicenseDetails>
com.atlassian.sal.api.license.SingleProductLicenseDetailsView
getProductLicenseDetails
(String productKey) getRawProductLicense
(String productKey) boolean
boolean
void
removeProductLicense
(String productKey) void
setLicense
(String license) com.atlassian.sal.api.validate.MultipleLicensesValidationResult
validateMultipleProductLicenses
(Set<com.atlassian.sal.api.license.RawProductLicense> rawProductLicenses, Locale locale) com.atlassian.sal.api.validate.ValidationResult
validateProductLicense
(String productKey, String license, Locale locale)
-
Constructor Details
-
CrowdLicenseHandler
-
-
Method Details
-
setLicense
- Specified by:
setLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getServerId
- Specified by:
getServerId
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getSupportEntitlementNumber
- Specified by:
getSupportEntitlementNumber
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
addProductLicense
public void addProductLicense(@Nonnull String productKey, @Nonnull String license) throws com.atlassian.sal.api.i18n.InvalidOperationException - Specified by:
addProductLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
- Throws:
com.atlassian.sal.api.i18n.InvalidOperationException
-
addProductLicenses
public void addProductLicenses(@Nonnull Set<com.atlassian.sal.api.license.RawProductLicense> rawProductLicenses) throws com.atlassian.sal.api.i18n.InvalidOperationException - Specified by:
addProductLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
- Throws:
com.atlassian.sal.api.i18n.InvalidOperationException
- Since:
- 4.4
-
decodeLicenseDetails
@Nonnull public com.atlassian.sal.api.license.MultiProductLicenseDetails decodeLicenseDetails(@Nonnull String license) - Specified by:
decodeLicenseDetails
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getAllProductLicenses
@Nonnull public Collection<com.atlassian.sal.api.license.MultiProductLicenseDetails> getAllProductLicenses()- Specified by:
getAllProductLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getAllSupportEntitlementNumbers
- Specified by:
getAllSupportEntitlementNumbers
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getProductKeys
- Specified by:
getProductKeys
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getProductLicenseDetails
@Nullable public com.atlassian.sal.api.license.SingleProductLicenseDetailsView getProductLicenseDetails(@Nonnull String productKey) - Specified by:
getProductLicenseDetails
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getRawProductLicense
- Specified by:
getRawProductLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
hostAllowsCustomProducts
public boolean hostAllowsCustomProducts()- Specified by:
hostAllowsCustomProducts
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
hostAllowsMultipleLicenses
public boolean hostAllowsMultipleLicenses()- Specified by:
hostAllowsMultipleLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
removeProductLicense
public void removeProductLicense(@Nonnull String productKey) throws com.atlassian.sal.api.i18n.InvalidOperationException - Specified by:
removeProductLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
- Throws:
com.atlassian.sal.api.i18n.InvalidOperationException
-
validateProductLicense
@Nonnull public com.atlassian.sal.api.validate.ValidationResult validateProductLicense(@Nonnull String productKey, @Nonnull String license, @Nullable Locale locale) - Specified by:
validateProductLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
validateMultipleProductLicenses
@Nonnull public com.atlassian.sal.api.validate.MultipleLicensesValidationResult validateMultipleProductLicenses(@Nonnull Set<com.atlassian.sal.api.license.RawProductLicense> rawProductLicenses, @Nullable Locale locale) - Specified by:
validateMultipleProductLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
- Since:
- 4.4
-