Package eu.europa.esig.dss.signature
Interface MultipleDocumentsSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>
- Type Parameters:
SP
- implementation of signature parameters corresponding to the supported signature formatTP
- implementation of timestamp parameters corresponding to the supported document format
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractASiCSignatureService
,ASiCWithCAdESService
,ASiCWithXAdESService
,JAdESService
,XAdESService
public interface MultipleDocumentsSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>
extends Serializable
This interface
MultipleDocumentsSignatureService
provides operations for the signature creation and for its
extension.-
Method Summary
Modifier and TypeMethodDescriptionextendDocument
(DSSDocument toExtendDocument, SP parameters) Extends the level of the signatures in thetoExtendDocument
getContentTimestamp
(List<DSSDocument> toSignDocuments, SP parameters) Creates a content-timestamp attribute (to be include in the signed-data)getDataToSign
(List<DSSDocument> toSignDocuments, SP parameters) Retrieves the bytes of the data that need to be signed based on thetoSignDocuments
andparameters
.boolean
isValidSignatureValue
(ToBeSigned toBeSigned, SignatureValue signatureValue, CertificateToken signingCertificate) Verifies the signature value against aToBeSigned
and aCertificateToken
signDocument
(List<DSSDocument> toSignDocuments, SP parameters, SignatureValue signatureValue) Signs the toSignDocuments with the provided signatureValue.timestamp
(List<DSSDocument> toTimestampDocuments, TP parameters) Timestamps the toSignDocuments with the provided signatureValue.
-
Method Details
-
getContentTimestamp
Creates a content-timestamp attribute (to be include in the signed-data)- Parameters:
toSignDocuments
- list of documents to signparameters
- set of the driving signing parameters- Returns:
- a timestamp token
-
getDataToSign
Retrieves the bytes of the data that need to be signed based on thetoSignDocuments
andparameters
. WhentoSignDocuments
contains an already existing signature the returned bytes are related to a new parallel signature.- Parameters:
toSignDocuments
- list of documents to signparameters
- set of the driving signing parameters- Returns:
- the data to be signed
-
isValidSignatureValue
boolean isValidSignatureValue(ToBeSigned toBeSigned, SignatureValue signatureValue, CertificateToken signingCertificate) Verifies the signature value against aToBeSigned
and aCertificateToken
- Parameters:
toBeSigned
- the signed datasignatureValue
- the signature valuesigningCertificate
- the used certificate to create the signature value- Returns:
- true if the signature value is valid
-
signDocument
DSSDocument signDocument(List<DSSDocument> toSignDocuments, SP parameters, SignatureValue signatureValue) Signs the toSignDocuments with the provided signatureValue.- Parameters:
toSignDocuments
- list of documents to signparameters
- set of the driving signing parameterssignatureValue
- the signature value to incorporate- Returns:
- the container with the signature and the documents (ASiC) or the signature file
-
extendDocument
Extends the level of the signatures in thetoExtendDocument
- Parameters:
toExtendDocument
- document to extendparameters
- set of the driving signing parameters- Returns:
- the extended signature
-
timestamp
Timestamps the toSignDocuments with the provided signatureValue.- Parameters:
toTimestampDocuments
- list of documents to timestampparameters
- set of the driving timestamping parameters- Returns:
- the container with the added timestamp token
-