Class AbstractASiCWithCAdESContainerMerger
java.lang.Object
eu.europa.esig.dss.asic.cades.merge.AbstractASiCWithCAdESContainerMerger
- Direct Known Subclasses:
ASiCEWithCAdESContainerMerger, ASiCSWithCAdESContainerMerger
This class contains common code for ASiC with CAdES container merger classes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected eu.europa.esig.dss.asic.common.ASiCContent[]protected ASiCWithCAdESFilenameFactoryDefines rules for filename creation for new ZIP entries (e.g. signature files, etc.)protected static final eu.europa.esig.dss.enumerations.DigestAlgorithmprotected eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandlerBuilderThis object is used to write a created CMS into a defined implementation of an OutputStream or a DSSDocument -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractASiCWithCAdESContainerMerger(eu.europa.esig.dss.asic.common.ASiCContent... asicContents) This constructor is used to create an ASiC With CAdES from to givenASiCContentsprotectedAbstractASiCWithCAdESContainerMerger(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 TypeMethodDescriptionprotected eu.europa.esig.dss.asic.common.ASiCContentprotected eu.europa.esig.dss.asic.common.ASiCContentprotected abstract voidprotected abstract voidstatic eu.europa.esig.dss.asic.common.merge.ASiCContainerMergerfromASiCContents(eu.europa.esig.dss.asic.common.ASiCContent... arg0) static eu.europa.esig.dss.asic.common.merge.ASiCContainerMergerfromDocuments(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 givenASiCContentcontainersprotected eu.europa.esig.dss.asic.common.extract.DefaultASiCContainerExtractorgetContainerExtractor(eu.europa.esig.dss.model.DSSDocument container) protected StringgetFinalContainerName(eu.europa.esig.dss.enumerations.ASiCContainerType arg0) protected abstract eu.europa.esig.dss.enumerations.ASiCContainerTypeprotected booleanisSupported(eu.europa.esig.dss.asic.common.ASiCContent asicContent) booleanisSupported(eu.europa.esig.dss.asic.common.ASiCContent... arg0) protected booleanisSupported(eu.europa.esig.dss.model.DSSDocument container) booleanisSupported(eu.europa.esig.dss.model.DSSDocument... arg0) eu.europa.esig.dss.model.DSSDocumentmerge()protected eu.europa.esig.dss.model.DSSDocumentmergeCmsSignatures(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.ASiCContentvoidsetAsicFilenameFactory(ASiCWithCAdESFilenameFactory asicFilenameFactory) SetsASiCWithCAdESFilenameFactorydefining a set of rules for naming of newly create ZIP entries, such as signature files.voidsetCreationTime(Date arg0) voidsetResourcesHandlerBuilder(eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandlerBuilder resourcesHandlerBuilder) This method sets aDSSResourcesHandlerBuilderto be used for operating with internal CMS objects during the signature creation procedure.
-
Field Details
-
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 resourcesHandlerBuilderThis 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-DSSDocumentcontainers 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 givenASiCContents- Parameters:
asicContents-ASiCContents to be merged
-
-
Method Details
-
setAsicFilenameFactory
SetsASiCWithCAdESFilenameFactorydefining 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 aDSSResourcesHandlerBuilderto be used for operating with internal CMS objects during the signature creation procedure. NOTE: TheDSSResourcesHandlerBuilderis 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 ofDSSDocuments 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 givenASiCContentcontainers- Parameters:
asicContents-ASiCContents- Returns:
- a list of
DSSDocuments
-
getCreationTime
-
setCreationTime
-
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
-