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.

Version:
1.60

Field Summary
static java.lang.String XUI_EDITOR_INDICATOR
           
 
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()
           
 boolean hasCommunityLicense()
           
 boolean hasRuntimeLicense()
           
 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.
 boolean hasXuiEditorLicense()
           
 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
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

XUI_EDITOR_INDICATOR

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

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

getEvaluationDaysLeft

public static int getEvaluationDaysLeft()

hasValidLicense

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

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

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

verifyLicense

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

Parameters:
fileLocation - location of the license key file

initializeLicenseInfo

public 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


hasCommunityLicense

public boolean hasCommunityLicense()

hasXuiEditorLicense

public boolean hasXuiEditorLicense()

hasRuntimeLicense

public boolean hasRuntimeLicense()

getLicenseText

public java.lang.String getLicenseText()