|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.core.license.AbstractProductLicense
AbstractProductLicense implements some of the more mundane
methods of a ProductLicense and leaves a few abstract methods
for implementation by concrete classes.
| Constructor Summary | |
AbstractProductLicense()
|
|
| Method Summary | |
void |
addAttribute(String attrName,
String attrValue)
Add an attribute. |
abstract void |
assertValid()
Assert that the ProductLicense is valid. |
protected String |
computeKey(String password)
Compute the key based on current ProductLicense attributes and the specified password. |
String[] |
getAttributeNames()
Get all attribute names. |
String |
getAttributeValue(String attrName)
Get an attribute value. |
String |
getKey()
Get the ProductLicense key. |
String |
getName()
Get the ProductLicense name. |
abstract void |
initialize(Object config)
Initialize the ProductLicense. |
boolean |
isLocked()
Check the ProductLicense locked status |
void |
lock()
Lock the ProductLicense. |
void |
setKey(String key)
Set the ProductLicense key. |
void |
setName(String name)
Set the ProductLicense name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractProductLicense()
| Method Detail |
public abstract void initialize(Object config)
throws ProductLicenseException
initialize in interface ProductLicenseconfig - an implementation-specific configuration parameter.
This may be a Properties object, a File, or any other object
specific to the ProductLicenseManager implementation.
ProductLicenseException - if an error initializing the
ProductLicense.
public final void setName(String name)
throws ProductLicenseException
setName in interface ProductLicensename - the ProductLicense name.
ProductLicenseException - if the name is null, empty, or the
ProductLicense is locked.public final String getName()
getName in interface ProductLicense
public final void setKey(String key)
throws ProductLicenseException
setKey in interface ProductLicensekey - the ProductLicense key.
ProductLicenseException - if the key is null, empty, or the
ProductLicense is locked.public final String getKey()
getKey in interface ProductLicense
public final void addAttribute(String attrName,
String attrValue)
throws ProductLicenseException
addAttribute in interface ProductLicenseattrName - the product attribute name.attrValue - the product attribute value.
ProductLicenseException - if an invalid or unknown attribute is
added, or if the ProductLicense is locked and cannot be modified.public final String[] getAttributeNames()
getAttributeNames in interface ProductLicensepublic final String getAttributeValue(String attrName)
getAttributeValue in interface ProductLicenseattrName - the name of the attribute for which a value is desired.
public final void lock()
lock in interface ProductLicensepublic final boolean isLocked()
isLocked in interface ProductLicense
public abstract void assertValid()
throws ProductLicenseException
assertValid in interface ProductLicenseProductLicenseException - if the ProductLicense is not valid.
protected String computeKey(String password)
throws ProductLicenseException
password - the password used during key computation.
ProductLicenseException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||