Class 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).
    • Constructor Detail

      • LicenseManager

        public LicenseManager()
    • Method Detail

      • getLicenses

        public List<License> getLicenses​(List<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