planetj.license
Class License

java.lang.Object
  |
  +--planetj.license.License
All Implemented Interfaces:
ILicense, ILicenseConsts, Serializable

public final class License
extends Object
implements ILicense, ILicenseConsts

Serializable representation of license - trial, professional, enterprise. Only trial license can expire, other licenses may have disabled features.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface planetj.license.ILicenseConsts
CP, EXPIRATION_NEVER, fs, INVALID_CREATION, INVALID_EXPIRED, INVALID_VERSION, MESSAGE_GENERIC, MESSAGE_INVALID, MESSAGE_INVALID_DETAIL, STORE_DEFAULT_URI, TRIAL_EXPIRATION_PERIOD_DAYS, TYPE_ENTERPRISE, TYPE_ENTRY, TYPE_INVALID, TYPE_PROFESSIONAL, TYPE_STANDARD, TYPE_TRIAL, VERSION_5_0, VERSION_6_0
 
Constructor Summary
License(String pType)
          Set expiration date based on creation date+expiration period
 
Method Summary
 Feature addFeature(Feature pFeature)
          Add feature to license Creation date: (1/8/2003 4:00:01 PM)
 String expirationString()
          Creation date: (1/8/2003 8:05:11 PM)
 boolean featureIsEnabled(String pFeature)
          Insert the method's description here.
 Date getCreated()
          Insert the method's description here.
 Date getExpiration()
          Insert the method's description here.
 String getExpirationString()
          Return warning string for expiring license.
 int getFeatureLevel()
          Gets the feature level for this license
 String getInvalidDetailString()
          Creation date: (5/6/2003 11:50:36 PM)
 int getInvalidReason()
          Creation date: (5/6/2003 11:50:36 PM)
 String getInvalidString()
          Creation date: (5/6/2003 11:50:36 PM)
 String getKey()
          Returns a key that uniquely identifies this license.
 String getStatusMessage(int messageType)
          Creation date: (5/7/2003 12:29:31 AM)
 String getType()
          Insert the method's description here.
 String getURI()
          Get URI location that license should be stored / retrieved.
 String getVersion()
          Get version of Wow that this license was created for.
 boolean hasStateChanged()
          Creation date: (4/8/2003 1:57:37 PM)
 boolean isDataEngineKeyMatched()
          Returns a key that uniquely identifies this license.
 boolean isExpired()
           
 boolean isStoredAsInvalid()
          Insert the method's description here.
 boolean isValid()
          Creation date: (5/6/2003 11:48:30 PM)
 void restore()
          Called every time the license is retored & checks to see if the date has changed.
 void setStoreAsInvalidTrue()
          Not a true setter - always stores as true.
 String toString()
          Final since used as part of key Creation date: (1/8/2003 5:22:51 PM)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

License

public License(String pType)
Set expiration date based on creation date+expiration period

Method Detail

addFeature

public Feature addFeature(Feature pFeature)
Add feature to license Creation date: (1/8/2003 4:00:01 PM)

Returns:
planetj.license.Feature

expirationString

public String expirationString()
Creation date: (1/8/2003 8:05:11 PM)

Returns:
java.lang.String

featureIsEnabled

public boolean featureIsEnabled(String pFeature)
Insert the method's description here. Creation date: (1/8/2003 4:05:23 PM)

Returns:
boolean

getCreated

public final Date getCreated()
Insert the method's description here. Creation date: (1/8/2003 1:11:40 PM)

Returns:
java.util.Date

getExpiration

public final Date getExpiration()
Insert the method's description here. Creation date: (1/8/2003 1:09:41 PM)

Returns:
java.util.Date

getExpirationString

public String getExpirationString()
Return warning string for expiring license. Creation date: (1/8/2003 12:55:38 PM)

Returns:
java.lang.String

getFeatureLevel

public int getFeatureLevel()
Gets the feature level for this license

Specified by:
getFeatureLevel in interface ILicense

getInvalidDetailString

public String getInvalidDetailString()
Creation date: (5/6/2003 11:50:36 PM)

Returns:
java.lang.String

getInvalidReason

public int getInvalidReason()
Creation date: (5/6/2003 11:50:36 PM)

Returns:
int

getInvalidString

public String getInvalidString()
Creation date: (5/6/2003 11:50:36 PM)

Returns:
java.lang.String

getKey

public final String getKey()
Returns a key that uniquely identifies this license. Keys should not be the same for any licenses. Creation date: (4/8/2003 1:46:49 PM)

Specified by:
getKey in interface ILicense
Returns:
java.lang.String

getStatusMessage

public String getStatusMessage(int messageType)
Creation date: (5/7/2003 12:29:31 AM)

Specified by:
getStatusMessage in interface ILicense
Returns:
java.lang.String

getType

public final String getType()
Insert the method's description here. Creation date: (1/8/2003 12:55:38 PM)

Specified by:
getType in interface ILicense
Returns:
java.lang.String

getURI

public String getURI()
Get URI location that license should be stored / retrieved. Creation date: (1/8/2003 12:55:38 PM)

Specified by:
getURI in interface ILicense
Returns:
java.lang.String

getVersion

public final String getVersion()
Description copied from interface: ILicense
Get version of Wow that this license was created for.

Specified by:
getVersion in interface ILicense

hasStateChanged

public boolean hasStateChanged()
Creation date: (4/8/2003 1:57:37 PM)

Specified by:
hasStateChanged in interface ILicense
Returns:
boolean

isDataEngineKeyMatched

public final boolean isDataEngineKeyMatched()
Returns a key that uniquely identifies this license. Keys should not be the same for any licenses. Creation date: (4/8/2003 1:46:49 PM)

Returns:
java.lang.String

isExpired

public final boolean isExpired()

isStoredAsInvalid

public final boolean isStoredAsInvalid()
Insert the method's description here. Creation date: (1/12/2003 11:26:50 AM)

Returns:
boolean

isValid

public final boolean isValid()
Creation date: (5/6/2003 11:48:30 PM)

Specified by:
isValid in interface ILicense
Returns:
boolean

restore

public final void restore()
Called every time the license is retored & checks to see if the date has changed. This is an intelligent counter incase the user has played with the date on their system before a trial install. Every time the date has been changed the counter is incremented as if one day has passed. If user resets their calendar the license is still aware of changes in the days unless the date is kept the same every day. Problems with license management: User can delete the license and restart their trial. License file should be disguised as a Windows, Linux, AS/400 file. Creation date: (1/8/2003 12:55:38 PM)

Specified by:
restore in interface ILicense
Returns:
java.lang.String

setStoreAsInvalidTrue

public final void setStoreAsInvalidTrue()
Not a true setter - always stores as true. Once license is expired cannot be reset. Creation date: (1/12/2003 11:26:50 AM)


toString

public final String toString()
Final since used as part of key Creation date: (1/8/2003 5:22:51 PM)

Overrides:
toString in class Object
Returns:
java.lang.String