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
ConstructorDescriptionDefault 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 correspondingpolicyId
fromsignaturePoliciesById
mapGets a signature policy document with the correspondingurl
fromsignaturePoliciesByUrl
map, if not found, retrieved the data fromurl
withdataLoader
void
setDataLoader
(DataLoader dataLoader) Sets theDataLoader
to retrieve signature policy documents (e.g.void
setSignaturePoliciesById
(Map<String, DSSDocument> signaturePoliciesById) Sets the map of signature policy documents to retrieve by IDsvoid
setSignaturePoliciesByUrl
(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 theDataLoader
to 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 correspondingpolicyId
fromsignaturePoliciesById
map- Parameters:
policyId
-String
id to retrieve a signaturePolicy with- Returns:
DSSDocument
signature policy content if found, null otherwise
-
getSignaturePolicyByUrl
Gets a signature policy document with the correspondingurl
fromsignaturePoliciesByUrl
map, if not found, retrieved the data fromurl
withdataLoader
- Parameters:
url
-String
url to retrieve a signaturePolicy with- Returns:
DSSDocument
signature policy content if found, null otherwise
-
getSignaturePolicy
Gets signature policy by all available ways (id and uri)- Parameters:
policyId
-String
policy idurl
-String
policy url- Returns:
DSSDocument
signature policy content if found, null otherwise
-