com.vs.ezlicgen
Class EzLicenseConfig

java.lang.Object
  extended bycom.vs.ezlicgen.EzLicenseConfig
All Implemented Interfaces:
java.io.Serializable

public class EzLicenseConfig
extends java.lang.Object
implements java.io.Serializable

The class manages the state of the configuration information pertaining to a license manager installation. This includes information such as the license key, key installation date, registration status, license agreement acceptance status, quota balance etc.
The class (or a subclass if needed) is persisted by the License Manager GUI in its ezconfig license configuration file.

See Also:
Serialized Form

Field Summary
static java.lang.String EZCONFIG_FILENAME
           
static int EZCONFIG_VSNID
           
static java.lang.String EZCONFIG_VSNIDSTR
           
 
Constructor Summary
EzLicenseConfig()
           
 
Method Summary
static boolean checkFileExists()
          checkFileExists: Check whether a valid configuration file exists.
 java.lang.String getCompanyName()
          getCompanyName: return ISV company name
 boolean getECommerce()
          getECommerce: return whether ecommerce option
 int getEdition()
          getEdition: return standard / pro edition code
 boolean getEval()
          getEval: return whether eval edition
 java.util.Date getExpireDate()
          getExpireDate: return current license key expiration date
 java.lang.String getHostName()
          getHostName: return host name
 java.util.Date getInstallDate()
          getInstallDate: return date of product installation.
 java.lang.String getInstallDir()
          getInstallDir: return installation directory
 java.util.Date getLastUseDate()
          getLastUseDate: return the date the api's were last used
 java.util.Date getLicenseAcceptDate()
          getLicenseAcceptDate: return date of vendor product license agreement acceptance
 java.lang.String getLicenseKey()
          getLicenseKey: return vendor license key
 int getLicenseMode()
          getLicenseMode: return vendor license mode
 boolean getNoRegReminder()
          getNoRegReminder: return registration-reminder indicator
 java.lang.String getOptions()
          getOptions: return vendor license options
 long getQuotaBalance()
          getQuotaBalance: return license unit quota balance
 long getQuotaLast()
          getQuotaLast: return license unit quota last allocated
 long getQuotaToDate()
          getQuotaToDate: return license unit quota allocated to date
 java.util.Date getRegisterDate()
          getRegisterDate: return date of product registration
 java.util.Date getUpgradeDate()
          getUpgradeDate: return last date of license key upgrade
 java.lang.String getUserName()
          getUserName: return ISV user name
 java.lang.String getVendorDomain()
          getVendorDomain: return vendor DNS domain name
 EzLicenseVendorLuPolicy getVendorLuPolicy()
          getVendorLuPolicy: return vendor license unit policy class
 java.lang.String getVendorPhone()
          getVendorPhone: return vendor support phone
 int getVsnId()
          getVsnId: return config version id.
static EzLicenseConfig loadConfig()
          loadConfig: factory method to load the vendor license configuration from the "ezconfig" file located at the current working directory.
static void removeConfig(java.lang.String vendorPassword)
          Private - for internal use only
 void saveConfig(java.lang.String vendorPassword)
          Private - for internal use only
 void setCompanyName(java.lang.String companyName)
          setCompanyName: sets ISV company name
 void setECommerce(boolean eCommerce)
          setECommerce: sets eCommerce-option flag
 void setEdition(int edition)
          setEdition: sets standard/pro edition code
 void setEval(boolean eval)
          setEval: sets eval-edition flag
 void setExpireDate(java.util.Date expireDate)
          setExpireDate: sets current key expiration date
 void setHostName(java.lang.String hostName)
          setHostName: sets host name
 void setInstallDate(java.util.Date installDate)
          setInstallDate: sets date of product installation.
 void setInstallDir(java.lang.String installDir)
          setInstallDir: sets installation directory
 void setLastUseDate(java.util.Date lastUseDate)
          setLastUseDate: sets date of last use of api's
 void setLicenseAcceptDate(java.util.Date licenseAcceptDate)
          setLicenseAcceptDate: sets date of vendor product license agreement acceptance
 void setLicenseKey(java.lang.String licenseKey)
          setLicenseKey: sets vendor license key
 void setLicenseMode(int licenseMode)
          setLicenseMode: sets getLicenseMode
 void setNoRegReminder(boolean noRegReminder)
          setNoRegReminder: sets no-registration-reminder indicator
 void setOptions(java.lang.String options)
          setOptions: sets vendor license options
 void setQuotaBalance(long quotaBalance)
          setQuotaBalance: sets license unit quota balance
 void setQuotaLast(long quotaLast)
          setQuotaLast: sets license unit quota last allocated
 void setQuotaToDate(long quotaToDate)
          setQuotaToDate: sets license unit quota allocated to date
 void setRegisterDate(java.util.Date registerDate)
          setRegisterDate: sets date of product registration
 void setUpgradeDate(java.util.Date upgradeDate)
          setUpgradeDate: sets last date of license key upgrade
 void setUserName(java.lang.String userName)
          setUserName: sets ISV user name
 void setVendorDomain(java.lang.String vendorDomain)
          setVendorDomain: sets vendor domain DNS name
 void setVendorLuPolicy(EzLicenseVendorLuPolicy vendorLuPolicy)
          setVendorLuPolicy: set vendor license unit policy class
 void setVendorPhone(java.lang.String vendorPhone)
          setVendorPhone: sets vendor support phone number
 void setVsnId(int vsnId)
          setVsnId: sets version id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EZCONFIG_VSNID

