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
ConstructorsConstructorDescriptionDefault constructor instantiating object with null services -
Method Summary
Modifier and TypeMethodDescriptioncounterSignSignature(RemoteDocument signatureDocument, RemoteSignatureParameters remoteParameters, SignatureValueDTO signatureValueDTO) Counter signs thesignatureDocumentwith the provided signatureValue.extendDocument(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters) Extends the level of the signatures in thetoExtendDocumentgetDataToBeCounterSigned(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 thetoSignDocumentandparameters.voidsetAsicWithCAdESService(ASiCWithCAdESService asicWithCAdESService) Sets the ASiC with CAdES signature servicevoidsetAsicWithXAdESService(ASiCWithXAdESService asicWithXAdESService) Sets the ASiC with XAdES signature servicevoidsetCadesService(CAdESService cadesService) Sets the CAdES signature servicevoidsetJadesService(JAdESService jadesService) Sets the JAdES signature servicevoidsetPadesService(PAdESService padesService) Sets the PAdES signature servicevoidsetXadesService(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:RemoteDocumentSignatureServiceRetrieves the bytes of the data that need to be signed based on thetoSignDocumentandparameters. WhentoSignDocumentcontains 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:
getDataToSignin 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:RemoteDocumentSignatureServiceSigns the toSignDocument with the provided signatureValue.- Specified by:
signDocumentin interfaceRemoteDocumentSignatureService- Parameters:
remoteDocument- document to signremoteParameters- set of the driving signing parameterssignatureValueDTO- the signature value to incorporate- Returns:
- the signed document (
toSignDocumentwith the incorporated signature or the detached signature)
-
extendDocument
public RemoteDocument extendDocument(RemoteDocument remoteDocument, RemoteSignatureParameters remoteParameters) Description copied from interface:RemoteDocumentSignatureServiceExtends the level of the signatures in thetoExtendDocument- Specified by:
extendDocumentin 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:RemoteDocumentSignatureServiceAdds a timestamp to the document- Specified by:
timestampin interfaceRemoteDocumentSignatureService- Parameters:
remoteDocument-RemoteDocumentto timestampremoteParameters- set of the driving timestamp parameters- Returns:
- the timestamped
RemoteDocument
-
getDataToBeCounterSigned
public ToBeSignedDTO getDataToBeCounterSigned(RemoteDocument signatureDocument, RemoteSignatureParameters remoteParameters) Description copied from interface:RemoteDocumentSignatureServiceRetrieves the bytes of the data that need to be counter signed fromsignatureDocument.signatureDocumentshall be a valid signature of the same type- Specified by:
getDataToBeCounterSignedin interfaceRemoteDocumentSignatureService- Parameters:
signatureDocument-RemoteDocumentrepresenting the original signature to be counter signedremoteParameters-RemoteSignatureParametersset of the driving signing parameters for a counter signature- Returns:
ToBeSignedDTOto be counter signed byte array (signature value retrieved from thesignatureDocument)
-
counterSignSignature
public RemoteDocument counterSignSignature(RemoteDocument signatureDocument, RemoteSignatureParameters remoteParameters, SignatureValueDTO signatureValueDTO) Description copied from interface:RemoteDocumentSignatureServiceCounter signs thesignatureDocumentwith the provided signatureValue.- Specified by:
counterSignSignaturein interfaceRemoteDocumentSignatureService- Parameters:
signatureDocument-RemoteDocumentto be counter signedremoteParameters-RemoteSignatureParametersset of the driving signing parameters for a counter signaturesignatureValueDTO-SignatureValueDTOthe signature value to incorporate- Returns:
RemoteDocumentthe signature document enveloping a newly created counter signature
-