Package org.alfresco.service.license
Interface LicenseService
-
public interface LicenseServiceContract for managing licenses.- Author:
- davidc
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLicenseService.LicenseChangeHandlerInteface for components wishing to know when the license has changed
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINPUTSTREAM_FAILstatic java.lang.StringINPUTSTREAM_RELOAD_FAILstatic java.lang.StringINPUTSTREAM_SUCCESS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LicenseDescriptorgetLicense()Get description of installed license.booleanisLicenseValid()Was the license known to be valid the last time it was checked?.java.lang.StringloadLicense()Force license reloadjava.lang.StringloadLicense(java.io.InputStream licenseStream)Load license from the input streamvoidregisterOnLicenseChange(LicenseService.LicenseChangeHandler callback)Register a callback that gets called when a license changes.voidshutdown()Informs the service it is being shutdown.voidverifyLicense()Begin the license verification loop.
-
-
-
Field Detail
-
INPUTSTREAM_SUCCESS
static final java.lang.String INPUTSTREAM_SUCCESS
- See Also:
- Constant Field Values
-
INPUTSTREAM_FAIL
static final java.lang.String INPUTSTREAM_FAIL
- See Also:
- Constant Field Values
-
INPUTSTREAM_RELOAD_FAIL
static final java.lang.String INPUTSTREAM_RELOAD_FAIL
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadLicense
java.lang.String loadLicense()
Force license reload
-
loadLicense
java.lang.String loadLicense(java.io.InputStream licenseStream)
Load license from the input stream- Parameters:
licenseStream- The input stream- Returns:
- confirmation if the license loaded successfully.
-
verifyLicense
@NotAuditable void verifyLicense() throws LicenseExceptionBegin 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
@NotAuditable LicenseDescriptor getLicense()
Get description of installed license.- Returns:
- license descriptor (or null, if no valid license is installed)
-
registerOnLicenseChange
void registerOnLicenseChange(LicenseService.LicenseChangeHandler callback)
Register a callback that gets called when a license changes.
-
shutdown
@NotAuditable void shutdown()
Informs the service it is being shutdown.
-
-