public class LicenseText
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_FLOATING_LICENSE_FILE |
static int |
TYPE_LICENSE_FILE |
Constructor and Description |
---|
LicenseText()
LicenseText constructor, creates an empty License object.
|
LicenseText(java.lang.String licenseString,
java.lang.String publicKey)
License constructor, creates license text by loading given license text
string.
|
Modifier and Type | Method and Description |
---|---|
long |
getActivationCompletedDateTime()
Get activation completed date time.
|
int |
getActivationHardwareIDSelection()
Get activation hardware ID selection value.
|
long |
getActivationID()
Get activation ID if activation is completed.
|
int |
getActivationPeriod()
Get activation period if defined.
|
int |
getActivationReturnType()
Return activation return type.
|
java.lang.String |
getContent(java.lang.String publickey)
Returns license text string.
|
java.lang.String |
getCustomSignedFeature(java.lang.String key)
Get custom signed feature.
|
int |
getCustomSignedFeatureConcurrentQuantity(java.lang.String key)
Get custom signed feature concurrent quantity.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getCustomSignedFeatures()
Get custom signed features in a hashmap.
|
java.lang.String |
getCustomUnsignedFeature(java.lang.String key)
Get custom unsigned feature.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getCustomUnsignedFeatures()
Get custom unsigned features in a hashmap.
|
int |
getDatetimeCheck()
Get if online date time check is enabled.
|
java.lang.String |
getDatetimeNTPServer()
Get NTP server which will be used for online date time check if enabled.
|
int |
getDatetimeNTPServerTimeout()
Get NTP server connection timeout value which will be used for online
date time check if enabled.
|
java.lang.String |
getDatetimeWebServer()
Get web server which will be used for online date time check if enabled.
|
int |
getDatetimeWebServerTimeout()
Get web server connection timeout value which will be used for online
date time check if enabled.
|
java.lang.String |
getFloatingAllowedIPs()
When defined floating license text type license can be used by only
|
int |
getFloatingLicenseAllowMultipleInstanceLimit()
Get maximum allowed instances if floating license allows multiple instances on same host with same
user.
|
int |
getFloatingLicenseCheckPeriod()
Get floating license check period in minutes, runtime library runs a
timer to check for license availability.
|
int |
getFloatingLicenseServerConnectionCheckPeriod()
Get floating license server connection check period in minutes, runtime
library runs a timer to check for floating license server availability.
|
int |
getFloatingLicenseSupersedeAllLicenses()
Get value for supersede all old license settings.
|
java.lang.String |
getFloatingLicenseSupersedeLicenses()
Get floating licenses IDs which is superseded by this license.
|
int |
getFloatingOverUsePercent()
When defined floating license text type license only can be allowed to be
overused on floating license server.
|
int |
getLicenseActivationDaysRemaining(java.util.Date currentDate)
Returns license activation days remaining.
|
java.util.Date |
getLicenseExpireDate()
Returns license expiration date.
|
int |
getLicenseExpireDaysRemaining(java.util.Date currentDate)
Gives number of days left before expiration if license validity period is
defined.
|
int |
getLicenseFileType()
Returns license text type, either normal license text or floating license
text.
|
long |
getLicenseGenerationDateTime()
Return license generation date time if set.
|
java.lang.String |
getLicenseHardwareID()
If generated license is node-locked, locked computer hardware ID returns.
|
long |
getLicenseID()
Return unique license id.
|
java.util.Date |
getLicenseMaintenanceExpireDate()
Returns license maintenance expire date.
|
int |
getLicenseMaintenanceExpireDaysRemaining(java.util.Date currentDate)
Returns license maintenance expiration days remaining.
|
int |
getLicenseMaintenancePeriod()
Get license maintenence validity period in number of days.
|
java.lang.String |
getLicenseProductName()
Get product name which license is generated for.
|
java.util.Properties |
getLicenseProperties()
Method returns all raw license properties.
|
java.lang.String |
getLicensePublicKey()
Return license public key, public key is only found in floating license
text.
|
int |
getLicenseQuantity()
Return license quantity.
|
java.lang.String |
getLicenseSignature()
Return license signature after generation.
|
int |
getLicenseValidityPeriod()
Get license validity period in number of days.
|
java.lang.String |
getLicenseValidProductEdition()
Get product edition which license is generated and only valid for.
|
java.lang.String |
getLicenseValidProductID()
Get product ID which license is generated and only valid for.
|
java.lang.String |
getLicenseValidProductVersion()
Get product version which license is generated and only valid for.
|
int |
getOnlineKeyMaxFailureCount()
Get online license key floating over internet maximum failure count.
|
int |
getOnlineKeyMaxInactivePeriod()
Get online license key floating over internet maximum inactive period
before removing lease.
|
java.lang.String |
getUserCity()
Get license owner user city name.
|
java.lang.String |
getUserCompany()
Get license owner company name.
|
java.lang.String |
getUserCountry()
Get license owner user country name.
|
java.lang.String |
getUserEMail()
Get license owner user e-mail address.
|
java.lang.String |
getUserFax()
Get license owner user fax number.
|
java.lang.String |
getUserFullName()
Get license owner user full name.
|
java.lang.String |
getUserRegisteredTo()
Get user name which license is registered to.
|
java.lang.String |
getUserStreet()
Get license owner user street address.
|
java.lang.String |
getUserTelephone()
Get license owner user telephone number.
|
java.lang.String |
getUserZipCode()
Get license owner user zip code.
|
boolean |
isActivationCompleted()
Return is activation is completed.
|
boolean |
isActivationRequired()
Return if activation is required for license.
|
boolean |
isDatetimeQueryLocalADServer()
Get if active directory server query is enabled.
|
boolean |
isFloatingLicenseAllowMultipleInstances()
Get if floating license allows multiple instances on same host with same
user.
|
boolean |
isGenerationDateTimeInFuture(java.util.Date currentDate)
Returns if license generation date and time is in the future.
|
void |
removeCustomSignedFeature(java.lang.String name)
Remove a custom signed feature.
|
void |
removeCustomUnsignedFeature(java.lang.String name)
Remove a custom unsigned feature.
|
void |
setActivationCompleted(boolean activationCompleted)
Set if license activation is completed.
|
void |
setActivationCompletedDateTime(long activationCompletedDateTime)
Set activation completed date time.
|
void |
setActivationHardwareIDSelection(int activationHardwareIDSelection)
Set activation hardware ID selection value.
|
void |
setActivationID(long activationID)
Set activation ID if activation is completed.
|
void |
setActivationPeriod(int activationPeriod)
Set activation period.
|
void |
setActivationRequired(boolean activationRequired)
Set if license requires activation.
|
void |
setActivationReturnType(int activationReturnType)
Set activation return type.
|
void |
setCustomSignedFeature(java.lang.String name,
java.lang.String value)
Set a custom signed feature.
|
void |
setCustomSignedFeatures(java.util.HashMap<java.lang.String,java.lang.String> customSignedFeaturesHashMap)
Set custom signed features in a hashmap.
|
void |
setCustomUnsignedFeature(java.lang.String name,
java.lang.String value)
Set a custom unsigned feature.
|
void |
setCustomUnsignedFeatures(java.util.HashMap<java.lang.String,java.lang.String> customUnsignedFeaturesHashMap)
Set custom unsigned features in a hashmap.
|
void |
setDatetimeCheck(int datetimeCheck)
Set if online date time check is enabled.
|
void |
setDatetimeNTPServer(java.lang.String datetimeNTPServer)
Set NTP server which will be used for online date time check if enabled.
|
void |
setDatetimeNTPServerTimeout(int datetimeNTPServerTimeout)
Set NTP server connection timeout value which will be used for online
date time check if enabled.
|
void |
setDatetimeQueryLocalADServer(boolean datetimeQueryLocalADServer)
Set active directory date time query if found in local network.
|
void |
setDatetimeWebServer(java.lang.String datetimeWebServer)
Set web server which will be used for online date time check if enabled.
|
void |
setDatetimeWebServerTimeout(int datetimeWebServerTimeout)
Set web server connection timeout value which will be used for online
date time check if enabled.
|
void |
setFloatingAllowedIPs(java.lang.String ips)
When defined floating license text type license can be used by only
defined IPs or IP blocks.
|
void |
setFloatingLicenseAllowMultipleInstanceLimit(int floatingLicenseAllowMultipleInstanceLimit)
Set a limit on instances if floating license allows multiple instances on same host with same
user.
|
void |
setFloatingLicenseAllowMultipleInstances(boolean floatingLicenseAllowMultipleInstances)
Set if floating license allows multiple instances on same host with same
user.
|
void |
setFloatingLicenseCheckPeriod(int floatingLicenseCheckPeriod)
Set floating license check period in minutes, runtime library runs a
timer to check for license availability.
|
void |
setFloatingLicenseServerConnectionCheckPeriod(int floatingLicenseServerConnectionCheckPeriod)
Set floating license server connection check period in minutes, runtime
library runs a timer to check for floating license server availability.
|
void |
setFloatingLicenseSupersedeAllLicenses(int floatingLicenseSupersedeAllLicenses)
Set value for supersede all old license settings.
|
void |
setFloatingLicenseSupersedeLicenses(java.lang.String floatingLicenseSupersedeLicenses)
Set floating licenses IDs which is superseded by this license.
|
void |
setFloatingOverUsePercent(int floatingOverUsePercent)
When defined floating license text type license only can be allowed to be
overused on floating license server.
|
void |
setLicenseFileType(int licenseFileType)
Should be only used if generating floating license text.
|
void |
setLicenseGenerationDateTime(long licenseGenerationDateTime)
Set license generation date time, long value from epoch.
|
void |
setLicenseHardwareID(java.lang.String licenseHardwareID)
To generate a node-locked license hardware ID string obtained from
HardwareID class or HardwareIDViewer application is given.
|
void |
setLicenseID(long licenseID)
Set unique license id, if not set it is auto generated.
|
void |
setLicenseMaintenancePeriod(int licenseMaintenancePeriod)
Set license maintenance validity period in number of days.
|
void |
setLicenseProductName(java.lang.String licenseProductName)
Set product name which license is generated for.
|
void |
setLicensePublicKey(java.lang.String licensePublicKey)
Set license public key, public key should only be set for floating
license text.
|
void |
setLicenseQuantity(int licenseQuantity)
Set license quantity.
|
void |
setLicenseSignature(java.lang.String licenseSignature)
License signature is auto generated, do not set it.
|
void |
setLicenseValidityPeriod(int licenseValidityPeriod)
Set license validity period in number of days.
|
void |
setLicenseValidProductEdition(java.lang.String licenseValidProductEdition)
Set product edition which license is generated and only valid for.
|
void |
setLicenseValidProductID(java.lang.String licenseValidProductID)
Set product ID which license is generated and only valid for.
|
void |
setLicenseValidProductVersion(java.lang.String licenseValidProductVersion)
Set product version which license is generated and only valid for.
|
void |
setOnlineKeyMaxFailureCount(int onlineKeyMaxFailureCount)
Set online license key floating over internet maximum failure count.
|
void |
setOnlineKeyMaxInactivePeriod(int onlineKeyMaxInactivePeriod)
Set online license key floating over internet maximum inactive period
before removing lease.
|
void |
setUserCity(java.lang.String userCity)
Set license owner user city name.
|
void |
setUserCompany(java.lang.String userCompany)
Set license owner company name.
|
void |
setUserCountry(java.lang.String userCountry)
Set license owner user country name.
|
void |
setUserEMail(java.lang.String userEMail)
Set license owner user e-mail address.
|
void |
setUserFax(java.lang.String userFax)
Set license owner user fax number.
|
void |
setUserFullName(java.lang.String userFullName)
Set license owner user full name.
|
void |
setUserRegisteredTo(java.lang.String userRegisteredTo)
Set user name which license is registered to.
|
void |
setUserStreet(java.lang.String userStreet)
Set license owner user street address.
|
void |
setUserTelephone(java.lang.String userTelephone)
Set license owner uer telephone number.
|
void |
setUserZipCode(java.lang.String userZipCode)
Set license owner user zip code.
|
public static final int TYPE_LICENSE_FILE
public static final int TYPE_FLOATING_LICENSE_FILE
public LicenseText()
public LicenseText(java.lang.String licenseString, java.lang.String publicKey) throws LicenseSecurityException
licenseString
- publicKey
- LicenseSecurityException
public java.lang.String getContent(java.lang.String publickey) throws LicenseSecurityException
publickey
- LicenseSecurityException
public java.util.Properties getLicenseProperties()
public int getLicenseExpireDaysRemaining(java.util.Date currentDate)
currentDate
- public java.util.Date getLicenseExpireDate()
public boolean isGenerationDateTimeInFuture(java.util.Date currentDate)
currentDate
- public int getLicenseMaintenanceExpireDaysRemaining(java.util.Date currentDate)
currentDate
- if null new Date() is used.public java.util.Date getLicenseMaintenanceExpireDate()
public int getLicenseActivationDaysRemaining(java.util.Date currentDate)
currentDate
- public int getLicenseFileType()
public void setLicenseFileType(int licenseFileType)
licenseFileType
- public java.lang.String getUserRegisteredTo()
public void setUserRegisteredTo(java.lang.String userRegisteredTo)
userRegisteredTo
- public java.lang.String getUserFullName()
public void setUserFullName(java.lang.String userFullName)
userFullName
- public java.lang.String getUserEMail()
public void setUserEMail(java.lang.String userEMail)
userEMail
- public java.lang.String getUserCompany()
public void setUserCompany(java.lang.String userCompany)
userCompany
- public java.lang.String getUserTelephone()
public void setUserTelephone(java.lang.String userTelephone)
userTelephone
- public java.lang.String getUserFax()
public void setUserFax(java.lang.String userFax)
userFax
- public java.lang.String getUserStreet()
public void setUserStreet(java.lang.String userStreet)
userStreet
- public java.lang.String getUserCity()
public void setUserCity(java.lang.String userCity)
userCity
- public java.lang.String getUserZipCode()
public void setUserZipCode(java.lang.String userZipCode)
userZipCode
- public java.lang.String getUserCountry()
public void setUserCountry(java.lang.String userCountry)
userCountry
- public long getLicenseID()
public void setLicenseID(long licenseID)
licenseID
- public long getLicenseGenerationDateTime()
public void setLicenseGenerationDateTime(long licenseGenerationDateTime)
licenseGenerationDateTime
- public java.lang.String getLicenseHardwareID()
public void setLicenseHardwareID(java.lang.String licenseHardwareID)
licenseHardwareID
- public int getFloatingOverUsePercent()
public void setFloatingOverUsePercent(int floatingOverUsePercent)
floatingOverUsePercent
- public java.lang.String getFloatingAllowedIPs()
public void setFloatingAllowedIPs(java.lang.String ips)
ips
- public int getLicenseQuantity()
public void setLicenseQuantity(int licenseQuantity)
licenseQuantity
- public java.lang.String getLicenseProductName()
public void setLicenseProductName(java.lang.String licenseProductName)
licenseProductName
- public java.lang.String getLicenseValidProductID()
public void setLicenseValidProductID(java.lang.String licenseValidProductID)
licenseValidProductID
- public java.lang.String getLicenseValidProductEdition()
public void setLicenseValidProductEdition(java.lang.String licenseValidProductEdition)
licenseValidProductEdition
- public java.lang.String getLicenseValidProductVersion()
public void setLicenseValidProductVersion(java.lang.String licenseValidProductVersion)
licenseValidProductVersion
- public int getLicenseValidityPeriod()
public void setLicenseValidityPeriod(int licenseValidityPeriod)
licenseValidityPeriod
- public int getLicenseMaintenancePeriod()
public void setLicenseMaintenancePeriod(int licenseMaintenancePeriod)
licenseMaintenancePeriod
- public boolean isActivationRequired()
public void setActivationRequired(boolean activationRequired)
activationRequired
- public boolean isActivationCompleted()
public void setActivationCompleted(boolean activationCompleted)
activationCompleted
- public long getActivationCompletedDateTime()
public void setActivationCompletedDateTime(long activationCompletedDateTime)
activationCompletedDateTime
- public int getActivationPeriod()
public void setActivationPeriod(int activationPeriod)
activationPeriod
- public int getActivationReturnType()
public void setActivationReturnType(int activationReturnType)
activationReturnType
- public int getActivationHardwareIDSelection()
public void setActivationHardwareIDSelection(int activationHardwareIDSelection)
activationHardwareIDSelection
- public int getDatetimeCheck()
public void setDatetimeCheck(int datetimeCheck)
datetimeCheck
- public java.lang.String getDatetimeNTPServer()
public void setDatetimeNTPServer(java.lang.String datetimeNTPServer)
datetimeNTPServer
- public int getDatetimeNTPServerTimeout()
public void setDatetimeNTPServerTimeout(int datetimeNTPServerTimeout)
datetimeNTPServerTimeout
- public java.lang.String getDatetimeWebServer()
public void setDatetimeWebServer(java.lang.String datetimeWebServer)
datetimeWebServer
- public int getDatetimeWebServerTimeout()
public void setDatetimeWebServerTimeout(int datetimeWebServerTimeout)
datetimeWebServerTimeout
- public boolean isDatetimeQueryLocalADServer()
public void setDatetimeQueryLocalADServer(boolean datetimeQueryLocalADServer)
datetimeQueryLocalADServer
- public java.util.HashMap<java.lang.String,java.lang.String> getCustomSignedFeatures()
public void setCustomSignedFeatures(java.util.HashMap<java.lang.String,java.lang.String> customSignedFeaturesHashMap)
customSignedFeaturesHashMap
- public java.util.HashMap<java.lang.String,java.lang.String> getCustomUnsignedFeatures()
public void setCustomUnsignedFeatures(java.util.HashMap<java.lang.String,java.lang.String> customUnsignedFeaturesHashMap)
customUnsignedFeaturesHashMap
- public java.lang.String getLicenseSignature()
public void setLicenseSignature(java.lang.String licenseSignature)
licenseSignature
- public java.lang.String getLicensePublicKey()
public void setLicensePublicKey(java.lang.String licensePublicKey)
licensePublicKey
- public int getFloatingLicenseCheckPeriod()
public void setFloatingLicenseCheckPeriod(int floatingLicenseCheckPeriod)
floatingLicenseCheckPeriod
- public int getFloatingLicenseServerConnectionCheckPeriod()
public void setFloatingLicenseServerConnectionCheckPeriod(int floatingLicenseServerConnectionCheckPeriod)
floatingLicenseServerConnectionCheckPeriod
- public boolean isFloatingLicenseAllowMultipleInstances()
public void setFloatingLicenseAllowMultipleInstances(boolean floatingLicenseAllowMultipleInstances)
floatingLicenseAllowMultipleInstances
- public int getFloatingLicenseAllowMultipleInstanceLimit()
public void setFloatingLicenseAllowMultipleInstanceLimit(int floatingLicenseAllowMultipleInstanceLimit)
floatingLicenseAllowMultipleInstanceLimit
- public void setCustomUnsignedFeature(java.lang.String name, java.lang.String value)
name
- value
- public void setCustomSignedFeature(java.lang.String name, java.lang.String value)
name
- value
- public void removeCustomSignedFeature(java.lang.String name)
name
- public void removeCustomUnsignedFeature(java.lang.String name)
name
- public int getOnlineKeyMaxInactivePeriod()
public void setOnlineKeyMaxInactivePeriod(int onlineKeyMaxInactivePeriod)
onlineKeyMaxInactivePeriod
- public int getOnlineKeyMaxFailureCount()
public void setOnlineKeyMaxFailureCount(int onlineKeyMaxFailureCount)
onlineKeyMaxFailureCount
- public java.lang.String getCustomUnsignedFeature(java.lang.String key)
key
- public java.lang.String getCustomSignedFeature(java.lang.String key)
key
- public int getCustomSignedFeatureConcurrentQuantity(java.lang.String key)
key
- public long getActivationID()
public void setActivationID(long activationID)
activationID
- public java.lang.String getFloatingLicenseSupersedeLicenses()
public void setFloatingLicenseSupersedeLicenses(java.lang.String floatingLicenseSupersedeLicenses)
floatingLicenseSupersedeLicenses
- public int getFloatingLicenseSupersedeAllLicenses()
public void setFloatingLicenseSupersedeAllLicenses(int floatingLicenseSupersedeAllLicenses)
floatingLicenseSupersedeAllLicenses
-