Interface RemoteDocumentSignatureService
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
RemoteDocumentSignatureServiceImpl
This interface
RemoteDocumentSignatureService
provides operations for the signature creation and for its
extension.-
Method Summary
Modifier and TypeMethodDescriptioncounterSignSignature
(RemoteDocument signatureDocument, RemoteSignatureParameters parameters, SignatureValueDTO signatureValue) Counter signs thesignatureDocument
with the provided signatureValue.extendDocument
(RemoteDocument toExtendDocument, RemoteSignatureParameters parameters) Extends the level of the signatures in thetoExtendDocument
getDataToBeCounterSigned
(RemoteDocument signatureDocument, RemoteSignatureParameters parameters) Retrieves the bytes of the data that need to be counter signed fromsignatureDocument
.getDataToSign
(RemoteDocument toSignDocument, RemoteSignatureParameters parameters) Retrieves the bytes of the data that need to be signed based on thetoSignDocument
andparameters
.signDocument
(RemoteDocument toSignDocument, RemoteSignatureParameters parameters, SignatureValueDTO signatureValue) Signs the toSignDocument with the provided signatureValue.timestamp
(RemoteDocument toTimestampDocument, RemoteTimestampParameters parameters) Adds a timestamp to the document
-
Method Details
-
getDataToSign
ToBeSignedDTO getDataToSign(RemoteDocument toSignDocument, RemoteSignatureParameters parameters) throws DSSException Retrieves the bytes of the data that need to be signed based on thetoSignDocument
andparameters
. WhentoSignDocument
contains an already existing signature the returned bytes are related to a new parallel signature. - Enveloped signature (XML): a new signature is added and the signed data corresponds to that pointed by the first signature; - Enveloping signature: - - XML: The parallel signature is not possible - - CMS: A new parallel signature is added - Detached signature: - - XML: The parallel signature is added - - CMS: A new parallel signature is added- Parameters:
toSignDocument
- document to sign or the already existing signatureparameters
- set of the driving signing parameters- Returns:
- the data to be signed
- Throws:
DSSException
- if an error occurred
-
signDocument
RemoteDocument signDocument(RemoteDocument toSignDocument, RemoteSignatureParameters parameters, SignatureValueDTO signatureValue) throws DSSException Signs the toSignDocument with the provided signatureValue.- Parameters:
toSignDocument
- document to signparameters
- set of the driving signing parameterssignatureValue
- the signature value to incorporate- Returns:
- the signed document (
toSignDocument
with the incorporated signature or the detached signature) - Throws:
DSSException
- if an error occurred
-
extendDocument
RemoteDocument extendDocument(RemoteDocument toExtendDocument, RemoteSignatureParameters parameters) throws DSSException Extends the level of the signatures in thetoExtendDocument
- Parameters:
toExtendDocument
- document to extendparameters
- set of the driving signing parameters- Returns:
- the extended signature
- Throws:
DSSException
- if an error occurred
-
timestamp
RemoteDocument timestamp(RemoteDocument toTimestampDocument, RemoteTimestampParameters parameters) throws DSSException Adds a timestamp to the document- Parameters:
toTimestampDocument
-RemoteDocument
to timestampparameters
- set of the driving timestamp parameters- Returns:
- the timestamped
RemoteDocument
- Throws:
DSSException
- if an error occurred
-
getDataToBeCounterSigned
ToBeSignedDTO getDataToBeCounterSigned(RemoteDocument signatureDocument, RemoteSignatureParameters parameters) Retrieves the bytes of the data that need to be counter signed fromsignatureDocument
.signatureDocument
shall be a valid signature of the same type- Parameters:
signatureDocument
-RemoteDocument
representing the original signature to be counter signedparameters
-RemoteSignatureParameters
set of the driving signing parameters for a counter signature- Returns:
ToBeSignedDTO
to be counter signed byte array (signature value retrieved from thesignatureDocument
)
-
counterSignSignature
RemoteDocument counterSignSignature(RemoteDocument signatureDocument, RemoteSignatureParameters parameters, SignatureValueDTO signatureValue) Counter signs thesignatureDocument
with the provided signatureValue.- Parameters:
signatureDocument
-RemoteDocument
to be counter signedparameters
-RemoteSignatureParameters
set of the driving signing parameters for a counter signaturesignatureValue
-SignatureValueDTO
the signature value to incorporate- Returns:
RemoteDocument
the signature document enveloping a newly created counter signature
-