com.jp.protection.pub
Class LicenseBaseImpl

java.lang.Object
  extended by com.jp.protection.pub.LicenseBaseImpl
All Implemented Interfaces:
LicenseBase, java.io.Serializable
Direct Known Subclasses:
LicenseImpl, LicenseInfo

public class LicenseBaseImpl
extends java.lang.Object
implements LicenseBase, java.io.Serializable

This class provides default implementation of the LicenseBase interface.

See Also:
Serialized Form

Field Summary
protected  int fGracePeriod
           
protected  java.util.Date fLicenseExpireDate
           
protected  java.util.Date fLicenseIssueDate
           
protected  java.lang.String fLicenseNumber
           
protected  int fLicenseOptions
           
protected  int fLicenseType
           
protected  int fNumberCopies
           
protected  java.lang.String fProduct
           
protected  java.lang.String fProductEdition
           
protected  int fProductMajorVersion
           
protected  int fProductMinorVersion
           
protected  int fUserLicensingModel
           
static long serialVersionUID
           
 
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
 
Constructor Summary
LicenseBaseImpl()
           
 
Method Summary
 int getGracePeriod()
          Returns number of days the license is still valid after reaching expiration date.
 java.util.Date getLicenseExpireDate()
          Returns license expiration date.
 java.util.Date getLicenseIssueDate()
          Returns license issue date.
 java.lang.String getLicenseNumber()
          Returns number of the license.
 int getLicenseOptions()
          Returns the license options.
 int getLicenseType()
          Returns type of the license.
 int getNumberCopies()
          Returns number of application copies allowed to concurrently run with this license.
 java.lang.String getProduct()
          Returns identifier of the product the license is issued for.
 java.lang.String getProductEdition()
          Returns identifier of the product editions the license is issued for.
 int getProductMajorVersion()
          Returns major version of the product.
 int getProductMinorVersion()
          Returns minor version of the product.
 int getUserLicensingModel()
          Returns user licensing model.
 void setGracePeriod(int aGracePeriod)
          Specifies date expiration grace period
 void setLicenseExpireDate(java.util.Date aLicenseExpireDate)
          Specifies expire date
 void setLicenseIssueDate(java.util.Date aLicenseIssueDate)
          Specifies issue date
 void setLicenseNumber(java.lang.String aLicenseNumber)
          Specifies license number
 void setLicenseOptions(int aLicenseOptions)
          Specifies license options as a combination of OPTION_ constants
 void setLicenseType(int aLicenseType)
          Specifies license type as one of TYPE_ constants
 void setNumberCopies(int aNumberCopies)
          Specifies number of copies
 void setProduct(java.lang.String aProduct)
          Specifies product identifier
 void setProductEdition(java.lang.String aProductEdition)
          Specifies product edition identifier
 void setProductMajorVersion(int aProductMajorVersion)
          Specifies product major version
 void setProductMinorVersion(int aProductMinorVersion)
          Specifies product minor version
 void setUserLicensingModel(int aUserLicensingModel)
          Specifies user licensing model as one USER_LICENSING_ of constants.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

fLicenseNumber

protected java.lang.String fLicenseNumber

fLicenseType

protected int fLicenseType

fLicenseOptions

protected int fLicenseOptions

fLicenseIssueDate

protected java.util.Date fLicenseIssueDate

fLicenseExpireDate

protected java.util.Date fLicenseExpireDate

fProduct

protected java.lang.String fProduct

fProductEdition

protected java.lang.String fProductEdition

fProductMajorVersion

protected int fProductMajorVersion

fProductMinorVersion

protected int fProductMinorVersion

fNumberCopies

protected int fNumberCopies

fGracePeriod

protected int fGracePeriod

fUserLicensingModel

protected int fUserLicensingModel
Constructor Detail

LicenseBaseImpl

public LicenseBaseImpl()
Method Detail

getGracePeriod

public int getGracePeriod()
Description copied from interface: LicenseBase
Returns number of days the license is still valid after reaching expiration date.

Specified by:
getGracePeriod in interface LicenseBase
Returns:
actual number of days or the NO_GRACE_PERIOD if there is no grace period specified.

setGracePeriod

public void setGracePeriod(int aGracePeriod)
Specifies date expiration grace period

Parameters:
aGracePeriod - grace period value in days

getLicenseExpireDate

public java.util.Date getLicenseExpireDate()
Description copied from interface: LicenseBase
Returns license expiration date.

Specified by:
getLicenseExpireDate in interface LicenseBase
Returns:
license expiration date or null if unspecified.

setLicenseExpireDate

public void setLicenseExpireDate(java.util.Date aLicenseExpireDate)
Specifies expire date

Parameters:
aLicenseExpireDate - expire date

getLicenseIssueDate

public java.util.Date getLicenseIssueDate()
Description copied from interface: LicenseBase
Returns license issue date.

Specified by:
getLicenseIssueDate in interface LicenseBase
Returns:
license issue date or null if unspecified.

setLicenseIssueDate

public void setLicenseIssueDate(java.util.Date aLicenseIssueDate)
Specifies issue date

Parameters:
aLicenseIssueDate - issue date

getLicenseNumber

public java.lang.String getLicenseNumber()
Description copied from interface: LicenseBase
Returns number of the license.

Specified by:
getLicenseNumber in interface LicenseBase
Returns:
the number of the license.

setLicenseNumber

public void setLicenseNumber(java.lang.String aLicenseNumber)
Specifies license number

Parameters:
aLicenseNumber - license number

getLicenseOptions

public int getLicenseOptions()
Description copied from interface: LicenseBase
Returns the license options. The value can be one of OPTION_ constants.

Specified by:
getLicenseOptions in interface LicenseBase
Returns:
the license options

setLicenseOptions

public void setLicenseOptions(int aLicenseOptions)
Specifies license options as a combination of OPTION_ constants

Parameters:
aLicenseOptions - license options

getLicenseType

public int getLicenseType()
Description copied from interface: LicenseBase
Returns type of the license.

Specified by:
getLicenseType in interface LicenseBase
Returns:
license type, which can be one of the TYPE_ constants.

setLicenseType

public void setLicenseType(int aLicenseType)
Specifies license type as one of TYPE_ constants

Parameters:
aLicenseType - license type

getNumberCopies

public int getNumberCopies()
Description copied from interface: LicenseBase
Returns number of application copies allowed to concurrently run with this license.

Specified by:
getNumberCopies in interface LicenseBase
Returns:
actual number of copies or the DONT_CHECK if any (unlimited).

setNumberCopies

public void setNumberCopies(int aNumberCopies)
Specifies number of copies

Parameters:
aNumberCopies - number of copies value

getProduct

public java.lang.String getProduct()
Description copied from interface: LicenseBase
Returns identifier of the product the license is issued for.

Specified by:
getProduct in interface LicenseBase
Returns:
identifier of the product.

setProduct

public void setProduct(java.lang.String aProduct)
Specifies product identifier

Parameters:
aProduct - product identifier

getProductEdition

public java.lang.String getProductEdition()
Description copied from interface: LicenseBase
Returns identifier of the product editions the license is issued for.

Specified by:
getProductEdition in interface LicenseBase
Returns:
identifier of the product edition.

setProductEdition

public void setProductEdition(java.lang.String aProductEdition)
Specifies product edition identifier

Parameters:
aProductEdition - product edition identifier

getProductMajorVersion

public int getProductMajorVersion()
Description copied from interface: LicenseBase
Returns major version of the product.

Specified by:
getProductMajorVersion in interface LicenseBase
Returns:
major version number

setProductMajorVersion

public void setProductMajorVersion(int aProductMajorVersion)
Specifies product major version

Parameters:
aProductMajorVersion - product major version

getProductMinorVersion

public int getProductMinorVersion()
Description copied from interface: LicenseBase
Returns minor version of the product.

Specified by:
getProductMinorVersion in interface LicenseBase
Returns:
minor version number

setProductMinorVersion

public void setProductMinorVersion(int aProductMinorVersion)
Specifies product minor version

Parameters:
aProductMinorVersion - product minor version

getUserLicensingModel

public int getUserLicensingModel()
Description copied from interface: LicenseBase
Returns user licensing model.

Specified by:
getUserLicensingModel in interface LicenseBase
Returns:
user licensing model as on of USER_LICENSING_ constants.

setUserLicensingModel

public void setUserLicensingModel(int aUserLicensingModel)
Specifies user licensing model as one USER_LICENSING_ of constants.

Parameters:
aUserLicensingModel - user licensing model value