Class LicenseInfo
- java.lang.Object
- 
- com.opencloud.license.LicenseInfo
 
- 
- All Implemented Interfaces:
- Serializable
 
 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. - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static longUNLIMITED_CAPACITYstatic DateUNLIMITED_DURATION
 - 
Constructor SummaryConstructors Constructor 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)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckValidity()Check the state of this LicenseInfo for basic consistency.static StringdescribeCertificate(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.DategetFrom()com.opencloud.license.HostInfo.LicensedgetHostLicensedState(com.opencloud.license.HostInfo host)Check whether this license allows the given host to start RhinoStringgetIssuedTo()LicenseComponent[]getLicenseComponents()Returns a non-empty array of LicenseComponents.com.opencloud.license.HostInfo[]getLicensedHosts()Returns the list of licensed hostsHashMap<String,Object>getMetaData()StringgetSerial()String[]getSupercededLicenses()DategetUntil()booleanhasLicensedHostRestrictions()Returns whether or not this license enforces host based restrictionsbooleanisValid()Returns true if this license is currently valid with respect to be 'from' and 'until' fields.static voidmain(String[] args)Command-line interface: verify and display licenses given by URLs on the command line.voidshowBrief(PrintStream writer)Write a brief summary of this license to a PrintStreamvoidshowDetailed(PrintStream writer)Write detailed information on this license to a PrintStreamStringtoString()
 
- 
- 
- 
Field Detail- 
UNLIMITED_CAPACITYpublic static final long UNLIMITED_CAPACITY - See Also:
- Constant Field Values
 
 - 
UNLIMITED_DURATIONpublic static final Date UNLIMITED_DURATION 
 
- 
 - 
Constructor Detail- 
LicenseInfopublic 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 - Throws:
- LicenseException
 
 
- 
 - 
Method Detail- 
checkValiditypublic void checkValidity() throws LicenseExceptionCheck the state of this LicenseInfo for basic consistency. Note that this does not check that the license is valid on the current date. - Throws:
- LicenseException
 
 - 
showBriefpublic void showBrief(PrintStream writer) Write a brief summary of this license to a PrintStream 
 - 
showDetailedpublic void showDetailed(PrintStream writer) Write detailed information on this license to a PrintStream 
 - 
describeCertificatepublic static String describeCertificate(Certificate certificate) Returns a short description of the specified certificate. 
 - 
isValidpublic 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. - Returns:
- true if the license is currently valid
 
 - 
getFrompublic Date getFrom() 
 - 
getUntilpublic Date getUntil() 
 - 
getLicenseComponentspublic LicenseComponent[] getLicenseComponents() Returns a non-empty array of LicenseComponents. 
 - 
getHostLicensedStatepublic com.opencloud.license.HostInfo.Licensed getHostLicensedState(com.opencloud.license.HostInfo host) Check whether this license allows the given host to start Rhino 
 - 
hasLicensedHostRestrictionspublic boolean hasLicensedHostRestrictions() Returns whether or not this license enforces host based restrictions 
 - 
getLicensedHostspublic com.opencloud.license.HostInfo[] getLicensedHosts() Returns the list of licensed hosts 
 - 
getCertificateInfopublic com.opencloud.license.CertificateInfo[] getCertificateInfo() Returns the certificate info contained in this license. 
 - 
getAllowedFunctionspublic String[] getAllowedFunctions() Returns the list of functions allowed by this license. This function exists mainly for backwards compatibility with existing code. 
 - 
getAllowedVersionspublic String[] getAllowedVersions() Returns the list of versions allowed by this license. This function exists mainly for backwards compatibility with existing code. 
 - 
getSerialpublic String getSerial() 
 - 
getSupercededLicensespublic String[] getSupercededLicenses() 
 - 
getIssuedTopublic String getIssuedTo() 
 
- 
 
-