Package org.wildfly.prospero.licenses
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 inDEFAULT_LICENSE_DEFINITIONand are keyed by the Feature Pack Maven coordinated (groupId:artifactId).
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringLICENSE_AGREEMENT_FILENAMEprotected static StringLICENSE_DEFINITION_NAMEstatic StringLICENSES_FOLDER
-
Constructor Summary
Constructors Constructor Description LicenseManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<License>getLicenses(List<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 Detail
-
LICENSES_FOLDER
public static final String LICENSES_FOLDER
- See Also:
- Constant Field Values
-
LICENSE_DEFINITION_NAME
protected static final String LICENSE_DEFINITION_NAME
- See Also:
- Constant Field Values
-
LICENSE_AGREEMENT_FILENAME
protected static final String LICENSE_AGREEMENT_FILENAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLicenses
public List<License> getLicenses(List<String> fpls)
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
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 inProsperoMetadataUtils.METADATA_DIR/.- Parameters:
licenses- - acceptedLicensestargetServer- -Pathto the installed server- Throws:
IOException- - if unable to record the license agreement
-
-