Package com.atlassian.sal.bamboo.license
Class BambooLicenseHandler
- java.lang.Object
-
- com.atlassian.sal.bamboo.license.BambooLicenseHandler
-
- All Implemented Interfaces:
com.atlassian.sal.api.license.LicenseHandler
@Component public class BambooLicenseHandler extends Object implements com.atlassian.sal.api.license.LicenseHandler
-
-
Constructor Summary
Constructors Constructor Description BambooLicenseHandler(BambooLicenseManager bambooLicenseManager, com.atlassian.sal.api.message.I18nResolver i18nResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProductLicense(@NotNull String productKey, @NotNull String license)
void
addProductLicenses(@NotNull Set<com.atlassian.sal.api.license.RawProductLicense> set)
@NotNull com.atlassian.sal.api.license.MultiProductLicenseDetails
decodeLicenseDetails(@NotNull String license)
TODO BDEV-8917@NotNull Collection<com.atlassian.sal.api.license.MultiProductLicenseDetails>
getAllProductLicenses()
@NotNull SortedSet<String>
getAllSupportEntitlementNumbers()
Set<String>
getProductKeys()
@Nullable com.atlassian.sal.api.license.SingleProductLicenseDetailsView
getProductLicenseDetails(@NotNull String productKey)
@Nullable String
getRawProductLicense(String productKey)
String
getServerId()
String
getSupportEntitlementNumber()
boolean
hostAllowsCustomProducts()
boolean
hostAllowsMultipleLicenses()
void
removeProductLicense(@NotNull String productKey)
void
setLicense(String license)
@NotNull com.atlassian.sal.api.validate.MultipleLicensesValidationResult
validateMultipleProductLicenses(@NotNull Set<com.atlassian.sal.api.license.RawProductLicense> set, @Nullable Locale locale)
@NotNull com.atlassian.sal.api.validate.ValidationResult
validateProductLicense(@NotNull String productKey, @NotNull String license, @Nullable Locale locale)
-
-
-
Constructor Detail
-
BambooLicenseHandler
@Autowired public BambooLicenseHandler(BambooLicenseManager bambooLicenseManager, com.atlassian.sal.api.message.I18nResolver i18nResolver)
-
-
Method Detail
-
setLicense
public void setLicense(String license)
- Specified by:
setLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getServerId
public String getServerId()
- Specified by:
getServerId
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getSupportEntitlementNumber
public String getSupportEntitlementNumber()
- Specified by:
getSupportEntitlementNumber
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
hostAllowsMultipleLicenses
public boolean hostAllowsMultipleLicenses()
- Specified by:
hostAllowsMultipleLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
hostAllowsCustomProducts
public boolean hostAllowsCustomProducts()
- Specified by:
hostAllowsCustomProducts
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getProductKeys
public Set<String> getProductKeys()
- Specified by:
getProductKeys
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
addProductLicense
public void addProductLicense(@NotNull @NotNull String productKey, @NotNull @NotNull 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(@NotNull @NotNull Set<com.atlassian.sal.api.license.RawProductLicense> set) throws com.atlassian.sal.api.i18n.InvalidOperationException
- Specified by:
addProductLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
- Throws:
com.atlassian.sal.api.i18n.InvalidOperationException
-
removeProductLicense
public void removeProductLicense(@NotNull @NotNull 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
@NotNull public @NotNull com.atlassian.sal.api.validate.ValidationResult validateProductLicense(@NotNull @NotNull String productKey, @NotNull @NotNull String license, @Nullable @Nullable Locale locale)
- Specified by:
validateProductLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
validateMultipleProductLicenses
@NotNull public @NotNull com.atlassian.sal.api.validate.MultipleLicensesValidationResult validateMultipleProductLicenses(@NotNull @NotNull Set<com.atlassian.sal.api.license.RawProductLicense> set, @Nullable @Nullable Locale locale)
- Specified by:
validateMultipleProductLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getAllSupportEntitlementNumbers
@NotNull public @NotNull SortedSet<String> getAllSupportEntitlementNumbers()
- Specified by:
getAllSupportEntitlementNumbers
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getRawProductLicense
@Nullable public @Nullable String getRawProductLicense(String productKey)
- Specified by:
getRawProductLicense
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getProductLicenseDetails
@Nullable public @Nullable com.atlassian.sal.api.license.SingleProductLicenseDetailsView getProductLicenseDetails(@NotNull @NotNull String productKey)
- Specified by:
getProductLicenseDetails
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
getAllProductLicenses
@NotNull public @NotNull Collection<com.atlassian.sal.api.license.MultiProductLicenseDetails> getAllProductLicenses()
- Specified by:
getAllProductLicenses
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
decodeLicenseDetails
@NotNull public @NotNull com.atlassian.sal.api.license.MultiProductLicenseDetails decodeLicenseDetails(@NotNull @NotNull String license)
TODO BDEV-8917- Specified by:
decodeLicenseDetails
in interfacecom.atlassian.sal.api.license.LicenseHandler
-
-