de.schlichtherle.license.ftp
Class LicenseManager
java.lang.Object
de.schlichtherle.license.LicenseManager
de.schlichtherle.license.ftp.LicenseManager
- All Implemented Interfaces:
- LicenseCreator, LicenseVerifier, Remote
public class LicenseManager
- extends LicenseManager
Extends LicenseManager in order to provide
additional functionality required to manage a free trial period (FTP).
This class is thread safe.
- Author:
- Christian Schlichtherle
|
Method Summary |
protected Date |
ftpNotAfter(int ftpDays)
Returns the date after which a free trial period license certificate
should expire, based on ftpDays. |
protected LicenseNotary |
getFTPLicenseNotary()
Returns a license notary configured to use the free trial period
keystore parameters contained in the current license parameters
- null is never returned. |
protected void |
initialize(LicenseContent content)
Initializes the given license content with some reasonable
defaults unless the respective properties have already been set. |
void |
setLicenseParam(LicenseParam param)
Sets the license configuration parameters. |
private void |
setLicenseParam0(LicenseParam param)
|
protected LicenseContent |
verify(LicenseNotary notary)
Decrypts, decompresses, decodes and verifies the current license key,
validates its license content and returns it. |
| Methods inherited from class de.schlichtherle.license.LicenseManager |
create, create, getCertificate, getFileFilter, getLicenseKey, getLicenseNotary, getLicenseParam, getPrivacyGuard, install, install, install, loadLicenseKey, midnight, setCertificate, setLicenseKey, store, store, storeLicenseKey, uninstall, validate, verify, verify, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CN_FTP_USER
private static final String CN_FTP_USER
EQUAL_KEY_STORE_PARAMS
private static final String EQUAL_KEY_STORE_PARAMS
FTP_DAYS
private static final String FTP_DAYS
FTP_KEYSTORE_PARAM
private static final String FTP_KEYSTORE_PARAM
ftpNotary
private LicenseNotary ftpNotary
LicenseManager
protected LicenseManager()
- Creates a new License Manager.
Warning: The manager created by this constructor is not
valid and cannot be used unless
setLicenseParam(LicenseParam)
is called!
LicenseManager
public LicenseManager(LicenseParam param)
- Creates a new License Manager.
- Parameters:
param - The license configuration parameters
- may not be null.
- Throws:
NullPointerException - If the given parameter object does not
obey the contract of its interface due to a null
pointer.
IllegalPasswordException - If any password in the parameter object
does not comply to the current policy.
ftpNotAfter
protected Date ftpNotAfter(int ftpDays)
- Returns the date after which a free trial period license certificate
should expire, based on
ftpDays.
getFTPLicenseNotary
protected LicenseNotary getFTPLicenseNotary()
throws Exception
- Returns a license notary configured to use the free trial period
keystore parameters contained in the current license parameters
-
null is never returned.
- Throws:
Exception
initialize
protected void initialize(LicenseContent content)
- Description copied from class:
LicenseManager
- Initializes the given license
content with some reasonable
defaults unless the respective properties have already been set.
- Overrides:
initialize in class LicenseManager
- See Also:
LicenseManager.validate(LicenseContent)
setLicenseParam
public void setLicenseParam(LicenseParam param)
- Sets the license configuration parameters.
Calling this method resets the manager as if it had been newly created.
The implementation of this class asserts that the given parameter object
is an instance of
LicenseParam and applies some plausibility
checks to it to ensure that it adheres to the contract of the parameter
interfaces.
- Overrides:
setLicenseParam in class LicenseManager
- Parameters:
param - The license configuration parameters
- may not be null.
- Throws:
ClassCastException - if param is not an instance of
LicenseParam.
NullPointerException - If the given parameter object does not
obey the contract of its interface due to a null
pointer.
IllegalPasswordException - If any password in the parameter object
does not comply to the current policy.
setLicenseParam0
private void setLicenseParam0(LicenseParam param)
verify
protected LicenseContent verify(LicenseNotary notary)
throws Exception
- Description copied from class:
LicenseManager
- Decrypts, decompresses, decodes and verifies the current license key,
validates its license content and returns it.
- Overrides:
verify in class LicenseManager
- Parameters:
notary - the license notary used to verify the current license key
- may not be null.
- Returns:
- A clone of the verified and validated content of the license key
-
null is never returned.
- Throws:
NoLicenseInstalledException - if no license key is installed.
Exception - for any other reason.
Note that you should always use
Throwable.getLocalizedMessage() to get a (possibly
localized) meaningful detail message.- See Also:
LicenseManager.validate(LicenseContent)
Copyright © 2005-2015 Schlichtherle IT Services. All Rights Reserved.