|
TrueLicense Core 1.33 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.license.LicenseContent
public class LicenseContent
This non-visual JavaBean represents the content of an application license. This encompasses information about which license subjects may be licensed by which kind of license consumers and their quantity (per kind and a maximum total). In addition, an issue time stamp and optional information about the license holder is contained.
This class is not trusted by the license notary. As a result, the license manager validates and verifies the state of this object itself whenever necessary.
In general, all properties may be null which indicates that this
information is not (yet) available and should be ignored.
Note however that validation may fail if certain properties are not
available.
Subclasses are encouraged to use the firePropertyChange methods
to notify all listeners of all property events.
Subclasses must also implement the JavaBean pattern in order to
be usable.
Note that the property change listeners are not persistet when
using ObjectOutputStream or XMLEncoder.
LicenseNotary,
Serialized Form| Field Summary | |
|---|---|
private int |
consumerAmount
|
private String |
consumerType
|
private Object |
extra
|
private X500Principal |
holder
|
private String |
info
|
private Date |
issued
|
private X500Principal |
issuer
|
private Date |
notAfter
|
private Date |
notBefore
|
private PropertyChangeSupport |
propertySupport
Utility field used by bound properties. |
private static long |
serialVersionUID
|
private String |
subject
|
| Constructor Summary | |
|---|---|
LicenseContent()
|
|
| Method Summary | |
|---|---|
private static Date |
clone(Date date)
|
private static boolean |
equals(Object a,
Object b)
|
int |
getConsumerAmount()
Returns the amount of consumers which are allowed to license the subject with this license. |
String |
getConsumerType()
Returns a description of the entity which allocates a license for using the licensing subject. |
Object |
getExtra()
Returns the value of the property extra. |
X500Principal |
getHolder()
Returns the legal entity (i.e. the user) to which the license is granted by the issuer. |
String |
getInfo()
Returns the value of the property info. |
Date |
getIssued()
Returns the time when the license represented by this license content has been issued. |
X500Principal |
getIssuer()
Returns the legal entity which grants the license to the holder. |
Date |
getNotAfter()
Returns the time when the license ends to be valid. |
Date |
getNotBefore()
Returns the time when the license begins to be valid. |
String |
getSubject()
Returns the abstract description of the entity which needs to be licensed in order for it to be used - it could be the name of a software application like e.g. |
private static int |
hash(Object object)
|
void |
setConsumerAmount(int consumerAmount)
Sets the amount of consumers which are allowed to license the subject with this license. |
void |
setConsumerType(String consumerType)
Sets the type of entity which needs to license the license subject in order to use it. |
void |
setExtra(Object extra)
Sets the value of the property extra. |
void |
setHolder(X500Principal holder)
Sets the legal entity (i.e. the user) to which the license is granted by the issuer. |
void |
setInfo(String info)
Sets the value of the property info. |
void |
setIssued(Date issued)
Sets the time when the license represented by this license content has been issued. |
void |
setIssuer(X500Principal issuer)
Sets the legal entity which grants the license to the holder. |
void |
setNotAfter(Date notAfter)
Sets the time when the license ends to be valid. |
void |
setNotBefore(Date notBefore)
Sets the time when the license begins to be valid. |
void |
setSubject(String subject)
Sets the abstract description of the entity which needs to be licensed in order for it to be used - it could be the name of a software application like e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int consumerAmount
private String consumerType
private Object extra
private X500Principal holder
private String info
private Date issued
private X500Principal issuer
private Date notAfter
private Date notBefore
private transient PropertyChangeSupport propertySupport
private static final long serialVersionUID
private String subject
| Constructor Detail |
|---|
public LicenseContent()
| Method Detail |
|---|
private static Date clone(Date date)
private static boolean equals(Object a,
Object b)
public int getConsumerAmount()
1.
consumerAmount.public String getConsumerType()
null.
consumerType.public Object getExtra()
null.
public X500Principal getHolder()
null.
holder.getIssuer()public String getInfo()
info.
This property may be used by applications to store public license
text which gets displayed to the user for informational purposes.
The default is null.
public Date getIssued()
null.
issued.System.currentTimeMillis()public X500Principal getIssuer()
null.
issuer.getHolder()public Date getNotAfter()
null.
notAfter.public Date getNotBefore()
null.
notBefore.public String getSubject()
null.
subject.private static int hash(Object object)
public void setConsumerAmount(int consumerAmount)
consumerAmount - New value of bound property consumerAmount.public void setConsumerType(String consumerType)
consumerType - New value of bound property consumerType.public void setExtra(Object extra)
Warning: If you use this property, versions of the TrueLicense
Library Collection prior to 1.19 will fail to install or verify the
generated license key with an AssertionError, which usually
causes the application to terminate abnormally!
(Since version 1.19, if an unknown property is found, a
PersistenceServiceException is thrown
by these methods instead.)
extra - New value of bound property extra.
This object must either implement the JavaBeans specification
or have direct support by the class
XMLEncoder, such as strings and primitive
type wrapper objects.public void setHolder(X500Principal holder)
holder - New value of bound property holder.setIssuer(X500Principal)public void setInfo(String info)
info.
This property may be used by applications to store public license
text which gets displayed to the user for informational purposes.
info - New value of bound property info.public void setIssued(Date issued)
issued - New value of bound property issued.public void setIssuer(X500Principal issuer)
issuer - New value of bound property issuer.setHolder(X500Principal)public void setNotAfter(Date notAfter)
notAfter - New value of bound property notAfter.public void setNotBefore(Date notBefore)
notBefore - New value of bound property notBefore.public void setSubject(String subject)
subject - New value of bound property subject.
|
TrueLicense Core 1.33 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||