public class LicenseKey
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.List<ActivatedMachine> |
ActivatedMachines |
boolean |
Block |
long |
Created |
Customer |
Customer |
java.util.List<DataObject> |
DataObjects |
long |
Expires |
boolean |
F1 |
boolean |
F2 |
boolean |
F3 |
boolean |
F4 |
boolean |
F5 |
boolean |
F6 |
boolean |
F7 |
boolean |
F8 |
long |
GlobalId |
long |
Id |
java.lang.String |
Key |
int |
MaxNoOfMachines |
java.lang.String |
Notes |
int |
Period |
int |
ProductId |
Reseller |
Reseller |
long |
SignDate |
boolean |
TrialActivation |
Constructor and Description |
---|
LicenseKey() |
Modifier and Type | Method and Description |
---|---|
boolean |
HasExpired()
Check if the current license has expired.
|
boolean |
HasFeature(int feature)
Check if this license has a certain feature enabled (i.e.
|
boolean |
HasNotExpired()
Check if the current license has not expired.
|
static LicenseKey |
LoadFromString(java.lang.String RSAPubKey,
java.lang.String licenseString)
Load a license string (created with @see SaveAsString) into a license object.
|
static LicenseKey |
LoadFromString(java.lang.String RSAPubKey,
java.lang.String licenseString,
int signatureExpirationInterval)
Load a license string (created with @see SaveAsString) into a license object.
|
java.lang.String |
SaveAsString()
Save the current license object as a string.
|
public int ProductId
public long Id
public java.lang.String Key
public long Created
public long Expires
public int Period
public boolean F1
public boolean F2
public boolean F3
public boolean F4
public boolean F5
public boolean F6
public boolean F7
public boolean F8
public java.lang.String Notes
public boolean Block
public long GlobalId
public Customer Customer
public java.util.List<ActivatedMachine> ActivatedMachines
public boolean TrialActivation
public int MaxNoOfMachines
public java.util.List<DataObject> DataObjects
public Reseller Reseller
public long SignDate
public java.lang.String SaveAsString()
public static LicenseKey LoadFromString(java.lang.String RSAPubKey, java.lang.String licenseString)
RSAPubKey
- Your RSA Public Key, which can be found here.licenseString
- The license key object stored as a string.public static LicenseKey LoadFromString(java.lang.String RSAPubKey, java.lang.String licenseString, int signatureExpirationInterval)
RSAPubKey
- Your RSA Public Key, which can be found here.licenseString
- The license key object stored as a string.signatureExpirationInterval
- If the license key was signed, this method
will check so that no more than "signatureExpirationInterval"
days have passed since the last activation.public boolean HasExpired()
public boolean HasNotExpired()
public boolean HasFeature(int feature)
feature
- The feature, eg 1 to 8.