Class License
java.lang.Object
org.bgerp.app.dist.lic.License
License for plugins.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLicense file namestatic final StringConfig key of the expiration datestatic final StringConfig key of the license emailstatic final StringConfig key of the license IDstatic final StringConfig key of the session limitstatic final StringConfig key prefix of licensed pluginsstatic final StringConfig key of the signature -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(DynActionForm form) AddsLicenseEventtoformresponse case the license has error.booleanChecks if count of logged in users is less that license limit.getData()License content.byte[]Digest for all the license's lines before lic.sign.signature.getError()License check result.Plugin IDs.booleanWhether the license object was created today.byte[]License content with signature on the end.toString()
-
Field Details
-
FILE_NAME
-
KEY_LIC_ID
-
KEY_LIC_EMAIL
-
KEY_LIC_LIMIT
-
KEY_LIC_DATE_TO
-
KEY_LIC_PLUGIN
-
KEY_LIC_SIGN
-
-
Constructor Details
-
License
-
-
Method Details
-
getData
-
getDigest
public byte[] getDigest()Digest for all the license's lines before lic.sign.signature.- Returns:
- digest
-
getError
-
getPlugins
-
sign
License content with signature on the end.- Parameters:
keyFilePath- file of Java resource path to SSH private key file.keyFilePswd- password to SSH private key file,null- no password is used.- Returns:
- UTF-8 encoded signed license.
- Throws:
Exception- on a signing error
-
check
AddsLicenseEventtoformresponse case the license has error.- Parameters:
form- request form
-
checkSessionLimit
public boolean checkSessionLimit()Checks if count of logged in users is less that license limit. Whenerroris not blank, returnstrueto allow fix the license. Returntruewhen license check is disabled.- Returns:
- allowance to log in.
-
isCreatedToday
public boolean isCreatedToday()Whether the license object was created today.- Returns:
- is the license object created today.
-
toString
-