Class LicenseGenerator

java.lang.Object
com.vaadin.collaborationengine.licensegenerator.LicenseGenerator

public class LicenseGenerator extends Object
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 Details

    • LicenseGenerator

      public LicenseGenerator()
      Creates the license-generator.
  • Method Details

    • generateLicense

      public String generateLicense(String owner, int quota, LocalDate endDate)
      Generates a license in JSON format.

      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 JSON object.

      Parameters:
      owner - the name of the license owner
      quota - the license user quota
      endDate - the license end-date
      Returns:
      the license in JSON format
    • generateLicense

      public String generateLicense(UUID key, String owner, int quota, LocalDate endDate)
      Generates a license in JSON format.

      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 JSON object.

      Parameters:
      key - the license key
      owner - the name of the license owner
      quota - the license user quota
      endDate - the license end-date
      Returns:
      the license in JSON format