public class OCLicenseManager
extends java.lang.Object
Copyright © Technology Services Group, Inc.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LICENSE_EXPIRING_SOON |
static java.lang.String |
LICENSE_INVALID |
static java.lang.String |
LICENSE_INVALID_EXPIRED |
static java.lang.String |
LICENSE_INVALID_TOO_MANY_USERS |
static java.lang.String |
LICENSE_SERVER_ERROR |
static java.lang.String |
LICENSE_TYPE_FLOATING |
static java.lang.String |
LICENSE_TYPE_TEXT |
static java.lang.String |
LICENSE_VALID |
Modifier and Type | Method and Description |
---|---|
boolean |
addLicense(java.lang.String licenseString,
java.lang.String licenseType)
Adds a license to OC.
|
int |
getDaysLeftUntilExpired()
Gets the amount of days left on the license until expiration.
|
static OCLicenseManager |
getInstance()
Retrieves the license manager instance and attempts to validate it if one of the following occurs:
The license was never validated previously
A previously validated license exits the idle period
The license was marked invalid
|
OCMSLicenseInfo |
getLicenseDetails()
Gets the details for the current OCMS license, preferring the floating license first
|
java.lang.String |
getOCLicenseStatus()
Gets the current license status for OC.
|
static boolean |
validateOAUser(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String ticket)
Checks that the user has permission to use the OA viewer mode on the request
To use a read-only viewer, the user must be in either the viewers or annotators group
To use any other viewer, the user must be in the annotators group
|
java.lang.String |
validateOCLicense()
Validates the OC license.
|
public static final java.lang.String LICENSE_VALID
public static final java.lang.String LICENSE_EXPIRING_SOON
public static final java.lang.String LICENSE_INVALID_EXPIRED
public static final java.lang.String LICENSE_INVALID_TOO_MANY_USERS
public static final java.lang.String LICENSE_SERVER_ERROR
public static final java.lang.String LICENSE_INVALID
public static final java.lang.String LICENSE_TYPE_TEXT
public static final java.lang.String LICENSE_TYPE_FLOATING
public static OCLicenseManager getInstance()
OCLicenseManager
public java.lang.String getOCLicenseStatus()
public int getDaysLeftUntilExpired()
public java.lang.String validateOCLicense()
public static boolean validateOAUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String ticket) throws java.io.IOException
request
- response
- ticket
- java.io.IOException
public boolean addLicense(java.lang.String licenseString, java.lang.String licenseType)
licenseString
- the license textlicenseType
- the type of the license LICENSE_TYPE_FLOATING
or LICENSE_TYPE_TEXT
public OCMSLicenseInfo getLicenseDetails() throws java.text.ParseException
java.text.ParseException