com.jp.protection.pub
Interface License

All Superinterfaces:
LicenseBase
All Known Implementing Classes:
LicenseImpl

public interface License
extends LicenseBase

This class extends "basic license" abstraction by providing additional information that describes license state obtained during license check and validation. Such information can be used by application to decide whether particular functionality or even application as whole is allowed to run.


Field Summary
static int CASE_COMMERCIAL_ENABLED
          Specifies case of valid commercial license (Professional Edition only)
static int CASE_ENABLED
          Specifies case of valid license (Standard Edition only)
static int CASE_EVALUATION_ENABLED
          Specifies case of valid evaluation license
static int CASE_EXPIRED_ENABLED
          Specifies case of expired commercial license
static int CASE_EXPIRED_EVALUATION_ENABLED
          Specifies case of expired evaluation license
static int CASE_INVALID_ENABLED
          Specifies case of invalid license
static int KIND_NEW
          Defines NEW Kind of a license.
static int KIND_UPGRADE
          Defines UPGRADE Kind of a license.
static int NO_LIMIT
           
static int NO_USAGE_LIMIT
           
static java.lang.String PREFIX
          Defines prefix for standard license properties
static java.lang.String PROPERTY_ACTIVATION_GRACE_PERIOD
          Defines property name for storing activation grace period
static java.lang.String PROPERTY_ACTIVATION_KEY
          Defines property name for storing activation key
static java.lang.String PROPERTY_ADDRESS
           
static java.lang.String PROPERTY_CHECKOUT_PERIOD
          Defines property name for storing checkout period
static java.lang.String PROPERTY_CITY
           
static java.lang.String PROPERTY_COMPANY
           
static java.lang.String PROPERTY_COUNTRY
           
static java.lang.String PROPERTY_CPU_LIMIT
          Defines property name for storing CPU/Core limit
static java.lang.String PROPERTY_EMAIL
           
static java.lang.String PROPERTY_FIRST_NAME
           
static java.lang.String PROPERTY_LAST_NAME
           
static java.lang.String PROPERTY_LICENSE_KIND
          Defines property name for storing license kind
static java.lang.String PROPERTY_LICENSING_SERVER_ADDRESS
          Defines property name for storing Licensing Server address
static java.lang.String PROPERTY_LOCK_GRACE_PERIOD
          Defines property name for storing lock grace period
static java.lang.String PROPERTY_LOCK_PERIOD
          Defines property name for storing lock period
static java.lang.String PROPERTY_MAIN_LICENSE
          Defines property name for storing a reference to a main license (as a License Number)
static java.lang.String PROPERTY_MEMORY_LIMIT
          Defines property name for storing memory limit
static java.lang.String PROPERTY_PHONE
           
static java.lang.String PROPERTY_PREV_LICENSE_MAJOR_VERSION
           
static java.lang.String PROPERTY_PREV_LICENSE_MINOR_PRODUCT_EDITIONS
           
static java.lang.String PROPERTY_PREV_LICENSE_MINOR_VERSION
           
static java.lang.String PROPERTY_SERIAL_NUMBER
          Defines property name for storing serial number
static java.lang.String PROPERTY_STATE
           
static java.lang.String PROPERTY_TITLE
           
static java.lang.String PROPERTY_USAGE_GRACE_PERIOD
          Defines property name for storing usage grace period
static java.lang.String PROPERTY_USAGE_LIMIT
          Defines property name for storing usage count limit
static java.lang.String PROPERTY_ZIP
           
static int STATE_EXPIRED
          Defines expired state of the license, which means that license is already expired.
static int STATE_INVALID
          Defines invalid state of the license.
static int STATE_LOCK_VIOLATED
          Defines that license is a valid one but it has been locked to a different computer system.
static int STATE_NOT_ACTIVATED
          Defines not activated state of the license, which means that license is either a valid commercial license or a not yet expired evaluation that needs to be activated.
static int STATE_NOT_LOCKED
          Defines the not-locked state of the license.
static int STATE_OK
          Defines OK state of the license, which means that license is either a valid commercial license or not yet expired evaluation.
static int STATE_UNKNOWN
          Defines unknown state of the license, which means that license just been read and is not checked or validated yet.
 
