Package COM.activesw.api.client
Class BrokerLicense
- java.lang.Object
-
- COM.activesw.api.client.BrokerLicense
-
public class BrokerLicense extends java.lang.Object
This class is used to validate runtime licenses and to parse information out of the runtime license key string.
-
-
Field Summary
Fields Modifier and Type Field Description static int
PLATFORM_ANY
static int
PLATFORM_HPUX
static int
PLATFORM_IRIX
static int
PLATFORM_SOLARIS
static int
PLATFORM_WINDOWS
static int
VALIDATE_BAD_LICENSE
static int
VALIDATE_BAD_PLATFORM
static int
VALIDATE_BAD_PRODUCT
static int
VALIDATE_BAD_VERSION
static int
VALIDATE_EXPIRED
static int
VALIDATE_OKAY
-
Constructor Summary
Constructors Constructor Description BrokerLicense()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BrokerDate
getExpiration(java.lang.String license_string)
Get expiration date.static java.lang.String[]
getFlags(java.lang.String license_string)
Get the set of flag strings in the license.static int
getMajorVersion(java.lang.String license_string)
Get the major version the license is for.static int
getMinorVersion(java.lang.String license_string)
Get the minor version the license is for.static int
getPlatform(java.lang.String license_string)
Get the platform the license is for.static java.lang.String
getProduct(java.lang.String license_string)
Get the product the license is for.static long
getSerialNumber(java.lang.String license_string)
Get the serial number of the license.static int
simpleValidate(java.lang.String license_string)
Determines if the license format is valid, but does not fully validate the license.
-
-
-
Field Detail
-
PLATFORM_ANY
public static final int PLATFORM_ANY
- See Also:
- Constant Field Values
-
PLATFORM_WINDOWS
public static final int PLATFORM_WINDOWS
- See Also:
- Constant Field Values
-
PLATFORM_SOLARIS
public static final int PLATFORM_SOLARIS
- See Also:
- Constant Field Values
-
PLATFORM_IRIX
public static final int PLATFORM_IRIX
- See Also:
- Constant Field Values
-
PLATFORM_HPUX
public static final int PLATFORM_HPUX
- See Also:
- Constant Field Values
-
VALIDATE_OKAY
public static final int VALIDATE_OKAY
- See Also:
- Constant Field Values
-
VALIDATE_BAD_LICENSE
public static final int VALIDATE_BAD_LICENSE
- See Also:
- Constant Field Values
-
VALIDATE_BAD_PLATFORM
public static final int VALIDATE_BAD_PLATFORM
- See Also:
- Constant Field Values
-
VALIDATE_EXPIRED
public static final int VALIDATE_EXPIRED
- See Also:
- Constant Field Values
-
VALIDATE_BAD_PRODUCT
public static final int VALIDATE_BAD_PRODUCT
- See Also:
- Constant Field Values
-
VALIDATE_BAD_VERSION
public static final int VALIDATE_BAD_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
simpleValidate
public static int simpleValidate(java.lang.String license_string)
Determines if the license format is valid, but does not fully validate the license. This includes a an expiration date test for evaluation licenses. Note: This method requires access to a native shared library. Returns VALIDATE_OKAY on success, VALIDATE_BAD_LICENSE on a format error or VALIDATE_EXPIRED on expiration.
-
getProduct
public static java.lang.String getProduct(java.lang.String license_string) throws BrokerException
Get the product the license is for. Throws an exception if there is an error parsing the license string.- Throws:
BrokerException
-
getPlatform
public static int getPlatform(java.lang.String license_string) throws BrokerException
Get the platform the license is for. See the PLATFORM_* constants. The value is a bitmask. Throws an exception if there is an error parsing the license string.- Throws:
BrokerException
-
getMajorVersion
public static int getMajorVersion(java.lang.String license_string) throws BrokerException
Get the major version the license is for. For example, the '2.1' release's major version is '2'. Returns zero(0) if "don't care" has been set for the major version. Throws an exception if there is an error parsing the license string.- Throws:
BrokerException
-
getMinorVersion
public static int getMinorVersion(java.lang.String license_string) throws BrokerException
Get the minor version the license is for. For example, the '2.1' release's minor version is '1'. Returns minus one(-1) if "don't care" has been set for the minor version. Throws an exception if there is an error parsing the license string.- Throws:
BrokerException
-
getExpiration
public static BrokerDate getExpiration(java.lang.String license_string) throws BrokerException
Get expiration date. Returns null if this is not an evaluation license and therefore does not expire. Throws an exception if there is an error parsing the license string.- Throws:
BrokerException
-
getSerialNumber
public static long getSerialNumber(java.lang.String license_string) throws BrokerException
Get the serial number of the license. Throws an exception if there is an error parsing the license string.- Throws:
BrokerException
-
getFlags
public static java.lang.String[] getFlags(java.lang.String license_string) throws BrokerException
Get the set of flag strings in the license. Throws an exception if there is an error parsing the license string.- Throws:
BrokerException
-
-