public class SimpleLicense extends AbstractLicense
EXPIRATION_DATE_KEY, MAXIMUM_VERSION_INCLUDED_KEY, MAXIMUM_VERSION_KEY, MINIMUM_VERSION_INCLUDED_KEY, MINIMUM_VERSION_KEY, OWNER_KEY, PRODUCT_KEY, VERSION_KEY| Constructor and Description |
|---|
SimpleLicense()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getExpiration()
Returns the expiration date.
|
Date |
getExpirationDate()
Returns the expiration date.
|
String |
getOwner()
Returns the license owner.
|
int |
getProduct()
Returns the product ID.
|
void |
init(ILicenseContext context)
Initialize the license using the given context.
|
static byte[] |
serialize(SimpleLicense license)
Serializes this license into bytes.
|
void |
setExpirationDate(Date d)
Sets the new expiration date
|
void |
setOwner(String s)
Sets the license owner.
|
void |
setProduct(int i)
Sets the product ID.
|
void |
verify(ILicenseContext context)
Verify the license using the given context
|
getProperty, getPropertyNames, hasProperty, initProperty, removeProperty, setProperty, verifyEqualGreaterThan, verifyEqualLessThan, verifyEquals, verifyGreaterThan, verifyLessThanpublic void init(ILicenseContext context)
context - context containing parameters.public int getProduct()
public void setProduct(int i)
i - the product IDpublic Date getExpirationDate()
null if not setpublic long getExpiration()
0 if not setpublic void setExpirationDate(Date d)
d - the new date or null if no expirationpublic String getOwner()
public void setOwner(String s)
s - the license ownerpublic void verify(ILicenseContext context)
context - the context containing verification parameterspublic static byte[] serialize(SimpleLicense license) throws UnsupportedEncodingException
UnsupportedEncodingExceptionCopyright © 2014. All rights reserved.