|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.beesoft.abeona.LicenseGenerator
public final class LicenseGenerator
The LicenseGenerator
is used to generate license properties
protected by Abeona signature system.
Generated properties are common Java properties. There are three new
properties appended to result of LicenseGenerator
:
Yout don't need to do anything with these properies directly. The first
should ensure identification of person or company who generated license only.
The second has the same meaning. The third is used by
License
class to verify that generated
license is unchanged and valid.
This class can be used in a very simple way. All you need to do is to create
new or obtain existing Product
, prepare
your own java.util.Properties and then use one of
generate(Properties, Product)
methods to sign your properties. These
signed properties you can save to file via method
storeLicense(Properties,Product,String)
.
Warning: This class is protected by Abeona signature system itself. Unauthorized usage returns always the same key-pair which is used for presentation purpose.
Method Summary | |
---|---|
java.util.Properties |
generate(java.io.InputStream input,
Product product)
For properties from given input generates signed properties. |
java.util.Properties |
generate(java.util.List<java.lang.String> lines,
Product product)
For properties from given input List of Strings generates signed properties. |
java.util.Properties |
generate(java.util.Properties properties,
Product product)
Generates resultant properties as license properties. |
java.util.Properties |
generate(java.lang.String[] lines,
Product product)
For properties from given input array of Strings generates signed properties. |
java.util.Properties |
generate(java.lang.String text,
Product product)
For properties from given input String generates signed properties. |
void |
storeLicense(java.util.Properties properties,
Product product,
java.lang.String fileName)
Stores signed properties to file with given file name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.util.Properties generate(java.util.Properties properties, Product product) throws LicenseException
Attempt to change any one of the signed properties results in signature violation.
properties
- Properties to store to properties fileproduct
- Product for which is generated license (and used to encode
digital signature)
LicenseException
- when any error occurs while computing signaturepublic java.util.Properties generate(java.io.InputStream input, Product product) throws LicenseException
generate(Properties, Product)
for details.
input
- InputStream to read Properties
- most often
from a fileproduct
- Product for which is generated license (and used to encode
digital signature)
LicenseException
- when any error occurspublic java.util.Properties generate(java.lang.String text, Product product) throws LicenseException
generate(Properties, Product)
for details.
text
- Text of license file, consists of lines separated by a new
line character. Individual lines must satisfy line format of
property file.product
- Product for which is generated license (and used to encode
digital signature)
LicenseException
- when any error occurspublic java.util.Properties generate(java.util.List<java.lang.String> lines, Product product) throws LicenseException
generate(Properties, Product)
for details.
lines
- List of lines to store to properties file. List can contain
null
or empty lines, comment lines started with
'#' character and property lines in format key=valueproduct
- Product for which is generated license (and used to encode
digital signature)
LicenseException
- when any error occurspublic java.util.Properties generate(java.lang.String[] lines, Product product) throws LicenseException
generate(Properties, Product)
for details.
lines
- Array of lines to store to properties file. Array can contain
null
or empty lines, comment lines started with
'#' character and property lines in format key=valueproduct
- Product for which is generated license (and used to encode
digital signature)
LicenseException
- when any error occurspublic void storeLicense(java.util.Properties properties, Product product, java.lang.String fileName) throws java.io.IOException
properties
- properties (license) to storeproduct
- instance of Product
which was used
to generate license signaturefileName
- name of file to store license
java.io.IOException
- if any error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |