com.jaxfront.core.util
Class LicenseChecker

java.lang.Object
  extended by com.jaxfront.core.util.LicenseChecker

public class LicenseChecker
extends java.lang.Object

This class represents JAXFront's License Checker which is responsible to create license keys for X days as well as to check if a valid license key can be found.


Field Summary
static java.lang.String COMMUNITY_EDITION
           
static java.lang.String ENTERPRISE_EDITION
           
static java.lang.String ENTERPRISE_STUDIO_EDITION
           
static java.lang.String PROFESSIONAL_EDITION
           
static java.lang.String STANDARD_EDITION
           
 
Method Summary
static int getEvaluationDaysLeft()
           
static LicenseChecker getInstance()
          Returns the singleton instance of this class.
static License getLicense()
          Returns the current license.
 java.lang.String getLicenseText()
           
static java.lang.String getVersion()
           
 boolean hasCommunityLicense()
           
 boolean hasValidLicense()
          Returns true if the current license is valid.
 boolean hasValidLicense(java.lang.String directoryName, java.lang.String context)
          Returns true if a valid lic file is found in the passed directory
 boolean hasValidLicenseContext(java.lang.String context)
          Returns true if the current license is valid & the context tag is found in the text.
static void initializeLicenseInfo()
          1) Look in user-dir if there is a directory called 'lic' and search for a .lic file. 2) Look in the jaxfront-properties (user home dir) for a stored license location 3) Look in the classpath (all jars...) if a file named 'jaxfront.lic' is found
 boolean isEnterpriseEdition()
           
 boolean isEnterpriseStudioEdition()
           
 boolean isProfessionalEdition()
           
 boolean isStandardEdition()
           
static License verifyLicense(java.lang.String fileLocation)
          Reads and sets a license key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMUNITY_EDITION

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

ENTERPRISE_EDITION

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

ENTERPRISE_STUDIO_EDITION

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

PROFESSIONAL_EDITION

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

STANDARD_EDITION

public static final java.lang.String STANDARD_EDITION
See Also:
Constant Field Values
Method Detail

getEvaluationDaysLeft

public static int getEvaluationDaysLeft()

getInstance

public static LicenseChecker getInstance()
Returns the singleton instance of this class.

Returns:
the singleton instance of this class

getLicense

public static License getLicense()
Returns the current license.

Returns:
the current license

getLicenseText

public java.lang.String getLicenseText()

getVersion

public static java.lang.String getVersion()

hasCommunityLicense

public boolean hasCommunityLicense()

hasValidLicense

public boolean hasValidLicense()
Returns true if the current license is valid.

Returns:
true if the current license is valid, false otherwise

hasValidLicense

public boolean hasValidLicense(java.lang.String directoryName,
                               java.lang.String context)
Returns true if a valid lic file is found in the passed directory

Returns:
true if the current license is valid, false otherwise

hasValidLicenseContext

public boolean hasValidLicenseContext(java.lang.String context)
Returns true if the current license is valid & the context tag is found in the text.

Returns:
true if the current license is valid, false otherwise

initializeLicenseInfo

public static void initializeLicenseInfo()
1) Look in user-dir if there is a directory called 'lic' and search for a .lic file. 2) Look in the jaxfront-properties (user home dir) for a stored license location 3) Look in the classpath (all jars...) if a file named 'jaxfront.lic' is found


isEnterpriseEdition

public boolean isEnterpriseEdition()

isEnterpriseStudioEdition

public boolean isEnterpriseStudioEdition()

isProfessionalEdition

public boolean isProfessionalEdition()

isStandardEdition

public boolean isStandardEdition()

verifyLicense

public static License verifyLicense(java.lang.String fileLocation)
Reads and sets a license key.

Parameters:
fileLocation - location of the license key file