Package eu.europa.esig.dss.validation
Class SignaturePolicyProvider
java.lang.Object
eu.europa.esig.dss.validation.SignaturePolicyProvider
The class is used to retrieve a policy by its SignaturePolicyIdentifier
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor instantiating object with null data loaded and empty maps -
Method Summary
Modifier and TypeMethodDescriptiongetSignaturePolicy(String policyId, String url) Gets signature policy by all available ways (id and uri)getSignaturePolicyById(String policyId) Gets a signature policy document with the correspondingpolicyIdfromsignaturePoliciesByIdmapGets a signature policy document with the correspondingurlfromsignaturePoliciesByUrlmap, if not found, retrieved the data fromurlwithdataLoadervoidsetDataLoader(DataLoader dataLoader) Sets theDataLoaderto retrieve signature policy documents (e.g.voidsetSignaturePoliciesById(Map<String, DSSDocument> signaturePoliciesById) Sets the map of signature policy documents to retrieve by IDsvoidsetSignaturePoliciesByUrl(Map<String, DSSDocument> signaturePoliciesByUrl) Sets the map of signature policy documents to retrieve by URLs
-
Constructor Details
-
SignaturePolicyProvider
public SignaturePolicyProvider()Default constructor instantiating object with null data loaded and empty maps
-
-
Method Details
-
setDataLoader
Sets theDataLoaderto retrieve signature policy documents (e.g. from online)- Parameters:
dataLoader-DataLoader
-
setSignaturePoliciesById
Sets the map of signature policy documents to retrieve by IDs- Parameters:
signaturePoliciesById- a map of signature policy documents by IDs
-
setSignaturePoliciesByUrl
Sets the map of signature policy documents to retrieve by URLs- Parameters:
signaturePoliciesByUrl- a map of signature policy documents by URLs
-
getSignaturePolicyById
Gets a signature policy document with the correspondingpolicyIdfromsignaturePoliciesByIdmap- Parameters:
policyId-Stringid to retrieve a signaturePolicy with- Returns:
DSSDocumentsignature policy content if found, null otherwise
-
getSignaturePolicyByUrl
Gets a signature policy document with the correspondingurlfromsignaturePoliciesByUrlmap, if not found, retrieved the data fromurlwithdataLoader- Parameters:
url-Stringurl to retrieve a signaturePolicy with- Returns:
DSSDocumentsignature policy content if found, null otherwise
-
getSignaturePolicy
Gets signature policy by all available ways (id and uri)- Parameters:
policyId-Stringpolicy idurl-Stringpolicy url- Returns:
DSSDocumentsignature policy content if found, null otherwise
-