|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.smardec.license4j.License
Class for storing license data. It can store any number of features and their
values like Hashtable
. You can store any Serializable
object as feature's value. Also you can have unsigned features - features that
are not used in the signature generation/verification and therefore can change
their values leaving the license valid.
Constructor Summary | |
License()
Creates License object with no features. |
Method Summary | |
void |
addFeature(java.lang.String name,
java.lang.Object value)
Adds feature to the license. |
void |
addUnsignedFeature(java.lang.String name,
java.lang.Object value)
Adds unsigned feature to the license. |
java.lang.Object |
getFeature(java.lang.String name)
Returns value of the feature with the specified feature's name. |
java.lang.String |
getFeatureAsString(java.lang.String name)
Returns String value of the feature with the specified feature's name. |
java.util.List |
getFeatureList()
Returns list of all feature names. |
java.lang.Object |
removeFeature(java.lang.String name)
Removes feature with the specified name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public License()
License
object with no features.
Method Detail |
public java.lang.Object getFeature(java.lang.String name)
name
- name of the feature
null
if there is no feature with specified name.public java.lang.String getFeatureAsString(java.lang.String name)
String
value of the feature with the specified feature's name.
name
- name of the feature
null
if there is no feature with specified name.public void addFeature(java.lang.String name, java.lang.Object value)
name
- name of the featurevalue
- value of the featurepublic void addUnsignedFeature(java.lang.String name, java.lang.Object value)
name
- name of the featurevalue
- value of the featurepublic java.lang.Object removeFeature(java.lang.String name)
name
- name of the feature
public java.util.List getFeatureList()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |