public final class LicenseInfo extends Object implements Serializable
A LicenseInfo object contains the license details for a single license. It is encapsulated by a SignedObject (signed by the license private key) and serialized to produce the actual license file.
Modifier and Type | Field and Description |
---|---|
static long |
UNLIMITED_CAPACITY |
static Date |
UNLIMITED_DURATION |
Constructor and Description |
---|
LicenseInfo(String serialString,
String issuedTo,
ArrayList<LicenseComponent> allowedComponents,
Date createdAt,
Date validAfter,
Date validUntil,
String[] supercedes,
HashMap<String,Object> metaData,
ArrayList<com.opencloud.license.HostInfo> licensedHosts,
ArrayList<com.opencloud.license.CertificateInfo> certificateInfo) |
Modifier and Type | Method and Description |
---|---|
void |
checkValidity()
Check the state of this LicenseInfo for basic consistency.
|
static String |
describeCertificate(Certificate certificate)
Returns a short description of the specified certificate.
|
String[] |
getAllowedFunctions()
Returns the list of functions allowed by this license.
|
String[] |
getAllowedVersions()
Returns the list of versions allowed by this license.
|
com.opencloud.license.CertificateInfo[] |
getCertificateInfo()
Returns the certificate info contained in this license.
|
Date |
getFrom() |
com.opencloud.license.HostInfo.Licensed |
getHostLicensedState(com.opencloud.license.HostInfo host)
Check whether this license allows the given host to start Rhino
|
String |
getIssuedTo() |
LicenseComponent[] |
getLicenseComponents()
Returns a non-empty array of LicenseComponents.
|
com.opencloud.license.HostInfo[] |
getLicensedHosts()
Returns the list of licensed hosts
|
HashMap<String,Object> |
getMetaData() |
String |
getSerial() |
String[] |
getSupercededLicenses() |
Date |
getUntil() |
boolean |
hasLicensedHostRestrictions()
Returns whether or not this license enforces host based restrictions
|
boolean |
isValid()
Returns true if this license is currently valid with respect to be 'from' and 'until' fields.
|
static void |
main(String[] args)
Command-line interface: verify and display licenses given by URLs on the command line.
|
void |
showBrief(PrintStream writer)
Write a brief summary of this license to a PrintStream
|
void |
showDetailed(PrintStream writer)
Write detailed information on this license to a PrintStream
|
String |
toString() |
public static final long UNLIMITED_CAPACITY
public static final Date UNLIMITED_DURATION
public LicenseInfo(String serialString, String issuedTo, ArrayList<LicenseComponent> allowedComponents, Date createdAt, Date validAfter, Date validUntil, String[] supercedes, HashMap<String,Object> metaData, ArrayList<com.opencloud.license.HostInfo> licensedHosts, ArrayList<com.opencloud.license.CertificateInfo> certificateInfo) throws LicenseException
LicenseException
public void checkValidity() throws LicenseException
Check the state of this LicenseInfo for basic consistency. Note that this does not check that the license is valid on the current date.
LicenseException
public void showBrief(PrintStream writer)
Write a brief summary of this license to a PrintStream
public void showDetailed(PrintStream writer)
Write detailed information on this license to a PrintStream
public static String describeCertificate(Certificate certificate)
Returns a short description of the specified certificate.
public boolean isValid()
Returns true if this license is currently valid with respect to be 'from' and 'until' fields. This does NOT check whether the license function or capacity are correct.
public Date getFrom()
public Date getUntil()
public LicenseComponent[] getLicenseComponents()
Returns a non-empty array of LicenseComponents.
public com.opencloud.license.HostInfo.Licensed getHostLicensedState(com.opencloud.license.HostInfo host)
Check whether this license allows the given host to start Rhino
public boolean hasLicensedHostRestrictions()
Returns whether or not this license enforces host based restrictions
public com.opencloud.license.HostInfo[] getLicensedHosts()
Returns the list of licensed hosts
public com.opencloud.license.CertificateInfo[] getCertificateInfo()
Returns the certificate info contained in this license.
public String[] getAllowedFunctions()
Returns the list of functions allowed by this license. This function exists mainly for backwards compatibility with existing code.
public String[] getAllowedVersions()
Returns the list of versions allowed by this license. This function exists mainly for backwards compatibility with existing code.
public String getSerial()
public String[] getSupercededLicenses()
public String getIssuedTo()