Class LicenseGenerator
java.lang.Object
com.vaadin.collaborationengine.licensegenerator.LicenseGenerator
A generator of Collaboration Engine licenses.
This generator produces licensing data from inputs such as license owner, user quota and end-date. It also generates a unique license identifier and calculates the checksum of the license content.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateLicense(String owner, int quota, LocalDate endDate) Generates a license inJSONformat.generateLicense(UUID key, String owner, int quota, LocalDate endDate) Generates a license inJSONformat.
-
Constructor Details
-
LicenseGenerator
public LicenseGenerator()Creates the license-generator.
-
-
Method Details
-
generateLicense
Generates a license inJSONformat.It takes the owner name, the user quota and the license end-date.
A checksum of the license content will be calculated and appended to the
JSONobject.- Parameters:
owner- the name of the license ownerquota- the license user quotaendDate- the license end-date- Returns:
- the license in
JSONformat
-
generateLicense
Generates a license inJSONformat.It takes in a license key, the owner name, the user quota and the license end-date.
A checksum of the license content will be calculated and appended to the
JSONobject.- Parameters:
key- the license keyowner- the name of the license ownerquota- the license user quotaendDate- the license end-date- Returns:
- the license in
JSONformat
-