public static final int EZCONFIG_VSNID
See Also:
Constant Field Values

EZCONFIG_VSNIDSTR

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

EZCONFIG_FILENAME

public static final java.lang.String EZCONFIG_FILENAME
See Also:
Constant Field Values
Constructor Detail

EzLicenseConfig

public EzLicenseConfig()
Method Detail

getVsnId

public int getVsnId()
getVsnId: return config version id.

Returns:
config 4-digit version id.

getLicenseKey

public java.lang.String getLicenseKey()
getLicenseKey: return vendor license key

Returns:
vendor license key

getInstallDir

public java.lang.String getInstallDir()
getInstallDir: return installation directory

Returns:
installation directory

getHostName

public java.lang.String getHostName()
getHostName: return host name

Returns:
host name

getLicenseMode

public int getLicenseMode()
getLicenseMode: return vendor license mode

Returns:
vendor license mode

getOptions

public java.lang.String getOptions()
getOptions: return vendor license options

Returns:
license options

getEdition

public int getEdition()
getEdition: return standard / pro edition code

Returns:
standard / pro edition code

getEval

public boolean getEval()
getEval: return whether eval edition

Returns:
whether eval edition

getECommerce

public boolean getECommerce()
getECommerce: return whether ecommerce option

Returns:
whether ecommerce option

getUserName

public java.lang.String getUserName()
getUserName: return ISV user name

Returns:
ISV user name

getCompanyName

public java.lang.String getCompanyName()
getCompanyName: return ISV company name

Returns:
ISV company name

getVendorDomain

public java.lang.String getVendorDomain()
getVendorDomain: return vendor DNS domain name

Returns:
vendor DNS domain name

getVendorPhone

public java.lang.String getVendorPhone()
getVendorPhone: return vendor support phone

Returns:
vendor support phone

getInstallDate

public java.util.Date getInstallDate()
getInstallDate: return date of product installation.

Returns:
product installation date

getUpgradeDate

public java.util.Date getUpgradeDate()
getUpgradeDate: return last date of license key upgrade

Returns:
date of upgrade

getExpireDate

public java.util.Date getExpireDate()
getExpireDate: return current license key expiration date

Returns:
license key expiration date

getRegisterDate

public java.util.Date getRegisterDate()
getRegisterDate: return date of product registration

Returns:
registration date

getLastUseDate

public java.util.Date getLastUseDate()
getLastUseDate: return the date the api's were last used

Returns:
date api's were last used

getNoRegReminder

public boolean getNoRegReminder()
getNoRegReminder: return registration-reminder indicator

Returns:
registration-reminder indicator

getLicenseAcceptDate

public java.util.Date getLicenseAcceptDate()
getLicenseAcceptDate: return date of vendor product license agreement acceptance

Returns:
license agreement acceptance date

getQuotaToDate

public long getQuotaToDate()
getQuotaToDate: return license unit quota allocated to date

Returns:
allocated quota to date.

getQuotaLast

public long getQuotaLast()
getQuotaLast: return license unit quota last allocated

Returns:
last allocated quota.

getQuotaBalance

public long getQuotaBalance()
getQuotaBalance: return license unit quota balance

Returns:
quota balance

getVendorLuPolicy

public EzLicenseVendorLuPolicy getVendorLuPolicy()
getVendorLuPolicy: return vendor license unit policy class

Returns:
vendor license unit policy

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey)
setLicenseKey: sets vendor license key

Parameters:
licenseKey - vendor license key

setVsnId

public void setVsnId(int vsnId)
setVsnId: sets version id

Parameters:
vsnId - version id to set to

setInstallDir

public void setInstallDir(java.lang.String installDir)
setInstallDir: sets installation directory

