Class SignaturePolicy

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

public class SignaturePolicy
extends Object
Represents the value of a SignaturePolicy
  • Constructor Details

    • SignaturePolicy

      public SignaturePolicy()
      The default constructor for SignaturePolicy. It represents the implied policy.
    • SignaturePolicy

      public SignaturePolicy​(String identifier)
      The default constructor for SignaturePolicy.
      Parameters:
      identifier - the policy identifier
  • Method Details

    • getIdentifier

      public String getIdentifier()
      Returns the signature policy identifier
      Returns:
      the signature policy identifier
    • isZeroHash

      public boolean isZeroHash()
      Gets if the policy is a zero-hash (no hash check shall be performed)
      Returns:
      TRUE if the policy is a zero-hash, FALSE otherwise
    • setZeroHash

      public void setZeroHash​(boolean zeroHash)
      Sets if the policy is a zero-hash (no hash check shall be performed)
      Parameters:
      zeroHash - if the policy is a zero-hash
    • getDigest

      public Digest getDigest()
      Gets the Digest
      Returns:
      Digest
    • setDigest

      public void setDigest​(Digest digest)
      Sets the Digest
      Parameters:
      digest - Digest
    • getUrl

      public String getUrl()
      Returns the signature policy url (if found)
      Returns:
      the url of the signature policy (or null if not available information)
    • setUrl

      public void setUrl​(String url)
      Sets the signature policy url
      Parameters:
      url - signature policy url
    • getDescription

      public String getDescription()
      Gets description
      Returns:
      String
    • setDescription

      public void setDescription​(String description)
      Sets description (*optional)
      Parameters:
      description - String
    • getDocumentationReferences

      public List<String> getDocumentationReferences()
      Gets the documentation references NOTE: optional, used in XAdES
      Returns:
      a list of String documentation references
    • setDocumentationReferences

      public void setDocumentationReferences​(List<String> documentationReferences)
      Sets the documentation references
      Parameters:
      documentationReferences - a list of String documentation references
    • getTransforms

      public Element getTransforms()
      Returns a 'ds:Tranforms' element if found NOTE: XAdES only
      Returns:
      'ds:Tranforms' Element if found, NULL otherwise
    • setTransforms

      public void setTransforms​(Element transforms)
      Sets a 'ds:Tranforms' node
      Parameters:
      transforms - Element
    • getTransformsDescription

      public List<String> getTransformsDescription()
      Gets a list of Strings describing the 'ds:Tranforms' element NOTE: XAdES only
      Returns:
      a description of 'ds:Tranforms' if present, null otherwise
    • setTransformsDescription

      public void setTransformsDescription​(List<String> transformsDescription)
      Sets a list of Strings describing the 'ds:Tranforms' element
      Parameters:
      transformsDescription - a list of Strings describing the 'ds:Transforms' element
    • getNotice

      public String getNotice()
      Gets user notice that should be displayed when the signature is verified
      Returns:
      String
    • setNotice

      public void setNotice​(String notice)
      Sets user notice that should be displayed when the signature is verified
      Parameters:
      notice - String user notice
    • getPolicyContent

      public DSSDocument getPolicyContent()
      Returns a DSSDocument with the signature policy content
      Returns:
      a DSSDocument which contains the signature policy
    • setPolicyContent

      public void setPolicyContent​(DSSDocument policyContent)
      Sets policy document content
      Parameters:
      policyContent - DSSDocument