Class ASiCCounterSignatureHelper
java.lang.Object
eu.europa.esig.dss.asic.common.signature.ASiCCounterSignatureHelper
- Direct Known Subclasses:
ASiCWithCAdESCounterSignatureHelper
,ASiCWithXAdESCounterSignatureHelper
The class contains methods for document extraction in order to create a counter signature
-
Field Summary
Modifier and TypeFieldDescriptionprotected final DSSDocument
The document representing an ASiC container -
Constructor Summary
ModifierConstructorDescriptionprotected
ASiCCounterSignatureHelper
(DSSDocument asicContainer) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkCounterSignaturePossible
(DSSDocument signatureDocument) This method verifies if a signatureDocument can be counter signed Throws an exception when an extension is not possibleextractSignatureDocument
(String signatureId) Returns a file containing a signature with the given idprotected abstract DefaultASiCContainerExtractor
Gets an ASiC container extractor relative to the current implementationReturnsASiCContent
protected abstract List
<DSSDocument> getDetachedDocuments
(String signatureFilename) Returns a list if detached documents for a signature with a given filenameprotected abstract DocumentAnalyzer
getDocumentAnalyzer
(DSSDocument signatureDocument) Gets a Document Validator relative to the current implementationgetManifestFile
(String signatureFilename) Returns a related manifest file for a signature with the given filename NOTE: used for ASiC with CAdES only
-
Field Details
-
asicContainer
The document representing an ASiC container
-
-
Constructor Details
-
ASiCCounterSignatureHelper
The default constructor- Parameters:
asicContainer
-DSSDocument
representing an ASiC container
-
-
Method Details
-
getAsicContent
-
extractSignatureDocument
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
Returns a list if detached documents for a signature with a given filename- Parameters:
signatureFilename
-String
a signature filename- Returns:
- a list of
DSSDocument
s
-
getManifestFile
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
Gets an ASiC container extractor relative to the current implementation- Returns:
DefaultASiCContainerExtractor
-
getDocumentAnalyzer
Gets a Document Validator relative to the current implementation- Parameters:
signatureDocument
-DSSDocument
- Returns:
DocumentAnalyzer
-
checkCounterSignaturePossible
This method verifies if a signatureDocument can be counter signed Throws an exception when an extension is not possible- Parameters:
signatureDocument
-DSSDocument
to verify
-