Interface DocumentExtender
- All Known Implementing Classes:
AbstractDocumentExtender, ASiCWithCAdESDocumentExtender, ASiCWithXAdESDocumentExtender, CAdESDocumentExtender, JAdESDocumentExtender, PAdESDocumentExtender, SignedDocumentExtender, XAdESDocumentExtender
This class can be used as an alternative to the eu.europa.esig.dss.signature.DocumentSignatureService#extendDocument
which requires the client to know the original signature format before the method execution.
-
Method Summary
Modifier and TypeMethodDescriptionextendDocument(SignatureProfile signatureProfile) Performs augmentation of all signatures within the provided document according to the specified targetsignatureProfile.extendDocument(SignatureProfile signatureProfile, SerializableSignatureParameters... extensionParameters) Performs augmentation of all signatures within the provided document according to the specifiedaugmentationParameters, with format specificextensionParameters.extendDocument(SignatureProfile signatureProfile, List<DSSDocument> detachedContents) Performs augmentation of all signatures of a detached format within the provided document according to the specified targetsignatureProfile.extendDocument(SignatureProfile signatureProfile, List<DSSDocument> detachedContents, SerializableSignatureParameters... extensionParameters) Performs augmentation of all signatures of a detached format within the provided document according to the specified targetsignatureProfile, with format specificextensionParameters.booleanisSupported(DSSDocument dssDocument) Checks if the document is supported by the current signature extendervoidsetCertificateVerifier(CertificateVerifier certificateVerifier) Sets a CertificateVerifier providing a configuration for validation of certificates within the original signature or signatures.voidsetTspSource(TSPSource tspSource) Source to be used for time-stamp requests, when applicable (e.g.
-
Method Details
-
setCertificateVerifier
Sets a CertificateVerifier providing a configuration for validation of certificates within the original signature or signatures.- Parameters:
certificateVerifier-CertificateVerifier
-
setTspSource
-
isSupported
Checks if the document is supported by the current signature extender- Parameters:
dssDocument-DSSDocumentto check- Returns:
- TRUE if the document is supported, FALSE otherwise
-
extendDocument
Performs augmentation of all signatures within the provided document according to the specified targetsignatureProfile.- Parameters:
signatureProfile-SignatureProfileidentifying the desired target augmentation level- Returns:
DSSDocumentcontaining the augmented signatures, if the augmentation succeeds.
-
extendDocument
Performs augmentation of all signatures of a detached format within the provided document according to the specified targetsignatureProfile.- Parameters:
signatureProfile-SignatureProfileidentifying the desired target augmentation leveldetachedContents- list ofDSSDocuments representing a signed content in case of a detached signature- Returns:
DSSDocumentcontaining the augmented signatures, if the augmentation succeeds.
-
extendDocument
DSSDocument extendDocument(SignatureProfile signatureProfile, SerializableSignatureParameters... extensionParameters) Performs augmentation of all signatures within the provided document according to the specifiedaugmentationParameters, with format specificextensionParameters.If
explicitParametersare provided, and they contain an implementation of parameters matching the current signature format, those signature parameters will be used explicitly on this signature augmentation. This can be useful when a signature augmentation process for a certain signature format should take into account particular signature constraints (i.e. /Contents size for a PAdES document time-stamp, etc.).NOTE 1: If the matching implementation of extension parameters found, and it contains
signatureLeveland/ordetachedContentsdefinition, the existing values will be used. Otherwise, the content of the extension parameters will be overwritten respectively. NOTE 2: The definition of extension parameters is order dependent. The first parameters matching the signature format implementation will be used.- Parameters:
signatureProfile-SignatureProfileidentifying the desired target augmentation levelextensionParameters- (optional)SerializableSignatureParameterscontaining format specific requirements- Returns:
DSSDocumentcontaining the augmented signatures, if the augmentation succeeds.
-
extendDocument
DSSDocument extendDocument(SignatureProfile signatureProfile, List<DSSDocument> detachedContents, SerializableSignatureParameters... extensionParameters) Performs augmentation of all signatures of a detached format within the provided document according to the specified targetsignatureProfile, with format specificextensionParameters.If
explicitParametersare provided, and they contain an implementation of parameters matching the current signature format, those signature parameters will be used explicitly on this signature augmentation. This can be useful when a signature augmentation process for a certain signature format should take into account particular signature constraints (i.e. /Contents size for a PAdES document time-stamp, etc.).NOTE 1: If the matching implementation of extension parameters found, and it contains
signatureLeveland/ordetachedContentsdefinition, the existing values will be used. Otherwise, the content of the extension parameters will be overwritten respectively. NOTE 2: The definition of extension parameters is order dependent. The first parameters matching the signature format implementation will be used.- Parameters:
signatureProfile-SignatureProfileidentifying the desired target augmentation leveldetachedContents- list ofDSSDocuments representing a signed content in case of a detached signatureextensionParameters- (optional)SerializableSignatureParameterscontaining format specific requirements- Returns:
DSSDocumentcontaining the augmented signatures, if the augmentation succeeds.
-