Class RemoteDocumentSignatureServiceImpl
java.lang.Object
eu.europa.esig.dss.ws.signature.common.AbstractRemoteSignatureServiceImpl
eu.europa.esig.dss.ws.signature.common.RemoteDocumentSignatureServiceImpl
- All Implemented Interfaces:
RemoteDocumentSignatureService
,Serializable
public class RemoteDocumentSignatureServiceImpl
extends AbstractRemoteSignatureServiceImpl
implements RemoteDocumentSignatureService
The remote signature service implementation
- See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating object with null services -
Method Summary
Modifier and TypeMethodDescriptioncounterSignSignature
(RemoteDocument signatureDocument, RemoteSignatureParameters remoteParameters, SignatureValueDTO signatureValueDTO) Counter signs thesignatureDocument
with the provided signatureValue.extendDocument
(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters) Extends the level of the signatures in thetoExtendDocument
getDataToBeCounterSigned
(RemoteDocument signatureDocument, RemoteSignatureParameters remoteParameters) Retrieves the bytes of the data that need to be counter signed fromsignatureDocument
.getDataToSign
(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters) Retrieves the bytes of the data that need to be signed based on thetoSignDocument
andparameters
.void
setAsicWithCAdESService
(ASiCWithCAdESService asicWithCAdESService) Sets the ASiC with CAdES signature servicevoid
setAsicWithXAdESService
(ASiCWithXAdESService asicWithXAdESService) Sets the ASiC with XAdES signature servicevoid
setCadesService
(CAdESService cadesService) Sets the CAdES signature servicevoid
setJadesService
(JAdESService jadesService) Sets the JAdES signature servicevoid
setPadesService
(PAdESService padesService) Sets the PAdES signature servicevoid
setXadesService
(XAdESService xadesService) Sets the XAdES signature servicesignDocument
(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters, SignatureValueDTO signatureValueDTO) Signs the toSignDocument with the provided signatureValue.timestamp
(RemoteDocument remoteDocument, RemoteTimestampParameters remoteParameters) Adds a timestamp to the documentMethods inherited from class eu.europa.esig.dss.ws.signature.common.AbstractRemoteSignatureServiceImpl
createCounterSignatureParameters, createParameters, fillParameters, getASiCSignatureParameters, getJAdESSignatureParameters, getPAdESSignatureParameters, getXAdESSignatureParameters, toBLevelParameters, toCommitmentTypeList, toSignatureValue, toTimestampParameters, toTimestampParameters
-
Constructor Details
-
RemoteDocumentSignatureServiceImpl
public RemoteDocumentSignatureServiceImpl()Default constructor instantiating object with null services
-
-
Method Details
-
setXadesService
Sets the XAdES signature service- Parameters:
xadesService
-XAdESService
-
setCadesService
Sets the CAdES signature service- Parameters:
cadesService
-CAdESService
-
setPadesService
Sets the PAdES signature service- Parameters:
padesService
-PAdESService
-
setJadesService
Sets the JAdES signature service- Parameters:
jadesService
-JAdESService
-
setAsicWithXAdESService
Sets the ASiC with XAdES signature service- Parameters:
asicWithXAdESService
-ASiCWithXAdESService
-
setAsicWithCAdESService
Sets the ASiC with CAdES signature service- Parameters:
asicWithCAdESService
-ASiCWithCAdESService
-
getDataToSign
public ToBeSignedDTO getDataToSign(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters) Description copied from interface:RemoteDocumentSignatureService
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- Specified by:
getDataToSign
in interfaceRemoteDocumentSignatureService
- Parameters:
remoteDocument
- document to sign or the already existing signatureremoteParameters
- set of the driving signing parameters- Returns:
- the data to be signed
-
signDocument
public RemoteDocument signDocument(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters, SignatureValueDTO signatureValueDTO) Description copied from interface:RemoteDocumentSignatureService
Signs the toSignDocument with the provided signatureValue.- Specified by:
signDocument
in interfaceRemoteDocumentSignatureService
- Parameters:
remoteDocument
- document to signremoteParameters
- set of the driving signing parameterssignatureValueDTO
- the signature value to incorporate- Returns:
- the signed document (
toSignDocument
with the incorporated signature or the detached signature)
-
extendDocument
public RemoteDocument extendDocument(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters) Description copied from interface:RemoteDocumentSignatureService
Extends the level of the signatures in thetoExtendDocument
- Specified by:
extendDocument
in interfaceRemoteDocumentSignatureService
- Parameters:
remoteDocument
- document to extendremoteParameters
- set of the driving signing parameters- Returns:
- the extended signature
-
timestamp
public RemoteDocument timestamp(RemoteDocument remoteDocument, RemoteTimestampParameters remoteParameters) Description copied from interface:RemoteDocumentSignatureService
Adds a timestamp to the document- Specified by:
timestamp
in interfaceRemoteDocumentSignatureService
- Parameters:
remoteDocument
-RemoteDocument
to timestampremoteParameters
- set of the driving timestamp parameters- Returns:
- the timestamped
RemoteDocument
-
getDataToBeCounterSigned
public ToBeSignedDTO getDataToBeCounterSigned(RemoteDocument signatureDocument, RemoteSignatureParameters remoteParameters) Description copied from interface:RemoteDocumentSignatureService
Retrieves the bytes of the data that need to be counter signed fromsignatureDocument
.signatureDocument
shall be a valid signature of the same type- Specified by:
getDataToBeCounterSigned
in interfaceRemoteDocumentSignatureService
- Parameters:
signatureDocument
-RemoteDocument
representing the original signature to be counter signedremoteParameters
-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
public RemoteDocument counterSignSignature(RemoteDocument signatureDocument, RemoteSignatureParameters remoteParameters, SignatureValueDTO signatureValueDTO) Description copied from interface:RemoteDocumentSignatureService
Counter signs thesignatureDocument
with the provided signatureValue.- Specified by:
counterSignSignature
in interfaceRemoteDocumentSignatureService
- Parameters:
signatureDocument
-RemoteDocument
to be counter signedremoteParameters
-RemoteSignatureParameters
set of the driving signing parameters for a counter signaturesignatureValueDTO
-SignatureValueDTO
the signature value to incorporate- Returns:
RemoteDocument
the signature document enveloping a newly created counter signature
-