Class LicenseGenerator
- java.lang.Object
-
- com.vaadin.collaborationengine.licensegenerator.LicenseGenerator
-
public class LicenseGenerator extends java.lang.ObjectA 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 Constructor Description LicenseGenerator()Creates the license-generator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgenerateLicense(java.lang.String owner, int quota, java.time.LocalDate endDate)Generates a license inJSONformat.java.lang.StringgenerateLicense(java.util.UUID key, java.lang.String owner, int quota, java.time.LocalDate endDate)Generates a license inJSONformat.
-
-
-
Method Detail
-
generateLicense
public java.lang.String generateLicense(java.lang.String owner, int quota, java.time.LocalDate endDate)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
public java.lang.String generateLicense(java.util.UUID key, java.lang.String owner, int quota, java.time.LocalDate endDate)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
-
-