Package org.alfresco.service.license
Interface LicenseService
public interface LicenseService
Contract for managing licenses.
- Author:
- davidc
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInteface for components wishing to know when the license has changed -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet description of installed license.booleanWas the license known to be valid the last time it was checked?.Force license reloadloadLicense(InputStream licenseStream) Load license from the input streamvoidRegister a callback that gets called when a license changes.voidshutdown()Informs the service it is being shutdown.voidBegin the license verification loop.
-
Field Details
-
INPUTSTREAM_SUCCESS
- See Also:
-
INPUTSTREAM_FAIL
- See Also:
-
INPUTSTREAM_RELOAD_FAIL
- See Also:
-
-
Method Details
-
loadLicense
String loadLicense()Force license reload -
loadLicense
Load license from the input stream- Parameters:
licenseStream- The input stream- Returns:
- confirmation if the license loaded successfully.
-
verifyLicense
Begin the license verification loop. Throws an exception if a new .lic file has been supplied that is invalid. Will quietly make the repository read only if there is no license and the repository isn't eligible for the free trial period or the license has expired.- Throws:
LicenseException- if an invalid .lic file has been supplied
-
isLicenseValid
boolean isLicenseValid()Was the license known to be valid the last time it was checked?.- Returns:
- true if there is a valid license
-
getLicense
Get description of installed license.- Returns:
- license descriptor (or null, if no valid license is installed)
-
registerOnLicenseChange
Register a callback that gets called when a license changes. -
shutdown
Informs the service it is being shutdown.
-