Class LicenseManager

java.lang.Object
org.wildfly.prospero.licenses.LicenseManager

public class LicenseManager extends Object
Manages stored licenses and agreements. Licenses are stored in classpath in DEFAULT_LICENSE_DEFINITION and are keyed by the Feature Pack Maven coordinated (groupId:artifactId).
  • Field Details

  • Constructor Details

    • LicenseManager

      public LicenseManager()
  • Method Details

    • getLicenses

      public List<License> getLicenses(Set<String> fpls)
      retrieve Licenses applicable to the list of FeaturePacks coordinates.
      Parameters:
      fpls - - list of Maven coordinates (groupId:artifactId) of installed Feature Packs
      Returns:
      list of required s. Empty list if no licenses are required.
    • recordAgreements

      public void recordAgreements(List<License> licenses, Path targetServer) throws IOException
      create a record of approved licenses within the installation. The license texts together with username used to approve it and the timestamp is stored in ProsperoMetadataUtils.METADATA_DIR/.
      Parameters:
      licenses - - accepted Licenses
      targetServer - - Path to the installed server
      Throws:
      IOException - - if unable to record the license agreement
    • copyIfExists

      public void copyIfExists(Path sourceServer, Path targetServer) throws IOException
      Throws:
      IOException