Class ASiCCounterSignatureHelper

java.lang.Object
eu.europa.esig.dss.asic.common.signature.ASiCCounterSignatureHelper
Direct Known Subclasses:
ASiCWithCAdESCounterSignatureHelper, ASiCWithXAdESCounterSignatureHelper

public abstract class ASiCCounterSignatureHelper extends Object
The class contains methods for document extraction in order to create a counter signature
  • Field Details

    • asicContainer

      protected final DSSDocument asicContainer
      The document representing an ASiC container
  • Constructor Details

    • ASiCCounterSignatureHelper

      protected ASiCCounterSignatureHelper(DSSDocument asicContainer)
      The default constructor
      Parameters:
      asicContainer - DSSDocument representing an ASiC container
  • Method Details

    • getAsicContent

      public ASiCContent getAsicContent()
      Returns ASiCContent
      Returns:
      ASiCContent
    • extractSignatureDocument

      public DSSDocument extractSignatureDocument(String signatureId)
      Returns a file containing a signature with the given id
      Parameters:
      signatureId - String id of a signature to extract a file with
      Returns:
      DSSDocument signature document containing a signature to be counter signed with a defined id
    • getDetachedDocuments

      protected abstract List<DSSDocument> getDetachedDocuments(String signatureFilename)
      Returns a list if detached documents for a signature with a given filename
      Parameters:
      signatureFilename - String a signature filename
      Returns:
      a list of DSSDocuments
    • getManifestFile

      public ManifestFile getManifestFile(String signatureFilename)
      Returns a related manifest file for a signature with the given filename NOTE: used for ASiC with CAdES only
      Parameters:
      signatureFilename - String a signature filename
      Returns:
      ManifestFile representing a related manifest file
    • getASiCContainerExtractor

      protected abstract AbstractASiCContainerExtractor getASiCContainerExtractor()
      Gets an ASiC container extractor relative to the current implementation
      Returns:
      AbstractASiCContainerExtractor
    • getDocumentValidator

      protected abstract DocumentValidator getDocumentValidator(DSSDocument signatureDocument)
      Gets a Document Validator relative to the current implementation
      Parameters:
      signatureDocument - DSSDocument
      Returns:
      DocumentValidator
    • checkCounterSignaturePossible

      protected void checkCounterSignaturePossible(DSSDocument signatureDocument)
      This method verifies if a signatureDocument can be counter signed Throws an exception when an extension is not possible
      Parameters:
      signatureDocument - DSSDocument to verify