Package de.xima.fc.mdl.license
Class LicenseModel
- java.lang.Object
 - 
- de.xima.fc.mdl.license.LicenseModel
 
 
- 
- All Implemented Interfaces:
 Serializable
public class LicenseModel extends Object implements Serializable
Model to access an license based on there file-data- Author:
 - XIMA MEDIA GmbH, Dresden
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description LicenseModel(byte[] licenseFileData, Predicate<LicenseModel> serverNodeAcceptedFunction)LicenseModel(byte[] licenseFileData, List<byte[]> subLicensesFileData, Predicate<LicenseModel> serverNodeAcceptedFunction) 
- 
Method Summary
 
 - 
 
- 
- 
Constructor Detail
- 
LicenseModel
public LicenseModel(byte[] licenseFileData, Predicate<LicenseModel> serverNodeAcceptedFunction)- Parameters:
 licenseFileData- the license-fileserverNodeAcceptedFunction- the function to check if the server node is accepted
 
- 
LicenseModel
public LicenseModel(byte[] licenseFileData, List<byte[]> subLicensesFileData, Predicate<LicenseModel> serverNodeAcceptedFunction)- Parameters:
 licenseFileData- Data of the license file, may be null.subLicensesFileData- List of sublicense files, may be empty (or null).serverNodeAcceptedFunction- The function to check if the server node is accepted
 
 - 
 
- 
Method Detail
- 
getProcessingLicenseKey
public static String getProcessingLicenseKey(EWorkflowNodeType workflowNodeType)
 
- 
getTriggerLicenseKey
public static String getTriggerLicenseKey(EWorkflowTriggerType workflowTriggerType)
 
- 
getLicense
public javax0.license3j.License getLicense()
Initializes the license (if needed) and returns them- Returns:
 - the license
 
 
- 
getLicenseFileData
public byte[] getLicenseFileData()
The license binary- Returns:
 - the binary data of the license
 
 
- 
isSkipHardwareIdCheck
public boolean isSkipHardwareIdCheck()
- Returns:
 trueto skip the hardware check and allow all hardware IDs,falseto perform the hardware ID check. May be useful for development and testing.
 
- 
isSubLicense
public boolean isSubLicense()
- Returns:
 trueif the license is an sub-license,falseotherwise
 
- 
isLicenseOK
public boolean isLicenseOK()
- Returns:
 trueif the license-file is ok,falseotherwise
 
- 
isDemoLicense
public boolean isDemoLicense()
- Returns:
 trueif the license is an demo,falseotherwise
 
- 
isServerNodeAccepted
public boolean isServerNodeAccepted()
- Returns:
 trueif the floating licenses are exceeded
 
- 
isHardwareIdAccepted
public boolean isHardwareIdAccepted()
- Returns:
 trueif the maintenance-period is expired,falseotherwise
 
- 
isMaintenanceExpired
public boolean isMaintenanceExpired()
- Returns:
 trueif the maintenance-period is expired,falseotherwise
 
- 
isExpired
public boolean isExpired()
- Returns:
 trueif the license is expired,falseotherwise
 
- 
getLicenseKey
public String getLicenseKey()
- Returns:
 - the license key or 
null 
 
- 
getHardwareIds
public String[] getHardwareIds()
- Returns:
 - the array of hardware-ids
 
 
- 
getLicenseName
public String getLicenseName()
- Returns:
 - the name of the license
 
 
- 
getLicenseType
public ELicenseCheckType getLicenseType()
- Returns:
 - the type of the license
 
 
- 
getLicenseVolume
public long getLicenseVolume()
- Returns:
 - the volume of the license
 
 
- 
getLicenseMappingName
public String getLicenseMappingName()
- Returns:
 - the mapping name of the licnese
 
 
- 
getVersionKey
public String getVersionKey()
- Returns:
 - the key of the license version
 
 
- 
getParentLicenseKey
public String getParentLicenseKey()
- Returns:
 - the key of the parent license
 
 
- 
getProductKey
public String getProductKey()
- Returns:
 - the key of the product
 
 
- 
getProductName
public String getProductName()
- Returns:
 - the name of the product
 
 
- 
getProductVersion
public String getProductVersion()
- Returns:
 - the version of the product
 
 
- 
getUserFullName
public String getUserFullName()
- Returns:
 - the name of the license user
 
 
- 
getUserEMail
public String getUserEMail()
- Returns:
 - the email of the license user
 
 
- 
getUserCompanyName
public String getUserCompanyName()
- Returns:
 - the name of the company
 
 
- 
getProfContactName
public String getProfContactName()
- Returns:
 - the name of the professional contact
 
 
- 
getProfContactMail
public String getProfContactMail()
- Returns:
 - the mail of the professional contact
 
 
- 
getProfContactPhone
public String getProfContactPhone()
- Returns:
 - the phone number of the professional contact
 
 
- 
getTechContactPhone
public String getTechContactPhone()
- Returns:
 - the phone number of the technical contact
 
 
- 
getTechContactName
public String getTechContactName()
- Returns:
 - the name of the technical contact
 
 
- 
getTechContactMail
public String getTechContactMail()
- Returns:
 - the mail of the technical contact
 
 
- 
getUserTelNumber
public String getUserTelNumber()
- Returns:
 - the phone number of the user
 
 
- 
getLicenseCreationDate
public LocalDateTime getLicenseCreationDate()
- Returns:
 - the creation date of the license
 
 
- 
getLicenseModificationDate
public LocalDateTime getLicenseModificationDate()
- Returns:
 - the modification date of the license
 
 
- 
getLicenseExpireDate
public LocalDateTime getLicenseExpireDate()
- Returns:
 - the expire date of the license
 
 
- 
getMaintenanceExpireDate
public LocalDateTime getMaintenanceExpireDate()
- Returns:
 - the maintenance expire date of the license
 
 
- 
getSubLicenseFeaturesMap
public Map<String,List<IItemLicenseModel>> getSubLicenseFeaturesMap()
 
- 
getRawData
public String getRawData()
 
- 
isValidLicense
public boolean isValidLicense(String parentKey)
- Parameters:
 parentKey- the parent-key to check- Returns:
 trueif the license is valid,falseotherwise
 
- 
getLicenseStatus
public ELicenseState getLicenseStatus(String parentKey)
Checks the license state- Parameters:
 parentKey- the parent-key to check- Returns:
 - the license state
 
 
- 
hasFeature
public boolean hasFeature(ELicenseFeature feature)
- Parameters:
 feature-ELicenseFeaturethe feature to check- Returns:
 trueif the feature is defined,falseotherwise
 
- 
hasFeature
public boolean hasFeature(String featureName)
- Parameters:
 featureName- the name of the feature to check- Returns:
 trueif the feature is defined,falseotherwise
 
- 
getString
public String getString(ELicenseFeature feature)
- Parameters:
 feature- the feature to get- Returns:
 - the value
 
 
- 
getBoolean
public boolean getBoolean(ELicenseFeature feature)
- Parameters:
 feature- the feature to get- Returns:
 - the value
 
 
- 
getNumber
public Number getNumber(ELicenseFeature feature)
- Parameters:
 feature- the feature to get- Returns:
 - the value
 
 
- 
getDate
public LocalDateTime getDate(ELicenseFeature feature)
- Parameters:
 feature- the feature to get- Returns:
 - the value
 
 
- 
getString
public String getString(ELicenseFeature feature, String defaultValue)
- Parameters:
 feature- the feature to getdefaultValue- the default value to return if the feature is not defined- Returns:
 - the value
 
 
- 
getBoolean
public boolean getBoolean(ELicenseFeature feature, boolean defaultValue)
- Parameters:
 feature- the feature to getdefaultValue- the default value to return if the feature is not defined- Returns:
 - the value
 
 
- 
getNumber
public Number getNumber(ELicenseFeature feature, Number defaultValue)
- Parameters:
 feature- the feature to getdefaultValue- the default value to return if the feature is not defined- Returns:
 - the value
 
 
- 
getDate
public LocalDateTime getDate(ELicenseFeature feature, LocalDateTime defaultValue)
- Parameters:
 feature- the feature to getdefaultValue- the default value to return if the feature is not defined- Returns:
 - the value
 
 
- 
isValid
public boolean isValid(ELicenseFeature feature)
- Parameters:
 feature- the feature to check- Returns:
 trueif the feature is valid,falseotherwise
 
- 
isValid
public boolean isValid(String featureName)
- Parameters:
 featureName- the name of the feature to check- Returns:
 trueif the feature is valid,falseotherwise
 
- 
getExpireDate
public LocalDateTime getExpireDate(ELicenseFeature feature)
- Parameters:
 feature- the feature to get the expire date of- Returns:
 - the expire date of the feature or 
null 
 
- 
getExpireDate
public LocalDateTime getExpireDate(String featureName)
- Parameters:
 featureName- the name of the feature to get the expire date of- Returns:
 - the expire date of the feature or 
null 
 
- 
getComment
public String getComment(ELicenseFeature feature)
- Parameters:
 feature- the feature to get the comment of- Returns:
 - the comment of the feature or 
null 
 
- 
getComment
public String getComment(String featureName)
- Parameters:
 featureName- the name of the feature to get the comment of- Returns:
 - the comment of the feature or 
null 
 
- 
getDate
public LocalDateTime getDate(String featureName)
- Parameters:
 featureName- the name of the feature to get the date value from- Returns:
 - the date value of the feature or 
null 
 
- 
getDate
public LocalDateTime getDate(String featureName, LocalDateTime defaultValue)
- Parameters:
 featureName- the name of the feature to get the date value fromdefaultValue- the default value to return if the feature is not defined- Returns:
 - the date value of the feature or the default value
 
 
- 
getString
public String getString(String featureName)
- Parameters:
 featureName- the name of the feature to get the string value from- Returns:
 - the string value of the feature or 
null 
 
- 
getString
public String getString(String featureName, String defaultValue)
- Parameters:
 featureName- the name of the feature to get the string value fromdefaultValue- the default value to return if the feature is not defined- Returns:
 - the string value of the feature or the default value
 
 
- 
getBoolean
public boolean getBoolean(String featureName)
- Parameters:
 featureName- the name of the feature to get the boolean value from- Returns:
 - the boolean value of the feature or 
null 
 
- 
getBoolean
public boolean getBoolean(String featureName, boolean defaultValue)
- Parameters:
 featureName- the name of the feature to get the boolean value fromdefaultValue- the default value to return if the feature is not defined- Returns:
 - the boolean value of the feature or the default value
 
 
- 
getNumber
public Number getNumber(String featureName)
- Parameters:
 featureName- the name of the feature to get the string value from- Returns:
 - the number value of the feature or 0
 
 
 - 
 
 -