Package org.wildfly.prospero.licenses
Class LicenseManager
java.lang.Object
org.wildfly.prospero.licenses.LicenseManager
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyIfExists(Path sourceServer, Path targetServer) getLicenses(Set<String> fpls) retrieveLicenses applicable to the list of FeaturePacks coordinates.voidrecordAgreements(List<License> licenses, Path targetServer) create a record of approved licenses within the installation.
-
Field Details
-
LICENSES_FOLDER
- See Also:
-
LICENSE_DEFINITION_NAME
- See Also:
-
LICENSE_AGREEMENT_FILENAME
- See Also:
-
-
Constructor Details
-
LicenseManager
public LicenseManager()
-
-
Method Details
-
getLicenses
retrieveLicenses 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
create a record of approved licenses within the installation. The license texts together with username used to approve it and the timestamp is stored inProsperoMetadataUtils.METADATA_DIR/.- Parameters:
licenses- - acceptedLicensestargetServer- -Pathto the installed server- Throws:
IOException- - if unable to record the license agreement
-
copyIfExists
- Throws:
IOException
-