Parameters:
installDir - installation directory

setHostName

public void setHostName(java.lang.String hostName)
setHostName: sets host name

Parameters:
hostName - host name

setLicenseMode

public void setLicenseMode(int licenseMode)
setLicenseMode: sets getLicenseMode

Parameters:
licenseMode - license mode

setOptions

public void setOptions(java.lang.String options)
setOptions: sets vendor license options

Parameters:
options - vendor license options

setEdition

public void setEdition(int edition)
setEdition: sets standard/pro edition code

Parameters:
edition - standard / pro edition code

setEval

public void setEval(boolean eval)
setEval: sets eval-edition flag

Parameters:
eval - whether eval edition

setECommerce

public void setECommerce(boolean eCommerce)
setECommerce: sets eCommerce-option flag

Parameters:
eCommerce - whether eCommerce option enabled

setUserName

public void setUserName(java.lang.String userName)
setUserName: sets ISV user name

Parameters:
userName - ISV user name

setCompanyName

public void setCompanyName(java.lang.String companyName)
setCompanyName: sets ISV company name

Parameters:
companyName - Company name

setVendorDomain

public void setVendorDomain(java.lang.String vendorDomain)
setVendorDomain: sets vendor domain DNS name

Parameters:
vendorDomain - vendor domain name

setVendorPhone

public void setVendorPhone(java.lang.String vendorPhone)
setVendorPhone: sets vendor support phone number

Parameters:
vendorPhone - phone number string

setInstallDate

public void setInstallDate(java.util.Date installDate)
setInstallDate: sets date of product installation.

Parameters:
installDate - product installation date

setUpgradeDate

public void setUpgradeDate(java.util.Date upgradeDate)
setUpgradeDate: sets last date of license key upgrade

Parameters:
upgradeDate - date of upgrade

setExpireDate

public void setExpireDate(java.util.Date expireDate)
setExpireDate: sets current key expiration date

Parameters:
expireDate - key expiration date

setRegisterDate

public void setRegisterDate(java.util.Date registerDate)
setRegisterDate: sets date of product registration

Parameters:
registerDate - product registration date

setLastUseDate

public void setLastUseDate(java.util.Date lastUseDate)
setLastUseDate: sets date of last use of api's

Parameters:
lastUseDate - last-use date

setNoRegReminder

public void setNoRegReminder(boolean noRegReminder)
setNoRegReminder: sets no-registration-reminder indicator

Parameters:
noRegReminder - no-registration-reminder indicator

setLicenseAcceptDate

public void setLicenseAcceptDate(java.util.Date licenseAcceptDate)
setLicenseAcceptDate: sets date of vendor product license agreement acceptance

Parameters:
licenseAcceptDate - date of vendor product license agreement acceptance

setQuotaToDate

public void setQuotaToDate(long quotaToDate)
setQuotaToDate: sets license unit quota allocated to date

Parameters:
quotaToDate - allocated quota to date

setQuotaLast

public void setQuotaLast(long quotaLast)
setQuotaLast: sets license unit quota last allocated

Parameters:
quotaLast - last allocated quota

setQuotaBalance

public void setQuotaBalance(long quotaBalance)
setQuotaBalance: sets license unit quota balance

Parameters:
quotaBalance - quota balance to set to

setVendorLuPolicy

public void setVendorLuPolicy(EzLicenseVendorLuPolicy vendorLuPolicy)
setVendorLuPolicy: set vendor license unit policy class

Parameters:
vendorLuPolicy - vendor license unit policy

loadConfig

public static EzLicenseConfig loadConfig()
                                  throws com.vs.ezlicrun.EzLicExceptionBase
loadConfig: factory method to load the vendor license configuration from the "ezconfig" file located at the current working directory.

Returns:
instance of EzLicenseConfig.
Throws:
com.vs.ezlicrun.EzLicExceptionBase - if the configuration file is not found or is of an invalid format.

saveConfig

public void saveConfig(java.lang.String vendorPassword)
                throws com.vs.ezlicrun.EzLicExceptionBase
Private - for internal use only

Throws:
com.vs.ezlicrun.EzLicExceptionBase

removeConfig

public static void removeConfig(java.lang.String vendorPassword)
                         throws com.vs.ezlicrun.EzLicExceptionBase
Private - for internal use only

Throws:
com.vs.ezlicrun.EzLicExceptionBase

checkFileExists

public static boolean checkFileExists()
                               throws com.vs.ezlicrun.EzLicExceptionBase
checkFileExists: Check whether a valid configuration file exists.

Returns:
whether it exists and is valid.
Throws:
com.vs.ezlicrun.EzLicExceptionBase