Class SignaturePolicyProvider

java.lang.Object
eu.europa.esig.dss.validation.SignaturePolicyProvider

public class SignaturePolicyProvider extends Object
The class is used to retrieve a policy by its SignaturePolicyIdentifier
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor instantiating object with null data loaded and empty maps
  • Method Summary

    Modifier and Type
    Method
    Description
    eu.europa.esig.dss.model.DSSDocument
    Gets signature policy by all available ways (id and uri)
    eu.europa.esig.dss.model.DSSDocument
    Gets a signature policy document with the corresponding policyId from signaturePoliciesById map
    eu.europa.esig.dss.model.DSSDocument
    Gets a signature policy document with the corresponding url from signaturePoliciesByUrl map, if not found, retrieved the data from url with dataLoader
    void
    setDataLoader(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
    Sets the DataLoader to retrieve signature policy documents (e.g.
    void
    setSignaturePoliciesById(Map<String,eu.europa.esig.dss.model.DSSDocument> signaturePoliciesById)
    Sets the map of signature policy documents to retrieve by IDs
    void
    setSignaturePoliciesByUrl(Map<String,eu.europa.esig.dss.model.DSSDocument> signaturePoliciesByUrl)
    Sets the map of signature policy documents to retrieve by URLs

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SignaturePolicyProvider

      public SignaturePolicyProvider()
      Default constructor instantiating object with null data loaded and empty maps
  • Method Details

    • setDataLoader

      public void setDataLoader(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
      Sets the DataLoader to retrieve signature policy documents (e.g. from online)
      Parameters:
      dataLoader - DataLoader
    • setSignaturePoliciesById

      public void setSignaturePoliciesById(Map<String,eu.europa.esig.dss.model.DSSDocument> signaturePoliciesById)
      Sets the map of signature policy documents to retrieve by IDs
      Parameters:
      signaturePoliciesById - a map of signature policy documents by IDs
    • setSignaturePoliciesByUrl

      public void setSignaturePoliciesByUrl(Map<String,eu.europa.esig.dss.model.DSSDocument> signaturePoliciesByUrl)
      Sets the map of signature policy documents to retrieve by URLs
      Parameters:
      signaturePoliciesByUrl - a map of signature policy documents by URLs
    • getSignaturePolicyById

      public eu.europa.esig.dss.model.DSSDocument getSignaturePolicyById(String policyId)
      Gets a signature policy document with the corresponding policyId from signaturePoliciesById map
      Parameters:
      policyId - String id to retrieve a signaturePolicy with
      Returns:
      DSSDocument signature policy content if found, null otherwise
    • getSignaturePolicyByUrl

      public eu.europa.esig.dss.model.DSSDocument getSignaturePolicyByUrl(String url)
      Gets a signature policy document with the corresponding url from signaturePoliciesByUrl map, if not found, retrieved the data from url with dataLoader
      Parameters:
      url - String url to retrieve a signaturePolicy with
      Returns:
      DSSDocument signature policy content if found, null otherwise
    • getSignaturePolicy

      public eu.europa.esig.dss.model.DSSDocument getSignaturePolicy(String policyId, String url)
      Gets signature policy by all available ways (id and uri)
      Parameters:
      policyId - String policy id
      url - String policy url
      Returns:
      DSSDocument signature policy content if found, null otherwise