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
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getCodeForLicenceRetrieval
(String component) static String
static LicenceChecker
getLicenceChecker
(String cmpName) Creates aLicenceChecker
with default update callbackLicenceCheckerUpdateCallbackImpl
for the component which name was provided as parameter.static LicenceChecker
getLicenceChecker
(String cmpName, LicenceCheckerUpdateCallback call) Creates aLicenceChecker
with custom implementation ofLicenceCheckerUpdateCallback
interface for the component which name was provided as parameter.Returns Licence digeststatic Element
getLicencingDetails
(String component) Returns date until which licence is valid.boolean
static void
void
toString()
-
Field Details
-
INSTALLATION_ID_KEY
- See Also:
-
-
Method Details
-
getCodeForLicenceRetrieval
- Throws:
Exception
-
getInstallationId
-
getLicenceChecker
Creates aLicenceChecker
with default update callbackLicenceCheckerUpdateCallbackImpl
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 whichLicenceChecker
will be instantiated.- Returns:
LicenceChecker
for the given cmpName
-
getLicenceChecker
Creates aLicenceChecker
with custom implementation ofLicenceCheckerUpdateCallback
interface 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 whichLicenceChecker
will be instantiated.call
- custom implementation ofLicenceCheckerUpdateCallback
- Returns:
LicenceChecker
for 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
Date
representation of licence expiration date.
-
getValidUntil
Returns date until which licence is valid.- Returns:
- a
Date
representation of licence expiration date.
-
setLicenceShown
public void setLicenceShown() -
toString
-