Package tigase.licence
Class LicenceChecker
java.lang.Object
tigase.licence.LicenceChecker
Class used to perform periodic licence check and/or upload of statistics
data.
- Author:
- Wojciech Kapcia
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCodeForLicenceRetrieval(String component) static Stringstatic LicenceCheckergetLicenceChecker(String cmpName) Creates aLicenceCheckerwith default update callbackLicenceCheckerUpdateCallbackImplfor the component which name was provided as parameter.static LicenceCheckergetLicenceChecker(String cmpName, LicenceCheckerUpdateCallback call) Creates aLicenceCheckerwith custom implementation ofLicenceCheckerUpdateCallbackinterface for the component which name was provided as parameter.Returns Licence digeststatic ElementgetLicencingDetails(String component) Returns date until which licence is valid.booleanstatic voidvoidtoString()
-
Field Details
-
INSTALLATION_ID_KEY
- See Also:
-
-
Method Details
-
getCodeForLicenceRetrieval
- Throws:
Exception
-
getInstallationId
-
getLicenceChecker
Creates aLicenceCheckerwith default update callbackLicenceCheckerUpdateCallbackImplfor the component which name was provided as parameter. Component name will be used to find licence file with the pattern ofetc/${cmpName}.licence- Parameters:
cmpName- name of the component for whichLicenceCheckerwill be instantiated.- Returns:
LicenceCheckerfor the given cmpName
-
getLicenceChecker
Creates aLicenceCheckerwith custom implementation ofLicenceCheckerUpdateCallbackinterface for the component which name was provided as parameter. Component name will be used to find licence file with the pattern ofetc/${cmpName}.licence- Parameters:
cmpName- name of the component for whichLicenceCheckerwill be instantiated.call- custom implementation ofLicenceCheckerUpdateCallback- Returns:
LicenceCheckerfor the given cmpName
-
getLicencedComponents
-
getLicencingDetails
-
main
-
isLicenceShown
public boolean isLicenceShown() -
reloadLicenceFromServer
public Licence reloadLicenceFromServer() throws NoSuchAlgorithmException, IOException, InvalidKeySpecException -
getComponentName
-
getLicenceDigest
Returns Licence digest- Returns:
- a
Daterepresentation of licence expiration date.
-
getValidUntil
Returns date until which licence is valid.- Returns:
- a
Daterepresentation of licence expiration date.
-
setLicenceShown
public void setLicenceShown() -
toString
-