com.vs.ezlicgen
Class EzLicenseVendorInfo

java.lang.Object
  extended by com.vs.ezlicgen.EzLicenseVendorInfo

public class EzLicenseVendorInfo
extends java.lang.Object

The class applies only to vendor license key management. Its purpose is to manage the internal structure of the vendor's custom cookie and optionsin a manner that is specific to the vendor. It cannot be used for any manipulation of ISV-generated end user license keys.

The class is used as follows: To generate an updated license key that extends expiration date, adds to remaining quota, etc.:
1. Instantiate this class.
2. Invoke regenLicenseKey(), providing old and new keys, and the current balance quota.
3. The new license key is returned and can be used to replace an existing key.

To set a vendor cookie prior to generating a vendor license key (from the license manager, when used by the vendor itself):
1. Instantiate this class.
2. Set up cookie information: domain, eval, license unit policy, etc. through the mutators of the class.
3. Invoke makeVendorCookie() to create and return the creator cookie.
4. Use the cookie in an instance of EzLicenseFullInfo class prior to vendor license key generation.

To decompose a vendor cookie after the vendor license key has been parsed (by the license manager, when used by the vendor itself):
1. Instantiate this class.
2. Invoke parseVendorCookie(), providing it with the creator cookie obtained from the license key.
3. Invoke accessors on this class to obtain the cookie constituents.


Field Summary
static int EZLIC_EDITION_PRO
           
static int EZLIC_EDITION_STANDARD
           
 
Constructor Summary
EzLicenseVendorInfo()
           
 
Method Summary
 long getCreationTimestamp()
          getCreationTimestamp: get vendor key creation timestamp
 java.lang.String getDomain()
          getDomain: get vendor domain
 boolean getECommerce()
          getECommerce: get eCommerce-mode
 int getEdition()
          getEdition: get edition
 boolean getEval()
          getEval: get eval-mode
 EzLicenseVendorLuPolicy getLuPolicy()
          getLuPolicy: get vendor license-unit policy
 java.lang.String getPhone()
          getPhone: get vendor phone #
 java.lang.String makeVendorCookie()
          makeVendorCookie: make vendor cookie with the domain name, phone, eval and license unit policy that have been set up in the class context.
 void parseVendorCookie(java.lang.String vendorCookie)
          parseVendorCookie: Parse a specified vendor cookie obtained from a decomposed vendor license key, into the class context.
 void setCreationTimestamp(long creationTimestamp)
          setCreationTimestamp: set vendor key creation timestamp
 void setDomain(java.lang.String domain)
          setDomain: set vendor domain
 void setECommerce(boolean eCommerce)
          setECommerce: set eCommerce-mode
 void setEdition(int edition)
          setEdition: set edition - standard / pro
 void setEval(boolean eval)
          setEval: set eval-mode
 void setLuPolicy(EzLicenseVendorLuPolicy luPolicy)
          setLuPolicy: set vendor license-unit policy
 void setPhone(java.lang.String phone)
          setPhone: set vendor phone #
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EZLIC_EDITION_STANDARD

public static final int EZLIC_EDITION_STANDARD
See Also:
Constant Field Values

EZLIC_EDITION_PRO

public static final int EZLIC_EDITION_PRO
See Also:
Constant Field Values
Constructor Detail

EzLicenseVendorInfo

public EzLicenseVendorInfo()
Method Detail

getEdition

public int getEdition()
getEdition: get edition

Returns:
edition: standard / pro

getEval

public boolean getEval()
getEval: get eval-mode

Returns:
eval mode: true / false

getECommerce

public boolean getECommerce()
getECommerce: get eCommerce-mode

Returns:
eCommerce mode: true / false

getDomain

public java.lang.String getDomain()
getDomain: get vendor domain

Returns:
vendor domain name

getPhone

public java.lang.String getPhone()
getPhone: get vendor phone #

Returns:
vendor phone #

getCreationTimestamp

public long getCreationTimestamp()
getCreationTimestamp: get vendor key creation timestamp

Returns:
creation timestamp

getLuPolicy

public EzLicenseVendorLuPolicy getLuPolicy()
getLuPolicy: get vendor license-unit policy

Returns:
vendor's license-unit policy

setEdition

public void setEdition(int edition)
setEdition: set edition - standard / pro

Parameters:
edition - standard / pro edition code

setEval

public void setEval(boolean eval)
setEval: set eval-mode

Parameters:
eval - eval mode: true / false

setECommerce

public void setECommerce(boolean eCommerce)
setECommerce: set eCommerce-mode

Parameters:
eCommerce - eCommerce mode: true / false

setDomain

public void setDomain(java.lang.String domain)
setDomain: set vendor domain

Parameters:
domain - vendor domain name

setPhone

public void setPhone(java.lang.String phone)
setPhone: set vendor phone #

Parameters:
phone - vendor phone #

setCreationTimestamp

public void setCreationTimestamp(long creationTimestamp)
setCreationTimestamp: set vendor key creation timestamp

Parameters:
creationTimestamp - vendor key creation timestamp

setLuPolicy

public void setLuPolicy(EzLicenseVendorLuPolicy luPolicy)
setLuPolicy: set vendor license-unit policy

Parameters:
luPolicy - vendor's license-unit policy

makeVendorCookie

public java.lang.String makeVendorCookie()
makeVendorCookie: make vendor cookie with the domain name, phone, eval and license unit policy that have been set up in the class context.

Returns:
vendor cookie string, ready to insert into a vendor license info prior to vendor key construction.

parseVendorCookie

public void parseVendorCookie(java.lang.String vendorCookie)
                       throws com.vs.ezlicrun.EzLicExceptionBase
parseVendorCookie: Parse a specified vendor cookie obtained from a decomposed vendor license key, into the class context. The info contained in the cookie is subsequently accessible through the accessors.

Parameters:
vendorCookie - the vendor cookie obtained from a vendor license key.
Throws:
com.vs.ezlicrun.EzLicExceptionBase - if the cookie is not a vendor cookie or it is malformed.