Fields inherited from interface com.jp.protection.pub.LicenseBase
NO_GRACE_PERIOD, OPTION_CHECK_NUMBER_OF_COPIES, OPTION_COUNT_ANY_HOSTS, OPTION_COUNT_DIFF_HOSTS, OPTION_DISALLOW_SEVERAL_COPIES_SAME_HOST, OPTION_REQUIRE_ACTIVATION, OPTION_REQUIRE_ACTIVATION_LOCK, OPTION_REQUIRE_USER_INFO, PROPERTIES, PROPERTY_GRACE_PERIOD, PROPERTY_LICENSE_EXPIRE_DATE, PROPERTY_LICENSE_ISSUE_DATE, PROPERTY_LICENSE_NUMBER, PROPERTY_LICENSE_OPTIONS, PROPERTY_LICENSE_TYPE, PROPERTY_NUMBER_COPIES, PROPERTY_PRODUCT, PROPERTY_PRODUCT_EDITION, PROPERTY_PRODUCT_MAJOR_VERSION, PROPERTY_PRODUCT_MINOR_VERSION, PROPERTY_USER_LICENSING_MODEL, TYPE_COMMERCIAL, TYPE_EVALUATION, TYPE_EXTENDED_EVALUATION, USER_LICENSING_FLOATING, USER_LICENSING_FLOATING_LS, USER_LICENSING_NAMED, USER_LICENSING_NAMED_LS, USER_LICENSING_UNCOUNTED, USER_LICENSING_UNKNOWN
 
Method Summary
 int getActivationGracePeriod()
          Returns activation grace period (in days) for the license
 java.lang.String getActivationKey()
          Returns activation key of the license
 int getCheckoutPeriod()
          Returns period in days the license is allowed to work offline after checkout without need to obtain/renew lock from the Licensing Server (applicable for USER_LICENSING_NAMED_LS model only)
 int getCPULimit()
          Returns CPU/Cores limit
 int getLicenseKind()
          Returns kind of a license
 java.lang.String getLicenseLocation()
          Returns location of the license
 int getLicenseState()
          Returns the state of the license
 java.lang.String getLicenseText()
          Returns the license agreement text.
 java.lang.String getLicensingServerAddress()
          Returns address of Licensing Server in form of IP address or domain name.
 int getLockGracePeriod()
          Returns lock grace period (in days) for the license
 int getLockPeriod()
          Returns period in days the license must retain lock to a particular user (applicable for USER_LICENSING_NAMED_LS model only)
 long getMemoryLimit()
          Returns memory limit in bytes
 int getPrevLicenseMajorVersion()
          Returns major version of previous license required for the Upgrade kind of license
 int getPrevLicenseMinorVersion()
          Returns minor version of previous license required for the Upgrade kind of license
 java.util.List<java.lang.String> getPrevLicenseProductEditions()
          Returns product editions of previous license required for Upgrade kind of license
 java.util.Collection getProductFeatureNames()
          Returns product features' identifiers contained in the license.
 java.lang.String getProperty(java.lang.String aName, java.lang.String aDefault)
          Gets license property by its name
 java.util.Collection getPropertyNames()
          Returns the names of the properties contained in the license
 java.lang.String getSerialNumber()
          Returns serial number for the license
 int getUsageGracePeriod()
          Returns usage grace period (in usages) for the license
 int getUsageLimit()
          Returns usage limit for the license
 boolean isProductFeatureInLicense(java.lang.String aFeature)
          Checks whether certain product feature (functionality) is included into the license.
 boolean isProductFeatureSupported(java.lang.String aFeature)
          Checks whether certain product feature (functionality) is supported (allowed to be used) by the license.
 boolean isProductFeatureSupported(java.lang.String aFeature, int aCase)
          Checks whether specified feature is supported for the given license type and state combination.
 
Methods inherited from interface com.jp.protection.pub.LicenseBase
getGracePeriod, getLicenseExpireDate, getLicenseIssueDate, getLicenseNumber, getLicenseOptions, getLicenseType, getNumberCopies, getProduct, getProductEdition, getProductMajorVersion, getProductMinorVersion, getUserLicensingModel
 

