public class DefaultLicense 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 |
|---|
DefaultLicense()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
getDate(Object o)
Returns the time in millis for the given object.
|
Date |
getExpirationDate()
Returns the expiration date.
|
String |
getMaxVersion()
Returns the maximum version this license is valid for.
|
String |
getMinVersion()
Returns the minimum version this license is valid for.
|
String |
getOwner()
Returns the license owner.
|
String |
getProduct()
Returns the product name.
|
void |
init(ILicenseContext context)
Initialize the license using the given context.
|
boolean |
isMaxVersionIncluded()
Returns whether verification includes the maximum version.
|
boolean |
isMinVersionIncluded()
Returns whether verification includes the minimum version.
|
void |
setExpirationDate(Date d)
Sets the new expiration date
|
void |
setMaxVersion(String s)
Sets the maximum version this license is valid for.
|
void |
setMaxVersionIncluded(boolean b)
Sets whether verification includes the maximum version.
|
void |
setMinVersion(String s)
Sets the minimum version this license is valid for.
|
void |
setMinVersionIncluded(boolean b)
Sets whether verification includes the minimum version.
|
void |
setOwner(String s)
Sets the license owner.
|
void |
setProduct(String s)
Sets the product name.
|
String |
toString() |
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 String getProduct()
public void setProduct(String s)
s - the product namepublic Date getExpirationDate()
null 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 boolean isMinVersionIncluded()
true when minimum version is includedpublic void setMinVersionIncluded(boolean b)
b - true when minimum version is includedpublic String getMinVersion()
null if no such versionpublic void setMinVersion(String s)
s - the minimum version or null if no such versionpublic boolean isMaxVersionIncluded()
true when maximum version is includedpublic void setMaxVersionIncluded(boolean b)
b - true when maximum version is includedpublic String getMaxVersion()
null if no such versionpublic void setMaxVersion(String s)
s - the maximum version or null if no such versionprotected long getDate(Object o)
o - an object (a date or long value)public void verify(ILicenseContext context)
context - the context containing verification parametersCopyright © 2014. All rights reserved.