Class SignedDocumentExtender

java.lang.Object
eu.europa.esig.dss.extension.SignedDocumentExtender
All Implemented Interfaces:
DocumentExtender
Direct Known Subclasses:
AbstractDocumentExtender

public abstract class SignedDocumentExtender extends Object implements DocumentExtender
This class contains common code for signature augmentation utilities.
  • Field Details

    • certificateVerifier

      protected CertificateVerifier certificateVerifier
      The reference to the certificate verifier. The current DSS implementation proposes CommonCertificateVerifier. This verifier encapsulates the references to different sources used in the signature validation process.
    • tspSource

      protected TSPSource tspSource
      The source to be used for a timestamp token request, when applicable.
    • services

      protected DocumentSignatureService<?,?>[] services
      (Optional) Document signature services. When defined, the applicable instance of a corresponding service will be used. If no suitable service found, a new service instance will be created.
  • Constructor Details

    • SignedDocumentExtender

      protected SignedDocumentExtender()
      Empty constructor
  • Method Details

    • fromDocument

      public static SignedDocumentExtender fromDocument(DSSDocument dssDocument)
      This method guesses the document format and returns an appropriate document reader.
      Parameters:
      dssDocument - The instance of DSSDocument to validate
      Returns:
      returns the specific instance of DocumentReader in terms of the document type
    • setCertificateVerifier

      public void setCertificateVerifier(CertificateVerifier certificateVerifier)
      Description copied from interface: DocumentExtender
      Sets a CertificateVerifier providing a configuration for validation of certificates within the original signature or signatures.
      Specified by:
      setCertificateVerifier in interface DocumentExtender
      Parameters:
      certificateVerifier - CertificateVerifier
    • setTspSource

      public void setTspSource(TSPSource tspSource)
      Description copied from interface: DocumentExtender
      Source to be used for time-stamp requests, when applicable (e.g. BASELINE-T or BASELINE-LTA profile extension)
      Specified by:
      setTspSource in interface DocumentExtender
      Parameters:
      tspSource - TSPSource
    • setServices

      public void setServices(DocumentSignatureService<?,?>... services)
      (Optional) Sets document signature services. When defined, the applicable instance of a corresponding service will be used. If no suitable service found, a new service instance will be created.
      Parameters:
      services - an array of DocumentSignatureServices
    • getSignatureForm

      public abstract SignatureForm getSignatureForm()
      Gets the signature form for the current implementation
      Returns:
      SignatureForm
    • isASiC

      public boolean isASiC()
      Gets whether the document to be extended represents an ASiC container
      Returns:
      TRUE if the document is an ASiC container, FALSE otherwise