|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jp.protection.pub.LicenseHost
com.jp.protection.pub.pro.LicenseHostPro
public class LicenseHostPro
This class represents Professional edition implementation of the license host. It extends the LicenseHost
functionality by adding support of:
Field Summary | |
---|---|
protected static char[] |
ACTIVATION_KEY_CHARS
|
protected static char[] |
ACTIVATION_KEY_CHARS_STRIPPED
|
static java.lang.String |
ACTIVATION_KEY_PATTERN
|
static char |
ACTIVATION_KEY_PATTERN_CHAR
|
protected int |
fActivationLockOptions
|
protected boolean |
fAutoIncUseCount
|
protected boolean |
fCheckPreviousShutdownDate
|
protected LicenseHostProContext |
fContext
|
protected static int |
fJavaVersion
|
protected LicenseReaderListener |
fLicenseReaderListener
|
protected LicenseUpgradeChecker |
fLicenseUpgradeChecker
|
protected LicensingServiceSupport |
fLicensingServiceSupport
|
protected boolean |
fMaintainPreviousShutdownDate
|
protected static java.text.MessageFormat |
FMT_OR_USAGES_LEFT
|
protected static java.text.MessageFormat |
FMT_USAGES_LEFT
|
protected NetworkCheck |
fNetworkCheck
|
protected boolean |
fNetworkCheckEnabled
|
protected java.lang.Thread |
fShutdownHook
|
protected java.lang.String |
fSignature
|
protected static boolean |
fUseJava6Context
|
protected boolean |
fUseStrippedActivationKeyChars
|
static int |
LOCK_ALL
Option specifies that license should be locked to all supported attributes |
static int |
LOCK_CPU_ID
Option specifies that license should be locked to the CPU ID. |
static int |
LOCK_CPU_NUMBER
Option specifies that license should be locked to CPU number |
static int |
LOCK_CUSTOM_ATTRIBUTE
Option specifies that license should be locked to the custom attribute. |
static int |
LOCK_HOST
Option specifies that license should be locked to computer name |
static int |
LOCK_INSTALL_ID
Option specifies that license should be locked to internal installation ID randomly generated during the first application run. |
static int |
LOCK_IP_ADDRESS
Option specifies that license should be locked to IP address of the local host |
static int |
LOCK_MAC_ADDRESS
Option specifies that license should be locked to MAC address of network card |
static int |
LOCK_MOTHERBOARD_ID
Option specifies that license should be locked to the moterboard ID. |
static int |
LOCK_USER
Option specifies that license should be locked to the current user |
static java.lang.String |
PROPERTY_ACTIVATION_NUMBER
Defines the name of the property used to store the activationNumber
property in the SecretStorages |
static java.lang.String |
PROPERTY_CLEAR_PREVIOUS_SHUTDOWN_DATE
|
static java.lang.String |
PROPERTY_FIRST_LAUNCH_DATE
Defines the name of the property used to store the firstLaunchDate
property in the SecretStorages |
static java.lang.String |
PROPERTY_INSTALL_ID
Defines the name of the property used to store the installID
property in the SecretStorages |
static java.lang.String |
PROPERTY_LATEST_ACTIVATION_KEY
Defines property for storing latest Activation Key |
static java.lang.String |
PROPERTY_LATEST_DEACTIVATION_KEY
Defines property for storing latest Deactivation Key |
static java.lang.String |
PROPERTY_LICENSING_SERVER_ADDRESS
Defines the name of the property used to store the licensingServerAddress
property in the SecretStorages |
static java.lang.String |
PROPERTY_USE_COUNT
Defines property for storing application use count |
(package private) static java.util.ResourceBundle |
res
|
static java.lang.String |
USE_JAVA6_CONTEXT
|
Constructor Summary | |
---|---|
LicenseHostPro()
Constructs a LicenseHost instance. |
|
LicenseHostPro(LicenseReader aLicenseReader)
Constructs a LicenseHost instance and assigns the LicenseReader instance. |
|
LicenseHostPro(LicenseReader aLicenseReader,
LicenseHostListener aLicenseHostListener)
Constructs a LicenseHost instance, assigns
the LicenseReader instance and adds a
LicenseHostListener . |
Method Summary | |
---|---|
boolean |
canCheckoutLicense()
Tests whether a License can be checked out for offline use |
boolean |
canDeactivateLicense()
Checks whether license can be deactivated |
boolean |
canTerminateLicensePass()
Tests whether License Pass can be terminated |
protected boolean |
checkActivation(LicenseImpl aLicense)
|
protected boolean |
checkActivationGracePeriod(LicenseImpl aLicense)
|
protected boolean |
checkActivationImpl(LicenseImpl aLicense,
boolean result)
|
protected boolean |
checkActivationLockImpl(LicenseImpl aLicense,
boolean result)
|
protected void |
checkCommercial(LicenseImpl aLicense,
java.lang.String aProduct,
int aProductMajorVersion,
int aProductMinorVersion)
|
protected void |
checkEvaluation(LicenseImpl aLicense,
java.lang.String aProduct,
int aProductMajorVersion,
int aProductMinorVersion)
|
protected boolean |
checkExpirationImpl(LicenseImpl aLicense,
java.lang.String aProduct,
int aProductMajorVersion,
int aProductMinorVersion)
|
void |
checkLicense(java.lang.String aProduct,
int aProductMajorVersion,
int aProductMinorVersion,
boolean aForceLicenseRead)
Main method of LicenseHostPro that does all the work of license checking
against provided parameters. |
protected boolean |
checkLicenseLock(LicenseImpl aLicense)
|
protected boolean |
checkLicenseLockImpl(License aLicense)
|
protected boolean |
checkLicensePass(License aLicense,
LicensePass aPass)
|
protected boolean |
checkLicenseUpgrade(License aLicense)
|
protected boolean |
checkLockGracePeriod(LicenseImpl aLicense)
|
protected void |
checkNumberOfCopies(License aLicense)
|
boolean |
checkoutLicense()
Checks out a License for offline use without need to lock the License using Licensing Server |
protected boolean |
checkPreviousShutdownDate()
|
protected boolean |
checkSystemDateTrick()
|
protected boolean |
checkUseCount(License aLicense)
|
protected void |
clearPreviousShutdownDate()
|
protected long |
composeActivationKey(java.lang.String aLicenseNumber)
|
protected long |
composeActivationLockKey(java.lang.String aLicenseNumber,
long anActivationKeyValue)
|
protected LicenseHostProContext |
createContext()
|
protected LicenseUpgradeChecker |
createLicenseUpgradeChecker()
|
java.lang.String |
deactivateLicense()
Deactivates license on the local computer by writing incremented Activation Number to all registered secret storages. |
protected void |
disallowSeveralInstances(License aLicense)
|
protected void |
fireLicenseAboutToExpire(LicenseHost aSource,
License aLicense,
int aDaysLeft)
|
protected void |
fireLicenseLockExpired(LicenseHost aSource,
License aLicense,
java.lang.String aReason)
|
protected void |
fireLicenseLockRevoked(LicenseHost aSource,
License aLicense,
java.lang.String aReason)
|
protected void |
fireLicenseLockViolation(LicenseHost aSource,
License aLicense)
|
protected void |
fireLicenseNeedActivation(LicenseHost aSource,
License aLicense,
int aDaysLeft)
|
protected void |
fireLicenseNeedLock(LicenseHost aSource,
License aLicense,
int aDaysLeft)
|
protected void |
fireLicenseNotActivated(LicenseHost aSource,
License aLicense)
|
protected void |
fireLicenseNotLocked(LicenseHost aSource,
License aLicense,
java.lang.String aReason)
|
protected void |
fireLicenseUseLimitAboutReach(LicenseHost aSource,
License aLicense,
int aUseLeft)
|
protected void |
fireNumberCopiesViolation(LicenseHost aSource,
License aLicense,
int aNumberInUse)
|
protected void |
fireProductFeaturesSupported(License aLicense)
|
int |
getActivationDaysLeft(License aLicense)
Returns number of days left till the license will be considered as not activated one |
java.lang.String |
getActivationKey()
Generates activation key for the license read by the license reader according to license options |
static java.lang.String |
getActivationKey(byte[] aKey,
char[] aKeyChars)
Returns Activation Key for passed value |
java.lang.String |
getActivationKey(LicenseImpl aLicense)
Returns Activation Key for passed license. |
protected static java.lang.String |
getActivationKey(long aKey)
|
protected static java.lang.String |
getActivationKey(long aKey,
char[] aKeyChars)
|
java.lang.String |
getActivationKey(java.lang.String aLicenseNumber)
Returns Activation Key for passed license number. |
protected char[] |
getActivationKeyChars()
|
static char[] |
getActivationKeyChars(boolean isUseStrippedActivationKeyChars)
Returns array of activation key characters |
protected long |
getActivationLockKey()
|
java.lang.String |
getActivationLockKey(LicenseImpl aLicense)
Returns Activation and Lock Key for passed license. |
java.lang.String |
getActivationLockKey(java.lang.String aLicenseNumber)
Returns Activation and Lock Key for passed license number. |
protected long[] |
getActivationLockKeys()
|
protected java.lang.String[] |
getActivationLockKeys(LicenseImpl aLicense)
|
protected java.lang.String[] |
getActivationLockKeys(java.lang.String aLicenseNumber)
|
int |
getActivationLockOptions()
Returns the attributes a license should be locked to |
protected int |
getActivationNumber(java.lang.String aLicenseNumber)
|
protected static java.lang.String |
getActivationNumberPropertyName(java.lang.String aLicenseNumber)
|
LicenseHostProContext |
getContext()
Returns context object used to obtain various system and application properties |
protected java.lang.String |
getCpuID()
|
java.lang.String |
getCustomLockAttribute()
|
protected int |
getDaysLeft(License aLicense,
int aGracePeriod)
|
int |
getExpireDaysLeft(License aLicense)
Returns number of days left till the license will be considered as expired one |
protected java.util.Date |
getFirstLaunchDate(License aLicense)
|
protected static java.lang.String |
getFirstLaunchDatePropertyName(License aLicense)
|
protected int |
getInstallID()
|
static int |
getJavaVersion()
|
java.lang.String |
getLatestActivationKey()
|
protected java.lang.String |
getLatestActivationKey(License aLicense)
|
protected static java.lang.String |
getLatestActivationKeyPropertyName(License aLicense)
|
java.lang.String |
getLatestDeactivationKey()
|
protected java.lang.String |
getLatestDeactivationKey(License aLicense)
|
protected static java.lang.String |
getLatestDeactivationKeyPropertyName(License aLicense)
|
java.lang.String |
getLicenseExpireInfo(License aLicense)
Composes and returns textual representation of the license expiration information. |
protected LicenseReaderListener |
getLicenseReaderListener()
|
LicenseUpgradeChecker |
getLicenseUpgradeChecker()
Returns an instance of LicenseUpgradeChecker used to perform check of validity of upgrade license |
LicensingServiceSupport |
getLicensingServiceSupport()
Returns LicensingServiceSupport instance used to support Licensing Server activities. |
int |
getLockDaysLeft(License aLicense)
Returns number of days left till the license will be considered as not locked one |
protected long |
getMACAddress()
|
protected long[] |
getMACAddresses()
|
protected java.lang.String |
getMotherboardID()
|
NetworkCheck |
getNetworkCheck()
Returns a NetworkCheck instance used to check for presence of concurrently running copies over the
network. |
int |
getNetworkCheckHostPolicy()
Returns check host policy. |
java.util.Date |
getPreviousShutdownDate()
Returns the date of last application shutdown |
protected static java.lang.String |
getPropertyNameForLicense(java.lang.String aPropertyName,
License aLicense)
|
java.lang.String |
getSignature()
Returns signature that is used during the checking for the number of concurrently running copies to uniquely identify product's publisher. |
protected int |
getUseCount(License aLicense)
|
int |
getUseCountLeft(License aLicense)
Returns number of usage left till the license will be considered as expired one |
protected static java.lang.String |
getUseCountPropertyName(License aLicense)
|
void |
incUseCount()
Increases license usage count. |
boolean |
isAutoIncUseCount()
Returns whether license usage count should be autoincremented during the next license check (if license is OK). |
boolean |
isCheckNumberOfCopies()
Deprecated. use isNetworkCheckEnabled() instead |
boolean |
isCheckPreviousShutdownDate()
Tests whether checking date of previous shutdown is enabled. |
boolean |
isMaintainPreviousShutdownDate()
Returns whether pervious shutdown date is maintained |
boolean |
isNetworkCheckEnabled()
Tests whether using network check for tracking number of concurrently running copies with the same license is enabled. |
static boolean |
isUseJava6Context()
|
boolean |
isUseStrippedActivationKeyChars()
Tests whether using of stripped activation key characters is enabled. |
boolean |
lockLicense()
Locks license using the Licensing Server |
void |
numberCopiesViolation(NetworkCheck aSource,
int aNumberInUse)
NetworkCheck calls this method when it recognizes the violation in the number of concurrently running copies. |
void |
release()
Releases all the resources acquired by License Host |
protected void |
saveFirstLaunchDate()
|
void |
setActivationLockOptions(int aActivationLockOptions)
Specifies the attributes a license should be locked to |
protected void |
setActivationNumber(java.lang.String aLicenseNumber,
int aValue)
|
void |
setAutoIncUseCount(boolean aAutoIncUseCount)
Specifies that license usage count should be autoincremented during the next license check. |
void |
setCheckNumberOfCopies(boolean aCheckNumberOfCopies)
Deprecated. use setNetworkCheckEnabled() instead |
void |
setCheckPreviousShutdownDate(boolean aCheckPreviousShutdownDate)
Specifies that check for application's previous shutdown date is enabled |
void |
setContext(LicenseHostProContext aContext)
Specifies context object should be used to obtain various system and application properties |
protected void |
setFirstLaunchDate(License aLicense,
java.util.Date aDate)
|
protected void |
setLatestActivationKey(License aLicense,
java.lang.String anActivationKey)
|
protected void |
setLatestDeactivationKey(License aLicense,
java.lang.String aDeactivationKey)
|
void |
setLicenseReader(LicenseReader aLicenseReader)
Specifies a LicenseReader instance used to read licenses |
protected void |
setLicenseState(LicenseImpl aLicense,
int aState)
|
void |
setLicenseUpgradeChecker(LicenseUpgradeChecker aLicenseUpgradeChecker)
Specifies an instance of LicenseUpgradeChecker should be used to perform check of validity of upgrade license |
void |
setMaintainPreviousShutdownDate(boolean aMaintainPreviousShutdownDate)
Specifies whether application's pervious shutdown date should be maintained |
static void |
setNativeLibFolder(java.io.File aFolder)
Specifies the name of folder to find native libraries. |
void |
setNetworkCheckEnabled(boolean aNetworkCheckEnabled)
Specifies that using network check for tracking number of concurrently running copies with the same license is enabled. |
void |
setNetworkCheckHostPolicy(int aCheckHostPolicy)
Specifies check host policy as one of NetworkCheck.POLICY_ constants. |
protected void |
setPreviousShutdownDate(java.util.Date aDate)
|
void |
setSignature(java.lang.String aSignature)
Specifies signature value |
protected void |
setUseCount(License aLicense,
int aUseCount)
|
static void |
setUseJava6Context(boolean aUseJava6Context)
|
void |
setUseStrippedActivationKeyChars(boolean aUseStrippedActivationKeyChars)
Specifies that usage of the stripped activation key characters is enabled. |
void |
setVerbose(boolean aVerbose)
Specifies that license host should run in verbose mode. |
void |
stopNetworkCheck()
Stops the network check for presence of concurrently running copies. |
boolean |
terminateLicensePass()
Terminate ability to use a License offline by removing corresponding License Pass |
boolean |
unlockLicense()
Release license lock using the Licensing Server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static java.util.ResourceBundle res
public static final java.lang.String PROPERTY_CLEAR_PREVIOUS_SHUTDOWN_DATE
protected boolean fNetworkCheckEnabled
protected java.lang.String fSignature
protected NetworkCheck fNetworkCheck
protected boolean fAutoIncUseCount
public static final int LOCK_MAC_ADDRESS
public static final int LOCK_USER
public static final int LOCK_IP_ADDRESS
public static final int LOCK_HOST
public static final int LOCK_CPU_NUMBER
public static final int LOCK_INSTALL_ID
public static final int LOCK_CPU_ID
public static final int LOCK_MOTHERBOARD_ID
public static final int LOCK_CUSTOM_ATTRIBUTE
public static final int LOCK_ALL
protected int fActivationLockOptions
protected static final char[] ACTIVATION_KEY_CHARS_STRIPPED
protected static final char[] ACTIVATION_KEY_CHARS
protected boolean fUseStrippedActivationKeyChars
public static final java.lang.String ACTIVATION_KEY_PATTERN
public static final char ACTIVATION_KEY_PATTERN_CHAR
protected LicensingServiceSupport fLicensingServiceSupport
protected boolean fMaintainPreviousShutdownDate
protected java.lang.Thread fShutdownHook
protected boolean fCheckPreviousShutdownDate
public static final java.lang.String PROPERTY_USE_COUNT
public static final java.lang.String PROPERTY_LICENSING_SERVER_ADDRESS
licensingServerAddress
property in the SecretStorages
public static final java.lang.String PROPERTY_FIRST_LAUNCH_DATE
firstLaunchDate
property in the SecretStorages
public static final java.lang.String PROPERTY_ACTIVATION_NUMBER
activationNumber
property in the SecretStorages
public static final java.lang.String PROPERTY_INSTALL_ID
installID
property in the SecretStorages
protected static int fJavaVersion
protected LicenseHostProContext fContext
public static final java.lang.String USE_JAVA6_CONTEXT
protected static boolean fUseJava6Context
protected static final java.text.MessageFormat FMT_OR_USAGES_LEFT
protected static final java.text.MessageFormat FMT_USAGES_LEFT
protected LicenseReaderListener fLicenseReaderListener
public static final java.lang.String PROPERTY_LATEST_DEACTIVATION_KEY
public static final java.lang.String PROPERTY_LATEST_ACTIVATION_KEY
protected LicenseUpgradeChecker fLicenseUpgradeChecker
Constructor Detail |
---|
public LicenseHostPro()
LicenseHost
instance. Note: a valid
LicenseReader
instance should be assigned to allow license
checking.
public LicenseHostPro(LicenseReader aLicenseReader)
LicenseHost
instance and assigns the LicenseReader
instance.
aLicenseReader
- an instance to assignpublic LicenseHostPro(LicenseReader aLicenseReader, LicenseHostListener aLicenseHostListener)
LicenseHost
instance, assigns
the LicenseReader
instance and adds a
LicenseHostListener
.
aLicenseReader
- a LicenseReader
instance to assignaLicenseHostListener
- a LicenseHostListener
to addMethod Detail |
---|
protected boolean checkExpirationImpl(LicenseImpl aLicense, java.lang.String aProduct, int aProductMajorVersion, int aProductMinorVersion)
checkExpirationImpl
in class LicenseHost
public int getExpireDaysLeft(License aLicense)
aLicense
- license to return number of days for
public int getUseCountLeft(License aLicense)
aLicense
- license to return number of usages for
-1
if usage limit is not specifiedprotected boolean checkUseCount(License aLicense)
protected void checkCommercial(LicenseImpl aLicense, java.lang.String aProduct, int aProductMajorVersion, int aProductMinorVersion)
checkCommercial
in class LicenseHost
protected void saveFirstLaunchDate()
protected void checkEvaluation(LicenseImpl aLicense, java.lang.String aProduct, int aProductMajorVersion, int aProductMinorVersion)
checkEvaluation
in class LicenseHost
protected void clearPreviousShutdownDate()
public void checkLicense(java.lang.String aProduct, int aProductMajorVersion, int aProductMinorVersion, boolean aForceLicenseRead)
LicenseHostPro
that does all the work of license checking
against provided parameters. It is possible to analyze checking process results after
this method return by reading the license properties or during license
checking by listening to the various events using the LicenseHostListener
(s)
and LicenseReaderListener
(s) listeners
checkLicense
in class LicenseHost
aProduct
- product identifieraProductMajorVersion
- major version of the product. The license is
considered valid if the
aProductMajorVersion
is equals to
the license productMajorVersion
property.aProductMinorVersion
- minor version of the product. The license is
considered valid if the
aProductMinorVersion
is less or equals
to the license productMinorVersion
property.aForceLicenseRead
- forces the LicenseReader
to re-read
licensepublic boolean isCheckNumberOfCopies()
isNetworkCheckEnabled()
instead
true
if checking is enabled; false
otherwisepublic void setCheckNumberOfCopies(boolean aCheckNumberOfCopies)
setNetworkCheckEnabled()
instead
aCheckNumberOfCopies
- true
if checking should be enabled; false
otherwisepublic boolean isNetworkCheckEnabled()
true
if network check is enabled; false
otherwisepublic void setNetworkCheckEnabled(boolean aNetworkCheckEnabled)
aNetworkCheckEnabled
- true
if network check should be enabled; false
otherwiseprotected void fireProductFeaturesSupported(License aLicense)
fireProductFeaturesSupported
in class LicenseHost
public java.lang.String getSignature()
public void setSignature(java.lang.String aSignature)
aSignature
- signature valueprotected void checkNumberOfCopies(License aLicense)
protected void disallowSeveralInstances(License aLicense)
public void stopNetworkCheck()
System.exit()
call.
An example of such application would be a servlet or an EJB that can be undeployed without the need to
shutdown the servlet or an EJB container.
public int getNetworkCheckHostPolicy()
NetworkCheck.POLICY_
constants.public void setNetworkCheckHostPolicy(int aCheckHostPolicy)
NetworkCheck.POLICY_
constants.
aCheckHostPolicy
- check host policypublic NetworkCheck getNetworkCheck()
NetworkCheck
instance used to check for presence of concurrently running copies over the
network.
NetworkCheck
instance.protected void fireNumberCopiesViolation(LicenseHost aSource, License aLicense, int aNumberInUse)
protected void fireLicenseAboutToExpire(LicenseHost aSource, License aLicense, int aDaysLeft)
protected void fireLicenseNeedLock(LicenseHost aSource, License aLicense, int aDaysLeft)
protected void fireLicenseLockExpired(LicenseHost aSource, License aLicense, java.lang.String aReason)
protected void fireLicenseLockRevoked(LicenseHost aSource, License aLicense, java.lang.String aReason)
protected void fireLicenseUseLimitAboutReach(LicenseHost aSource, License aLicense, int aUseLeft)
protected void fireLicenseLockViolation(LicenseHost aSource, License aLicense)
protected void fireLicenseNotActivated(LicenseHost aSource, License aLicense)
protected void fireLicenseNotLocked(LicenseHost aSource, License aLicense, java.lang.String aReason)
protected void fireLicenseNeedActivation(LicenseHost aSource, License aLicense, int aDaysLeft)
public boolean isAutoIncUseCount()
true
if license usage count should be autoincremented;false
otherwisepublic void setAutoIncUseCount(boolean aAutoIncUseCount)
true
by default that is suitable for GUI or console utility applications. For server
application this feature should be turned off to eliminate redundunt increment on startup.
aAutoIncUseCount
- true
if license usage count should be autoincremented;false
otherwise.protected void setLicenseState(LicenseImpl aLicense, int aState)
setLicenseState
in class LicenseHost
public void numberCopiesViolation(NetworkCheck aSource, int aNumberInUse)
numberCopiesViolation
in interface NetworkCheckListener
aSource
- an instance of the NetworkCheck
, which called this methodaNumberInUse
- number of copies that are actually are in use nowpublic java.lang.String getActivationKey()
public java.lang.String getActivationKey(LicenseImpl aLicense)
getActivationKey(aLicense.getLicenseNumber())
method
call.
aLicense
- license to get Activation Key for
public java.lang.String getActivationKey(java.lang.String aLicenseNumber)
aLicenseNumber
- number of license to get Activation Key for
protected long composeActivationKey(java.lang.String aLicenseNumber)
public int getActivationLockOptions()
public void setActivationLockOptions(int aActivationLockOptions)
aActivationLockOptions
- the attributes passed as a concatenation of
LOCK_
constants.public java.lang.String getActivationLockKey(LicenseImpl aLicense)
getActivationLockKey(aLicense.getLicenseNumber())
method
call.
aLicense
- license to get Activation Key for
protected java.lang.String[] getActivationLockKeys(LicenseImpl aLicense)
public java.lang.String getActivationLockKey(java.lang.String aLicenseNumber)
aLicenseNumber
- number of license to get Activation Key for
protected java.lang.String[] getActivationLockKeys(java.lang.String aLicenseNumber)
protected long composeActivationLockKey(java.lang.String aLicenseNumber, long anActivationKeyValue)
protected char[] getActivationKeyChars()
public static char[] getActivationKeyChars(boolean isUseStrippedActivationKeyChars)
isUseStrippedActivationKeyChars
- identifies whether stripped key characters should be used.
protected long[] getActivationLockKeys()
protected long getActivationLockKey()
protected boolean checkSystemDateTrick()
public int getActivationDaysLeft(License aLicense)
aLicense
- license to return number of days for
protected int getDaysLeft(License aLicense, int aGracePeriod)
public int getLockDaysLeft(License aLicense)
aLicense
- license to return number of days for
protected boolean checkActivationGracePeriod(LicenseImpl aLicense)
protected boolean checkLockGracePeriod(LicenseImpl aLicense)
protected boolean checkActivation(LicenseImpl aLicense)
checkActivation
in class LicenseHost
protected boolean checkActivationLockImpl(LicenseImpl aLicense, boolean result) throws LicenseOutdatedException
LicenseOutdatedException
protected boolean checkActivationImpl(LicenseImpl aLicense, boolean result) throws LicenseOutdatedException
LicenseOutdatedException
protected boolean checkLicenseLock(LicenseImpl aLicense)
checkLicenseLock
in class LicenseHost
protected boolean checkLicenseLockImpl(License aLicense)
protected boolean checkLicensePass(License aLicense, LicensePass aPass)
public LicensingServiceSupport getLicensingServiceSupport()
public boolean lockLicense()
true
if license lock is acquired; false
otherwisepublic boolean unlockLicense()
true
if license lock is released; false
otherwiseprotected long getMACAddress()
protected long[] getMACAddresses()
protected java.lang.String getCpuID()
protected java.lang.String getMotherboardID()
public java.lang.String getCustomLockAttribute()
public static void setNativeLibFolder(java.io.File aFolder)
../native_lib/
aFolder
- the name of the folderpublic boolean isUseStrippedActivationKeyChars()
true
if using of stripped activation key characters is
enabled; false
otherwise.public void setUseStrippedActivationKeyChars(boolean aUseStrippedActivationKeyChars)
aUseStrippedActivationKeyChars
- true
if using of stripped activation key characters is
enabled; false
otherwise.protected static java.lang.String getActivationKey(long aKey)
protected static java.lang.String getActivationKey(long aKey, char[] aKeyChars)
public static java.lang.String getActivationKey(byte[] aKey, char[] aKeyChars)
aKey
- a key to get Activation Key foraKeyChars
- a key characters should be used to generate Activation Key
public java.util.Date getPreviousShutdownDate()
protected void setPreviousShutdownDate(java.util.Date aDate)
public boolean isCheckPreviousShutdownDate()
true
if checking date of previous shutdown is enabled;
false
otherwisepublic void setCheckPreviousShutdownDate(boolean aCheckPreviousShutdownDate)
aCheckPreviousShutdownDate
- true
if checking should be
enabled; false
otherwise.public boolean isMaintainPreviousShutdownDate()
true
if pervious shutdown date is maintained; false
otherwise.public void setMaintainPreviousShutdownDate(boolean aMaintainPreviousShutdownDate)
aMaintainPreviousShutdownDate
- true
if pervious shutdown date should be maintained;
false
otherwise.public void release()
release
in class LicenseHost
protected boolean checkPreviousShutdownDate()
protected static java.lang.String getUseCountPropertyName(License aLicense)
protected int getUseCount(License aLicense)
protected void setUseCount(License aLicense, int aUseCount)
public void incUseCount()
protected static java.lang.String getFirstLaunchDatePropertyName(License aLicense)
protected java.util.Date getFirstLaunchDate(License aLicense)
protected void setFirstLaunchDate(License aLicense, java.util.Date aDate)
protected static java.lang.String getActivationNumberPropertyName(java.lang.String aLicenseNumber)
protected int getActivationNumber(java.lang.String aLicenseNumber)
protected void setActivationNumber(java.lang.String aLicenseNumber, int aValue)
public boolean canDeactivateLicense()
true
if license can be deactivated; false
otherwise.public java.lang.String deactivateLicense()
protected int getInstallID()
public LicenseHostProContext getContext()
public void setContext(LicenseHostProContext aContext)
aContext
- context to setpublic void setVerbose(boolean aVerbose)
LicenseHost
std err
. Otherwise
there is no output in order to prevent the code flow analysis.
setVerbose
in class LicenseHost
aVerbose
- true
if reader should run in verbose mode,
false
otherwise.public static int getJavaVersion()
public static void setUseJava6Context(boolean aUseJava6Context)
public static boolean isUseJava6Context()
protected LicenseHostProContext createContext()
public java.lang.String getLicenseExpireInfo(License aLicense)
LicenseHost
getLicenseExpireInfo
in class LicenseHost
aLicense
- to return expiration information for.
public void setLicenseReader(LicenseReader aLicenseReader)
LicenseHost
LicenseReader
instance used to read licenses
setLicenseReader
in class LicenseHost
aLicenseReader
- a LicenseReader
instance to assignprotected LicenseReaderListener getLicenseReaderListener()
protected static java.lang.String getLatestDeactivationKeyPropertyName(License aLicense)
public java.lang.String getLatestDeactivationKey()
protected java.lang.String getLatestDeactivationKey(License aLicense)
protected void setLatestDeactivationKey(License aLicense, java.lang.String aDeactivationKey)
protected static java.lang.String getLatestActivationKeyPropertyName(License aLicense)
public java.lang.String getLatestActivationKey()
protected java.lang.String getLatestActivationKey(License aLicense)
protected void setLatestActivationKey(License aLicense, java.lang.String anActivationKey)
public boolean checkoutLicense()
true
if license has been successfully checked out; false
otherwisepublic boolean canCheckoutLicense()
true
if license can be checked out; false
otherwisepublic boolean terminateLicensePass()
true
if License Pass has been terminated; false
otherwisepublic boolean canTerminateLicensePass()
true
if License can be terminated; false
otherwiseprotected static java.lang.String getPropertyNameForLicense(java.lang.String aPropertyName, License aLicense)
protected boolean checkLicenseUpgrade(License aLicense)
checkLicenseUpgrade
in class LicenseHost
public LicenseUpgradeChecker getLicenseUpgradeChecker()
LicenseUpgradeChecker
used to perform check of validity of upgrade license
LicenseUpgradeChecker
public void setLicenseUpgradeChecker(LicenseUpgradeChecker aLicenseUpgradeChecker)
LicenseUpgradeChecker
should be used to perform check of validity of upgrade license
aLicenseUpgradeChecker
- an instance of LicenseUpgradeChecker
protected LicenseUpgradeChecker createLicenseUpgradeChecker()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |