Package org.zkoss.zkex.license
Class DefaultLicenseParam
- java.lang.Object
-
- org.zkoss.zkex.license.DefaultLicenseParam
-
- All Implemented Interfaces:
LicenseParam
public class DefaultLicenseParam extends java.lang.Object implements LicenseParam
This is a convenience class implementing theLicenseParaminterface.- Version:
- $Id$
- Author:
- Christian Schlichtherle
-
-
Constructor Summary
Constructors Constructor Description DefaultLicenseParam(java.lang.String subject, java.util.prefs.Preferences preferences, KeyStoreParam keyStoreParam, CipherParam cipherParam)Creates a new instance of DefaultLicenseParam.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CipherParamgetCipherParam()Returns the cipher configuration parameters for the license manager -nullis never returned.KeyStoreParamgetKeyStoreParam()Returns the keystore configuration parameters for the license manager -nullis never returned.java.util.prefs.PreferencesgetPreferences()Returns the preferences node where the encoded licence is stored or should get stored.java.lang.StringgetSubject()Returns the license manager's subject as a descriptive string -nullis never returned.
-
-
-
Constructor Detail
-
DefaultLicenseParam
public DefaultLicenseParam(java.lang.String subject, java.util.prefs.Preferences preferences, KeyStoreParam keyStoreParam, CipherParam cipherParam)Creates a new instance of DefaultLicenseParam.- Parameters:
subject- The licensing subject to be returned bygetSubject().preferences- The preferences node used to store the license key to be returned bygetPreferences().keyStoreParam- The key store parameters to be returned bygetKeyStoreParam().cipherParam- The cipher parameters to be returned bygetCipherParam().
-
-
Method Detail
-
getSubject
public java.lang.String getSubject()
Description copied from interface:LicenseParamReturns the license manager's subject as a descriptive string -nullis never returned.- Specified by:
getSubjectin interfaceLicenseParam- Returns:
- A string which must compare equal to the "subject" property
of the
LicenseContentJavaBean. Note that this is public information which may be displayed to the user in a wizard or some other form.
-
getPreferences
public java.util.prefs.Preferences getPreferences()
Description copied from interface:LicenseParamReturns the preferences node where the encoded licence is stored or should get stored. This method may returnnullif the license manager is not used toLicenseManager.install(java.io.File)a license or toLicenseManager.verify()an installed license.Note that the preferences node should be globally unique; otherwise, another application could overwrite your license key! Thus, it is recommended to follow Sun's guideline of creating globally unique package names by prefixing them with your globally unique Internet domain. You should then put the main class of your application in this package and return its user preferences node. This is because across platforms you will normally only have write access to the user preferences.
- Specified by:
getPreferencesin interfaceLicenseParam
-
getKeyStoreParam
public KeyStoreParam getKeyStoreParam()
Description copied from interface:LicenseParamReturns the keystore configuration parameters for the license manager -nullis never returned.- Specified by:
getKeyStoreParamin interfaceLicenseParam
-
getCipherParam
public CipherParam getCipherParam()
Description copied from interface:LicenseParamReturns the cipher configuration parameters for the license manager -nullis never returned.- Specified by:
getCipherParamin interfaceLicenseParam
-
-