Field Detail

PROPERTY_LICENSING_SERVER_ADDRESS

static final java.lang.String PROPERTY_LICENSING_SERVER_ADDRESS
Defines property name for storing Licensing Server address

See Also:
Constant Field Values

PROPERTY_ACTIVATION_KEY

static final java.lang.String PROPERTY_ACTIVATION_KEY
Defines property name for storing activation key

See Also:
Constant Field Values

PROPERTY_ACTIVATION_GRACE_PERIOD

static final java.lang.String PROPERTY_ACTIVATION_GRACE_PERIOD
Defines property name for storing activation grace period

See Also:
Constant Field Values

PROPERTY_LOCK_GRACE_PERIOD

static final java.lang.String PROPERTY_LOCK_GRACE_PERIOD
Defines property name for storing lock grace period

See Also:
Constant Field Values

PROPERTY_SERIAL_NUMBER

static final java.lang.String PROPERTY_SERIAL_NUMBER
Defines property name for storing serial number

See Also:
Constant Field Values

PROPERTY_USAGE_GRACE_PERIOD

static final java.lang.String PROPERTY_USAGE_GRACE_PERIOD
Defines property name for storing usage grace period

See Also:
Constant Field Values

PROPERTY_USAGE_LIMIT

static final java.lang.String PROPERTY_USAGE_LIMIT
Defines property name for storing usage count limit

See Also:
Constant Field Values

PREFIX

static final java.lang.String PREFIX
Defines prefix for standard license properties

See Also:
Constant Field Values

PROPERTY_MAIN_LICENSE

static final java.lang.String PROPERTY_MAIN_LICENSE
Defines property name for storing a reference to a main license (as a License Number)

Since:
4.8.0
See Also:
Constant Field Values

PROPERTY_CPU_LIMIT

static final java.lang.String PROPERTY_CPU_LIMIT
Defines property name for storing CPU/Core limit

Since:
5.0.0
See Also:
Constant Field Values

PROPERTY_MEMORY_LIMIT

static final java.lang.String PROPERTY_MEMORY_LIMIT
Defines property name for storing memory limit

Since:
5.0.0
See Also:
Constant Field Values

PROPERTY_LOCK_PERIOD

static final java.lang.String PROPERTY_LOCK_PERIOD
Defines property name for storing lock period

Since:
5.0.0
See Also:
Constant Field Values

PROPERTY_CHECKOUT_PERIOD

static final java.lang.String PROPERTY_CHECKOUT_PERIOD
Defines property name for storing checkout period

Since:
5.0.0
See Also:
Constant Field Values

PROPERTY_LICENSE_KIND

static final java.lang.String PROPERTY_LICENSE_KIND
Defines property name for storing license kind

Since:
v5.0
See Also:
Constant Field Values

PROPERTY_PREV_LICENSE_MAJOR_VERSION

static final java.lang.String PROPERTY_PREV_LICENSE_MAJOR_VERSION
Since:
v5.0
See Also:
Constant Field Values

PROPERTY_PREV_LICENSE_MINOR_VERSION

static final java.lang.String PROPERTY_PREV_LICENSE_MINOR_VERSION
Since:
v5.0
See Also:
Constant Field Values

PROPERTY_PREV_LICENSE_MINOR_PRODUCT_EDITIONS

static final java.lang.String PROPERTY_PREV_LICENSE_MINOR_PRODUCT_EDITIONS
Since:
v5.0
See Also:
Constant Field Values

PROPERTY_FIRST_NAME

static final java.lang.String PROPERTY_FIRST_NAME
See Also:
Constant Field Values

PROPERTY_LAST_NAME

static final java.lang.String PROPERTY_LAST_NAME
See Also:
Constant Field Values

PROPERTY_TITLE

static final java.lang.String PROPERTY_TITLE
See Also:
Constant Field Values

PROPERTY_COMPANY

static final java.lang.String PROPERTY_COMPANY
See Also:
Constant Field Values

PROPERTY_PHONE

static final java.lang.String PROPERTY_PHONE
See Also:
Constant Field Values

PROPERTY_EMAIL

