|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jp.protection.pub.pro.LicenseUpgradeChecker
public class LicenseUpgradeChecker
This class is responsible of checking whether upgrade license is valid by finding and analyzing license of previous versions
Nested Class Summary | |
---|---|
static class |
LicenseUpgradeChecker.BackupLicenseReader
Special sub-class of LicenseReader that allows reading licenses from backup |
static class |
LicenseUpgradeChecker.FileLicenseReader
Special sub-class of LicenseReader that allows reading licenses from a specified file |
Field Summary | |
---|---|
protected LicenseHostPro |
fLicenseHost
|
protected java.util.List<LicenseLocation> |
fPrevLicenseLocations
|
static java.lang.String |
PROP_CHECK_LICENSE_UPGRADE
|
static java.lang.String |
PROP_PREV_LICENSE_MAJOR_VERSION
|
static java.lang.String |
PROP_PREV_LICENSE_MINOR_VERSION
|
Constructor Summary | |
---|---|
LicenseUpgradeChecker(LicenseHostPro aLicenseHost)
Creates a new instance of LicenseUpgradeChecker |
Method Summary | |
---|---|
void |
addPrevLicenseLocation(LicenseLocation aLocation)
Adds location for license of previous version |
protected boolean |
checkLicenseProductEditions(License aNewLicense,
License aAnOldLicense)
|
boolean |
checkLicenseUpgrade(License aNewLicense)
Checks whether upgrade license is valid by finding and analyzing license of previous versions |
protected boolean |
checkLicenseUpgrade(License aNewLicense,
License anOldLicense)
|
protected boolean |
checkLicenseUpgradeImpl(LicenseReader aLicenseReader,
License aNewLicense)
|
protected boolean |
checkLicenseVersions(License aNewLicense,
License anOldLicense)
|
protected long |
composeVersion(int aMajorVersion,
int aMinorVersion)
|
protected LicenseReader |
createBackupLicenseReader()
|
protected LicenseReader |
createFileLicenseReader(java.io.File aFile)
|
protected java.util.List<LicenseReader> |
getLicenseReaders()
|
protected void |
initLicenseReader(LicenseReader aLicenseReader)
|
boolean |
isCheckLicenseUpgrade(License aLicense)
Tests whether license check need to be performed by looking up the Secret Storages for PROP_CHECK_LICENSE_UPGRADE property value |
void |
removePrevLicenseLocation(LicenseLocation aLocation)
Removes location for license of previous version |
void |
setCheckLicenseUpgrade(License aLicense,
boolean aValue)
Specifies whether license check need to be performed by storing the PROP_CHECK_LICENSE_UPGRADE property
in the Secret Storages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LicenseHostPro fLicenseHost
public static final java.lang.String PROP_PREV_LICENSE_MAJOR_VERSION
public static final java.lang.String PROP_PREV_LICENSE_MINOR_VERSION
public static final java.lang.String PROP_CHECK_LICENSE_UPGRADE
protected java.util.List<LicenseLocation> fPrevLicenseLocations
Constructor Detail |
---|
public LicenseUpgradeChecker(LicenseHostPro aLicenseHost)
LicenseUpgradeChecker
aLicenseHost
- an instance of LicenseHostPro
this checker will work withMethod Detail |
---|
public boolean checkLicenseUpgrade(License aNewLicense)
aNewLicense
- a new license to check
protected java.util.List<LicenseReader> getLicenseReaders()
public boolean isCheckLicenseUpgrade(License aLicense)
PROP_CHECK_LICENSE_UPGRADE
property value
aLicense
- a license to test
true
if license check need to be performed; false
otherwisepublic void setCheckLicenseUpgrade(License aLicense, boolean aValue)
PROP_CHECK_LICENSE_UPGRADE
property
in the Secret Storages
aLicense
- a licenseaValue
- true
if check need to be performed; false
otherwiseprotected boolean checkLicenseUpgradeImpl(LicenseReader aLicenseReader, License aNewLicense)
protected boolean checkLicenseUpgrade(License aNewLicense, License anOldLicense)
protected boolean checkLicenseProductEditions(License aNewLicense, License aAnOldLicense)
protected boolean checkLicenseVersions(License aNewLicense, License anOldLicense)
protected long composeVersion(int aMajorVersion, int aMinorVersion)
protected LicenseReader createBackupLicenseReader()
protected LicenseReader createFileLicenseReader(java.io.File aFile)
protected void initLicenseReader(LicenseReader aLicenseReader)
public void addPrevLicenseLocation(LicenseLocation aLocation)
aLocation
- a LicenseLocation
public void removePrevLicenseLocation(LicenseLocation aLocation)
aLocation
- a LicenseLocation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |