Interface LicenseStore
-
- All Known Subinterfaces:
LicenseStoreInternal
- All Known Implementing Classes:
ApplicationConfigurationLicenseStore
@Internal @ParametersAreNonnullByDefault public interface LicenseStore
Encapsulates storing and validating a license.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearLicenseFromMemory()
Clears the currently installed from memory, causing it to be re-read from persistent the next timeretrieve()
is called.void
install(String licenseString)
Attempts to install the given encrypted license.void
installTransiently(String licenseString)
Attempts to install the given license transiently.@NonNull com.atlassian.extras.api.AtlassianLicense
retrieve()
Retrieves the currently installed license.
-
-
-
Method Detail
-
retrieve
@NonNull com.atlassian.extras.api.AtlassianLicense retrieve()
Retrieves the currently installed license.- Returns:
- the currently installed license
- Throws:
LicenseException
- if the license could not be retrieved
-
install
void install(String licenseString)
Attempts to install the given encrypted license.- Parameters:
licenseString
- the encrypted license- Throws:
IllegalArgumentException
- most likely due to the license not being de-cryptableIllegalStateException
- most likely due to a problem while persisting the license- See Also:
LicenseService.validate(String)
-
installTransiently
void installTransiently(String licenseString)
Attempts to install the given license transiently. It will not publish an event that a new license has been installed. It is provided for testing purposes only.- Throws:
IllegalArgumentException
- most likely due to the license not being de-cryptableIllegalStateException
- most likely due to a problem while persisting the license
-
clearLicenseFromMemory
void clearLicenseFromMemory()
Clears the currently installed from memory, causing it to be re-read from persistent the next timeretrieve()
is called. It is provided for testing purposes only.
-
-