Class SignaturePolicy

java.lang.Object
eu.europa.esig.dss.validation.SignaturePolicy
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
XAdESSignaturePolicy

public class SignaturePolicy extends Object implements Serializable
Represents the values of a SignaturePolicy
See Also:
  • 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
    • getDescription

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

      public void setDescription(String description)
      Sets description (*optional)
      Parameters:
      description - String
    • 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
    • getDigest

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

      public void setDigest(Digest digest)
      Sets the Digest
      Parameters:
      digest - Digest
    • 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
    • getTransformsDescription

      public List<String> getTransformsDescription()
      Gets a list of Strings describing the 'ds:Transforms' element NOTE: XAdES only
      Returns:
      a description of 'ds:Transforms' if present, null otherwise
    • 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
    • isHashAsInTechnicalSpecification

      public boolean isHashAsInTechnicalSpecification()
      Gets if the digest should be computed as specified in the relevant technical specification
      Returns:
      TRUE if the digest should be computed as specified in the relevant technical specification, FALSE otherwise
    • setHashAsInTechnicalSpecification

      public void setHashAsInTechnicalSpecification(boolean hashAsInTechnicalSpecification)
      Sets should the digest be computed as specified in a corresponding technical specification
      Parameters:
      hashAsInTechnicalSpecification - should the digest be computed as in technical specification
    • getUri

      public String getUri()
      Returns the signature policy URI (if found)
      Returns:
      the URI of the signature policy (or null if not available information)
    • setUri

      public void setUri(String uri)
      Sets the signature policy URI
      Parameters:
      uri - signature policy URI
    • getUserNotice

      public UserNotice getUserNotice()
      Gets user notice that should be displayed when the signature is verified
      Returns:
      String
    • setUserNotice

      public void setUserNotice(UserNotice userNotice)
      Sets user notice that should be displayed when the signature is verified
      Parameters:
      userNotice - UserNotice user notice
    • getDocSpecification

      public SpDocSpecification getDocSpecification()
      Gets the Document Specification Qualifier when present
      Returns:
      SpDocSpecification
    • setDocSpecification

      public void setDocSpecification(SpDocSpecification docSpecification)
      Sets the Document Specification qualifier
      Parameters:
      docSpecification - SpDocSpecification