static final java.lang.String PROPERTY_EMAIL
See Also:
Constant Field Values

PROPERTY_ADDRESS

static final java.lang.String PROPERTY_ADDRESS
See Also:
Constant Field Values

PROPERTY_CITY

static final java.lang.String PROPERTY_CITY
See Also:
Constant Field Values

PROPERTY_ZIP

static final java.lang.String PROPERTY_ZIP
See Also:
Constant Field Values

PROPERTY_STATE

static final java.lang.String PROPERTY_STATE
See Also:
Constant Field Values

PROPERTY_COUNTRY

static final java.lang.String PROPERTY_COUNTRY
See Also:
Constant Field Values

NO_LIMIT

static final int NO_LIMIT
See Also:
Constant Field Values

NO_USAGE_LIMIT

static final int NO_USAGE_LIMIT
See Also:
Constant Field Values

STATE_UNKNOWN

static final int STATE_UNKNOWN
Defines unknown state of the license, which means that license just been read and is not checked or validated yet.

See Also:
Constant Field Values

STATE_OK

static final int STATE_OK
Defines OK state of the license, which means that license is either a valid commercial license or not yet expired evaluation.

See Also:
Constant Field Values

STATE_EXPIRED

static final int STATE_EXPIRED
Defines expired state of the license, which means that license is already expired.

See Also:
Constant Field Values

STATE_INVALID

static final int STATE_INVALID
Defines invalid state of the license.

See Also:
Constant Field Values

STATE_NOT_ACTIVATED

static final int STATE_NOT_ACTIVATED
Defines not activated state of the license, which means that license is either a valid commercial license or a not yet expired evaluation that needs to be activated.

See Also:
Constant Field Values

STATE_LOCK_VIOLATED

static final int STATE_LOCK_VIOLATED
Defines that license is a valid one but it has been locked to a different computer system.

See Also:
Constant Field Values

STATE_NOT_LOCKED

static final int STATE_NOT_LOCKED
Defines the not-locked state of the license. The not-locked state means that the license is either a valid commercial license or a not yet expired evaluation license that needs to be locked using the Licensing Server.

Since:
3.0
See Also:
Constant Field Values

CASE_ENABLED

static final int CASE_ENABLED
Specifies case of valid license (Standard Edition only)

See Also:
Constant Field Values

CASE_COMMERCIAL_ENABLED

static final int CASE_COMMERCIAL_ENABLED
Specifies case of valid commercial license (Professional Edition only)

See Also:
Constant Field Values

CASE_EVALUATION_ENABLED

static final int CASE_EVALUATION_ENABLED
Specifies case of valid evaluation license

See Also:
Constant Field Values

CASE_EXPIRED_ENABLED

static final int CASE_EXPIRED_ENABLED
Specifies case of expired commercial license

See Also:
Constant Field Values

CASE_EXPIRED_EVALUATION_ENABLED

static final int CASE_EXPIRED_EVALUATION_ENABLED
Specifies case of expired evaluation license

See Also:
Constant Field Values

CASE_INVALID_ENABLED

static final int CASE_INVALID_ENABLED
Specifies case of invalid license

See Also:
Constant Field Values

KIND_NEW

static final int KIND_NEW
Defines NEW Kind of a license. Such licenses don't impose additional requirements for been valid

Since:
v5.0
See Also:
Constant Field Values

KIND_UPGRADE

static final int KIND_UPGRADE
Defines UPGRADE Kind of a license. Upgrade licenses require existence of licenses of previous versions for been valid

Since:
v5.0
See Also:
Constant Field Values
Method Detail

getLicenseState

int getLicenseState()
Returns the state of the license

Returns:
the state of the license; can be one of the STATE_constants

isProductFeatureInLicense

boolean isProductFeatureInLicense(java.lang.String aFeature)
Checks whether certain product feature (functionality) is included into the license.

Parameters:
aFeature - identifier of a feature to check
Returns:
true if feature is included into the license, false otherwise.

isProductFeatureSupported

boolean isProductFeatureSupported(java.lang.String aFeature)
Checks whether certain product feature (functionality) is supported (allowed to be used) by the license. It is equivalent to a call to the isProductFeatureSupported(aFeature, CASE_ENABLED) for Standard Edition or isProductFeatureSupported(aFeature, CASE_COMMERCIAL_ENABLED) for Professional Edition.

