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
ConstructorDescriptionDefaultPolicy(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
Gets an unmodifiable reference to the SortedSet of approved licenses that this policy is holding.void
reportLicenseApprovalClaim(Document document, boolean isAcceptable)
Report if the document as either having approved license or not.
-
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
- Specified by:
analyse
in interfaceIDocumentAnalyser
-
reportLicenseApprovalClaim
Report if the document as either having approved license or not.- Parameters:
document
- the document to approve.isAcceptable
-true
if the license is an approved one,false
otherwise.
-
getApprovedLicenseNames
Gets an unmodifiable reference to the SortedSet of approved licenses that this policy is holding.- Returns:
- sorted set of license family definitions.
-