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 TypeMethodDescriptioneu.europa.esig.dss.ws.dto.RemoteDocumentcounterSignSignature(eu.europa.esig.dss.ws.dto.RemoteDocument signatureDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters, eu.europa.esig.dss.ws.dto.SignatureValueDTO signatureValueDTO) Counter signs thesignatureDocumentwith the provided signatureValue.eu.europa.esig.dss.ws.dto.RemoteDocumentextendDocument(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters) Extends the level of the signatures in thetoExtendDocumentaccording to the defined targetsignatureProfileand/orparameterseu.europa.esig.dss.ws.dto.RemoteDocumentextendDocument(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters) Deprecated.eu.europa.esig.dss.ws.dto.ToBeSignedDTOgetDataToBeCounterSigned(eu.europa.esig.dss.ws.dto.RemoteDocument signatureDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters) Retrieves the bytes of the data that need to be counter signed fromsignatureDocument.eu.europa.esig.dss.ws.dto.ToBeSignedDTOgetDataToSign(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters) Retrieves the bytes of the data that need to be signed based on thetoSignDocumentandparameters.voidsetAsicWithCAdESService(eu.europa.esig.dss.asic.cades.signature.ASiCWithCAdESService asicWithCAdESService) Sets the ASiC with CAdES signature servicevoidsetAsicWithXAdESService(eu.europa.esig.dss.asic.xades.signature.ASiCWithXAdESService asicWithXAdESService) Sets the ASiC with XAdES signature servicevoidsetCadesService(eu.europa.esig.dss.cades.signature.CAdESService cadesService) Sets the CAdES signature servicevoidsetJadesService(eu.europa.esig.dss.jades.signature.JAdESService jadesService) Sets the JAdES signature servicevoidsetPadesService(eu.europa.esig.dss.pades.signature.PAdESService padesService) Sets the PAdES signature servicevoidsetXadesService(eu.europa.esig.dss.xades.signature.XAdESService xadesService) Sets the XAdES signature serviceeu.europa.esig.dss.ws.dto.RemoteDocumentsignDocument(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters, eu.europa.esig.dss.ws.dto.SignatureValueDTO signatureValueDTO) Signs the toSignDocument with the provided signatureValue.eu.europa.esig.dss.ws.dto.RemoteDocumenttimestamp(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteTimestampParameters remoteParameters) Adds a timestamp to the documentMethods inherited from class AbstractRemoteSignatureServiceImpl
createCounterSignatureParameters, createParameters, fillParameters, getASiCSignatureParameters, getExtensionParameters, getJAdESSignatureParameters, getPAdESSignatureParameters, getSignatureParameters, getXAdESSignatureParameters, toBLevelParameters, toCommitmentTypeList, toSignatureValue, toTimestampParameters, toTimestampParameters
-
Constructor Details
-
RemoteDocumentSignatureServiceImpl
public RemoteDocumentSignatureServiceImpl()Default constructor instantiating object with null services
-
-
Method Details
-
setXadesService
public void setXadesService(eu.europa.esig.dss.xades.signature.XAdESService xadesService) Sets the XAdES signature service- Parameters:
xadesService-XAdESService
-
setCadesService
public void setCadesService(eu.europa.esig.dss.cades.signature.CAdESService cadesService) Sets the CAdES signature service- Parameters:
cadesService-CAdESService
-
setPadesService
public void setPadesService(eu.europa.esig.dss.pades.signature.PAdESService padesService) Sets the PAdES signature service- Parameters:
padesService-PAdESService
-
setJadesService
public void setJadesService(eu.europa.esig.dss.jades.signature.JAdESService jadesService) Sets the JAdES signature service- Parameters:
jadesService-JAdESService
-
setAsicWithXAdESService
public void setAsicWithXAdESService(eu.europa.esig.dss.asic.xades.signature.ASiCWithXAdESService asicWithXAdESService) Sets the ASiC with XAdES signature service- Parameters:
asicWithXAdESService-ASiCWithXAdESService
-
setAsicWithCAdESService
public void setAsicWithCAdESService(eu.europa.esig.dss.asic.cades.signature.ASiCWithCAdESService asicWithCAdESService) Sets the ASiC with CAdES signature service- Parameters:
asicWithCAdESService-ASiCWithCAdESService
-
getDataToSign
public eu.europa.esig.dss.ws.dto.ToBeSignedDTO getDataToSign(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters) Description copied from interface:RemoteDocumentSignatureServiceRetrieves the bytes of the data that need to be signed based on thetoSignDocumentandparameters.When
toSignDocumentcontains 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 eu.europa.esig.dss.ws.dto.RemoteDocument signDocument(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters, eu.europa.esig.dss.ws.dto.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
@Deprecated public eu.europa.esig.dss.ws.dto.RemoteDocument extendDocument(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters) Deprecated.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
-
extendDocument
public eu.europa.esig.dss.ws.dto.RemoteDocument extendDocument(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.enumerations.SignatureProfile signatureProfile, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters) throws eu.europa.esig.dss.model.DSSException Description copied from interface:RemoteDocumentSignatureServiceExtends the level of the signatures in thetoExtendDocumentaccording to the defined targetsignatureProfileand/orparameters- Specified by:
extendDocumentin interfaceRemoteDocumentSignatureService- Parameters:
remoteDocument- document to extendsignatureProfile- (conditional presence) target signature augmentation profileremoteParameters- (conditional presence) set of the driving signing parameters- Returns:
- the extended signature
- Throws:
eu.europa.esig.dss.model.DSSException- if an error occurred
-
timestamp
public eu.europa.esig.dss.ws.dto.RemoteDocument timestamp(eu.europa.esig.dss.ws.dto.RemoteDocument remoteDocument, eu.europa.esig.dss.ws.signature.dto.parameters.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 eu.europa.esig.dss.ws.dto.ToBeSignedDTO getDataToBeCounterSigned(eu.europa.esig.dss.ws.dto.RemoteDocument signatureDocument, eu.europa.esig.dss.ws.signature.dto.parameters.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 eu.europa.esig.dss.ws.dto.RemoteDocument counterSignSignature(eu.europa.esig.dss.ws.dto.RemoteDocument signatureDocument, eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters remoteParameters, eu.europa.esig.dss.ws.dto.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
-