Package org.apache.rat.policy
Class DefaultPolicy
java.lang.Object
org.apache.rat.policy.DefaultPolicy
- All Implemented Interfaces:
IDocumentAnalyser
A default Document Analyser that determines if the matched license is in the
set of approved licenses.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPolicy
(Collection<ILicenseFamily> approvedLicenseFamilies) Constructor with the list of approved license families. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ILicenseFamily approvedLicense) Adds an ILicenseFamily to the list of approved licenses.void
Analyse the specified document.Gets an unmodifiable reference to the SortedSet of approved licenses that this policy is holding.
-
Constructor Details
-
DefaultPolicy
Constructor with the list of approved license families.- Parameters:
approvedLicenseFamilies
- the approved license families.
-
-
Method Details
-
add
Adds an ILicenseFamily to the list of approved licenses.- Parameters:
approvedLicense
- license to be approved.
-
analyse
Description copied from interface:IDocumentAnalyser
Analyse the specified document.- Specified by:
analyse
in interfaceIDocumentAnalyser
- Parameters:
document
- the document to analyze
-
getApprovedLicenseFamilies
Gets an unmodifiable reference to the SortedSet of approved licenses that this policy is holding.- Returns:
- sorted set of license family definitions.
-