Parameters:
aFeature - identifier of a feature to check
Returns:
true if feature is supported by the license, false otherwise. If feature is not found in the license it is considered to be unsupported.

isProductFeatureSupported

boolean isProductFeatureSupported(java.lang.String aFeature,
                                  int aCase)
Checks whether specified feature is supported for the given license type and state combination.

Parameters:
aFeature - identifier of a feature to check
aCase - defines license type and state combination to check a feature against to. Should be one of the CASE_ constants.
Returns:
true if product feature is supported, false otherwise

getProductFeatureNames

java.util.Collection getProductFeatureNames()
Returns product features' identifiers contained in the license.

Returns:
an array that holds product features contained in the license

getLicenseText

java.lang.String getLicenseText()
Returns the license agreement text. Typically this text can be shown in the appropriate license dialog where the user should read and accept it. In most of the cases license text is provided by the application but having one in the license allows superceding it. This allows providing custom licenses without need to recompile application.

Returns:
text of the license agreement.

getLicenseLocation

java.lang.String getLicenseLocation()
Returns location of the license

Returns:
location of the license

getProperty

java.lang.String getProperty(java.lang.String aName,
                             java.lang.String aDefault)
Gets license property by its name

Parameters:
aName - property name
aDefault - default property value used if property is not found in the license
Returns:
property value or the aDefault value if property is not found in the license

getPropertyNames

java.util.Collection getPropertyNames()
Returns the names of the properties contained in the license

Returns:
names of the properties contained in the license

getActivationKey

java.lang.String getActivationKey()
Returns activation key of the license

Returns:
activation key

getActivationGracePeriod

int getActivationGracePeriod()
Returns activation grace period (in days) for the license

Returns:
activation grace period value or NO_GRACE_PERIOD if no grace period is allowed

getLockGracePeriod

int getLockGracePeriod()
Returns lock grace period (in days) for the license

Returns:
lock grace period value or NO_GRACE_PERIOD if no grace period is allowed

getSerialNumber

java.lang.String getSerialNumber()
Returns serial number for the license

Returns:
serial number

getLicensingServerAddress

java.lang.String getLicensingServerAddress()
Returns address of Licensing Server in form of IP address or domain name.

Returns:
address of Licensing Server

getUsageLimit

int getUsageLimit()
Returns usage limit for the license

Returns:
usage limit

getUsageGracePeriod

int getUsageGracePeriod()
Returns usage grace period (in usages) for the license

Returns:
usage grace period value or NO_GRACE_PERIOD if no grace period is allowed

getCPULimit

int getCPULimit()
Returns CPU/Cores limit

Returns:
CPU/Cores limit
Since:
v5.0

getMemoryLimit

long getMemoryLimit()
Returns memory limit in bytes

Returns:
memory limit in bytes
Since:
v5.0

getLockPeriod

int getLockPeriod()
Returns period in days the license must retain lock to a particular user (applicable for USER_LICENSING_NAMED_LS model only)

Returns:
period in days
Since:
v5.0

getCheckoutPeriod

int getCheckoutPeriod()
Returns period in days the license is allowed to work offline after checkout without need to obtain/renew lock from the Licensing Server (applicable for USER_LICENSING_NAMED_LS model only)

Returns:
period in days; 0 if checkout is not allowed
Since:
v5.0

getLicenseKind

int getLicenseKind()
Returns kind of a license

Returns:
license kind as one of KIND_ constants
Since:
v5.0

getPrevLicenseMajorVersion

int getPrevLicenseMajorVersion()
Returns major version of previous license required for the Upgrade kind of license

Returns:
major version
Since:
v5.0

getPrevLicenseMinorVersion

int getPrevLicenseMinorVersion()
Returns minor version of previous license required for the Upgrade kind of license

Returns:
minor version
Since:
v5.0

getPrevLicenseProductEditions

java.util.List<java.lang.String> getPrevLicenseProductEditions()
Returns product editions of previous license required for Upgrade kind of license

Returns:
minor version
Since:
v5.0