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

    Constructors
    Constructor
    Description
    Default constructor instantiating object with null services
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
    Counter signs the signatureDocument with the provided signatureValue.
    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)
    Extends the level of the signatures in the toExtendDocument
    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)
    Retrieves the bytes of the data that need to be counter signed from signatureDocument.
    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)
    Retrieves the bytes of the data that need to be signed based on the toSignDocument and parameters.
    void
    setAsicWithCAdESService(eu.europa.esig.dss.asic.cades.signature.ASiCWithCAdESService asicWithCAdESService)
    Sets the ASiC with CAdES signature service
    void
    setAsicWithXAdESService(eu.europa.esig.dss.asic.xades.signature.ASiCWithXAdESService asicWithXAdESService)
    Sets the ASiC with XAdES signature service
    void
    setCadesService(eu.europa.esig.dss.cades.signature.CAdESService cadesService)
    Sets the CAdES signature service
    void
    setJadesService(eu.europa.esig.dss.jades.signature.JAdESService jadesService)
    Sets the JAdES signature service
    void
    setPadesService(eu.europa.esig.dss.pades.signature.PAdESService padesService)
    Sets the PAdES signature service
    void
    setXadesService(eu.europa.esig.dss.xades.signature.XAdESService xadesService)
    Sets the XAdES signature service
    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)
    Signs the toSignDocument with the provided signatureValue.
    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)
    Adds a timestamp to the document

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: RemoteDocumentSignatureService
      Retrieves the bytes of the data that need to be signed based on the toSignDocument and parameters. When toSignDocument 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 interface RemoteDocumentSignatureService
      Parameters:
      remoteDocument - document to sign or the already existing signature
      remoteParameters - 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: RemoteDocumentSignatureService
      Signs the toSignDocument with the provided signatureValue.
      Specified by:
      signDocument in interface RemoteDocumentSignatureService
      Parameters:
      remoteDocument - document to sign
      remoteParameters - set of the driving signing parameters
      signatureValueDTO - the signature value to incorporate
      Returns:
      the signed document (toSignDocument with the incorporated signature or the detached signature)
    • extendDocument

      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)
      Description copied from interface: RemoteDocumentSignatureService
      Extends the level of the signatures in the toExtendDocument
      Specified by:
      extendDocument in interface RemoteDocumentSignatureService
      Parameters:
      remoteDocument - document to extend
      remoteParameters - set of the driving signing parameters
      Returns:
      the extended signature
    • 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: RemoteDocumentSignatureService
      Adds a timestamp to the document
      Specified by:
      timestamp in interface RemoteDocumentSignatureService
      Parameters:
      remoteDocument - RemoteDocument to timestamp
      remoteParameters - 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: RemoteDocumentSignatureService
      Retrieves the bytes of the data that need to be counter signed from signatureDocument. signatureDocument shall be a valid signature of the same type
      Specified by:
      getDataToBeCounterSigned in interface RemoteDocumentSignatureService
      Parameters:
      signatureDocument - RemoteDocument representing the original signature to be counter signed
      remoteParameters - RemoteSignatureParameters set of the driving signing parameters for a counter signature
      Returns:
      ToBeSignedDTO to be counter signed byte array (signature value retrieved from the signatureDocument)
    • 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: RemoteDocumentSignatureService
      Counter signs the signatureDocument with the provided signatureValue.
      Specified by:
      counterSignSignature in interface RemoteDocumentSignatureService
      Parameters:
      signatureDocument - RemoteDocument to be counter signed
      remoteParameters - RemoteSignatureParameters set of the driving signing parameters for a counter signature
      signatureValueDTO - SignatureValueDTO the signature value to incorporate
      Returns:
      RemoteDocument the signature document enveloping a newly created counter signature