Class AbstractASiCWithCAdESContainerMerger

java.lang.Object
eu.europa.esig.dss.asic.cades.merge.AbstractASiCWithCAdESContainerMerger
Direct Known Subclasses:
ASiCEWithCAdESContainerMerger, ASiCSWithCAdESContainerMerger

public abstract class AbstractASiCWithCAdESContainerMerger extends Object
This class contains common code for ASiC with CAdES container merger classes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected eu.europa.esig.dss.asic.common.ASiCContent[]
     
    Defines rules for filename creation for new ZIP entries (e.g. signature files, etc.)
    protected static final eu.europa.esig.dss.enumerations.DigestAlgorithm
     
    protected eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandlerBuilder
    This object is used to write a created CMS into a defined implementation of an OutputStream or a DSSDocument
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractASiCWithCAdESContainerMerger(eu.europa.esig.dss.asic.common.ASiCContent... asicContents)
    This constructor is used to create an ASiC With CAdES from to given ASiCContents
    protected
    AbstractASiCWithCAdESContainerMerger(eu.europa.esig.dss.model.DSSDocument... containers)
    This constructor is used to create an ASiC With CAdES container merger from provided container documents
  • Method Summary

    Modifier and Type
    Method
    Description
    protected eu.europa.esig.dss.asic.common.ASiCContent
     
    protected eu.europa.esig.dss.asic.common.ASiCContent
     
    protected abstract void
     
    protected abstract void
     
    static eu.europa.esig.dss.asic.common.merge.ASiCContainerMerger
    fromASiCContents(eu.europa.esig.dss.asic.common.ASiCContent... arg0)
     
    static eu.europa.esig.dss.asic.common.merge.ASiCContainerMerger
    fromDocuments(eu.europa.esig.dss.model.DSSDocument... arg0)
     
    protected List<eu.europa.esig.dss.model.DSSDocument>
    getAllSignatureDocuments(eu.europa.esig.dss.asic.common.ASiCContent... asicContents)
    This method returns all signature documents extracted from given ASiCContent containers
    protected eu.europa.esig.dss.asic.common.extract.DefaultASiCContainerExtractor
    getContainerExtractor(eu.europa.esig.dss.model.DSSDocument container)
     
     
    protected String
    getFinalContainerName(eu.europa.esig.dss.enumerations.ASiCContainerType arg0)
     
    protected abstract eu.europa.esig.dss.enumerations.ASiCContainerType
     
    protected boolean
    isSupported(eu.europa.esig.dss.asic.common.ASiCContent asicContent)
     
    boolean
    isSupported(eu.europa.esig.dss.asic.common.ASiCContent... arg0)
     
    protected boolean
    isSupported(eu.europa.esig.dss.model.DSSDocument container)
     
    boolean
    isSupported(eu.europa.esig.dss.model.DSSDocument... arg0)
     
    eu.europa.esig.dss.model.DSSDocument
     
    protected eu.europa.esig.dss.model.DSSDocument
    mergeCmsSignatures(List<eu.europa.esig.dss.model.DSSDocument> signatureDocuments)
    This method merges signature documents representing CMS signatures into single CMS signature document.
    eu.europa.esig.dss.asic.common.ASiCContent
     
    void
    Sets ASiCWithCAdESFilenameFactory defining a set of rules for naming of newly create ZIP entries, such as signature files.
    void
     
    void
    setResourcesHandlerBuilder(eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandlerBuilder resourcesHandlerBuilder)
    This method sets a DSSResourcesHandlerBuilder to be used for operating with internal CMS objects during the signature creation procedure.

    Methods inherited from class Object

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

    • asicFilenameFactory

      protected ASiCWithCAdESFilenameFactory asicFilenameFactory
      Defines rules for filename creation for new ZIP entries (e.g. signature files, etc.)
    • resourcesHandlerBuilder

      protected eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandlerBuilder resourcesHandlerBuilder
      This object is used to write a created CMS into a defined implementation of an OutputStream or a DSSDocument
    • DEFAULT_DIGEST_ALGORITHM

      protected static final eu.europa.esig.dss.enumerations.DigestAlgorithm DEFAULT_DIGEST_ALGORITHM
    • asicContents

      protected eu.europa.esig.dss.asic.common.ASiCContent[] asicContents
  • Constructor Details

    • AbstractASiCWithCAdESContainerMerger

      protected AbstractASiCWithCAdESContainerMerger(eu.europa.esig.dss.model.DSSDocument... containers)
      This constructor is used to create an ASiC With CAdES container merger from provided container documents
      Parameters:
      containers - DSSDocument containers to be merged
    • AbstractASiCWithCAdESContainerMerger

      protected AbstractASiCWithCAdESContainerMerger(eu.europa.esig.dss.asic.common.ASiCContent... asicContents)
      This constructor is used to create an ASiC With CAdES from to given ASiCContents
      Parameters:
      asicContents - ASiCContents to be merged
  • Method Details

    • setAsicFilenameFactory

      public void setAsicFilenameFactory(ASiCWithCAdESFilenameFactory asicFilenameFactory)
      Sets ASiCWithCAdESFilenameFactory defining a set of rules for naming of newly create ZIP entries, such as signature files.
      Parameters:
      asicFilenameFactory - ASiCWithCAdESFilenameFactory
    • setResourcesHandlerBuilder

      public void setResourcesHandlerBuilder(eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandlerBuilder resourcesHandlerBuilder)
      This method sets a DSSResourcesHandlerBuilder to be used for operating with internal CMS objects during the signature creation procedure. NOTE: The DSSResourcesHandlerBuilder is supported only within the 'dss-cms-stream' module!
      Parameters:
      resourcesHandlerBuilder - DSSResourcesHandlerBuilder
    • isSupported

      protected boolean isSupported(eu.europa.esig.dss.model.DSSDocument container)
    • isSupported

      protected boolean isSupported(eu.europa.esig.dss.asic.common.ASiCContent asicContent)
    • getContainerExtractor

      protected eu.europa.esig.dss.asic.common.extract.DefaultASiCContainerExtractor getContainerExtractor(eu.europa.esig.dss.model.DSSDocument container)
    • mergeCmsSignatures

      protected eu.europa.esig.dss.model.DSSDocument mergeCmsSignatures(List<eu.europa.esig.dss.model.DSSDocument> signatureDocuments)
      This method merges signature documents representing CMS signatures into single CMS signature document.
      Parameters:
      signatureDocuments - a list of DSSDocuments representing CMS signatures to be merged
      Returns:
      merged CMS DSSDocument
    • getAllSignatureDocuments

      protected List<eu.europa.esig.dss.model.DSSDocument> getAllSignatureDocuments(eu.europa.esig.dss.asic.common.ASiCContent... asicContents)
      This method returns all signature documents extracted from given ASiCContent containers
      Parameters:
      asicContents - ASiCContents
      Returns:
      a list of DSSDocuments
    • getCreationTime

      public Date getCreationTime()
    • setCreationTime

      public void setCreationTime(Date arg0)
    • fromDocuments

      public static eu.europa.esig.dss.asic.common.merge.ASiCContainerMerger fromDocuments(eu.europa.esig.dss.model.DSSDocument... arg0)
    • fromASiCContents

      public static eu.europa.esig.dss.asic.common.merge.ASiCContainerMerger fromASiCContents(eu.europa.esig.dss.asic.common.ASiCContent... arg0)
    • isSupported

      public boolean isSupported(eu.europa.esig.dss.model.DSSDocument... arg0)
    • isSupported

      public boolean isSupported(eu.europa.esig.dss.asic.common.ASiCContent... arg0)
    • merge

      public eu.europa.esig.dss.model.DSSDocument merge()
    • mergeToASiCContent

      public eu.europa.esig.dss.asic.common.ASiCContent mergeToASiCContent()
    • ensureContainerContentAllowMerge

      protected abstract void ensureContainerContentAllowMerge()
    • ensureSignaturesAllowMerge

      protected abstract void ensureSignaturesAllowMerge()
    • createMergedResult

      protected eu.europa.esig.dss.asic.common.ASiCContent createMergedResult()
    • createEmptyContainer

      protected eu.europa.esig.dss.asic.common.ASiCContent createEmptyContainer()
    • getTargetASiCContainerType

      protected abstract eu.europa.esig.dss.enumerations.ASiCContainerType getTargetASiCContainerType()
    • getFinalContainerName

      protected String getFinalContainerName(eu.europa.esig.dss.enumerations.ASiCContainerType arg0)