Class RemoteSignatureParameters

java.lang.Object
eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters
All Implemented Interfaces:
Serializable

public class RemoteSignatureParameters extends Object implements Serializable
The parameters for a signature creation
See Also:
  • Constructor Details

    • RemoteSignatureParameters

      public RemoteSignatureParameters()
      Default constructor
  • Method Details

    • getSigningCertificate

      public RemoteCertificate getSigningCertificate()
      Gets the signing certificate
      Returns:
      RemoteCertificate
    • setSigningCertificate

      public void setSigningCertificate(RemoteCertificate signingCertificate)
      Sets the signing certificate
      Parameters:
      signingCertificate - RemoteCertificate
    • getCertificateChain

      public List<RemoteCertificate> getCertificateChain()
      Gets the certificate chain
      Returns:
      a list of RemoteCertificates
    • setCertificateChain

      public void setCertificateChain(List<RemoteCertificate> certificateChain)
      Sets the certificate chain of the signing certificate
      Parameters:
      certificateChain - a list of RemoteCertificates
    • getDetachedContents

      public List<RemoteDocument> getDetachedContents()
      Gets the detached contents
      Returns:
      a list of RemoteDocuments
    • setDetachedContents

      public void setDetachedContents(List<RemoteDocument> detachedContents)
      Sets a list of signed detached documents
      Parameters:
      detachedContents - a ist of RemoteDocuments
    • getAsicContainerType

      public ASiCContainerType getAsicContainerType()
      Gets ASiC container type
      Returns:
      ASiCContainerType
    • setAsicContainerType

      public void setAsicContainerType(ASiCContainerType asicContainerType)
      Sets ASiCContainerType for ASiC format creation
      Parameters:
      asicContainerType - ASiCContainerType
    • getSignatureLevel

      public SignatureLevel getSignatureLevel()
      Get signature level: XAdES_BASELINE_T, CAdES_BASELINE_LTA...
      Returns:
      the expected signature level
    • setSignatureLevel

      public void setSignatureLevel(SignatureLevel signatureLevel)
      Set signature level. This field cannot be null.
      Parameters:
      signatureLevel - the expected signature level
    • isEmbedXML

      public boolean isEmbedXML()
      Returns if original XML document shall be embedded into ENVELOPING signature in its clear XML representation
      Returns:
      TRUE if the original document shall be embedded in its XML representation, FALSE of base64 encoded
    • setEmbedXML

      public void setEmbedXML(boolean embedXML)
      Sets whether the original XML document shall be embedded in its XML representation NOTE: used only for XAdES
      Parameters:
      embedXML - whether the original object shall be embedded as XML
    • isManifestSignature

      public boolean isManifestSignature()
      Returns if a manifest signature should be created
      Returns:
      TRUE if a signature signs an XML Manifest, FALSE otherwise
    • setManifestSignature

      public void setManifestSignature(boolean manifestSignature)
      Sets whether a manifest signature shall be created NOTE: used only for XAdES
      Parameters:
      manifestSignature - whether a manifest signature shall be created
    • getJwsSerializationType

      public JWSSerializationType getJwsSerializationType()
      Gets JWSSerializationType NOTE: used only for JAdES
      Returns:
      JWSSerializationType
    • setJwsSerializationType

      public void setJwsSerializationType(JWSSerializationType jwsSerializationType)
      Sets JWSSerializationType
      Parameters:
      jwsSerializationType - JWSSerializationType to use
    • getSigDMechanism

      public SigDMechanism getSigDMechanism()
      Gets SigDMechanism NOTE: used only for JAdES with DETACHED packaging
      Returns:
      SigDMechanism
    • setSigDMechanism

      public void setSigDMechanism(SigDMechanism sigDMechanism)
      Sets SigDMechanism NOTE: used only for JAdES with DETACHED packaging
      Parameters:
      sigDMechanism - SigDMechanism to use
    • getReferenceDigestAlgorithm

      public DigestAlgorithm getReferenceDigestAlgorithm()
      Get the digest algorithm for ds:Reference or message-digest attribute
      Returns:
      the digest algorithm for ds:Reference or message-digest attribute
    • setReferenceDigestAlgorithm

      public void setReferenceDigestAlgorithm(DigestAlgorithm referenceDigestAlgorithm)
      Sets the digest algorithm for ds:Reference or message-digest attribute
      Parameters:
      referenceDigestAlgorithm - DigestAlgorithm
    • getBLevelParams

      public RemoteBLevelParameters getBLevelParams()
      Get Baseline B parameters (signed properties)
      Returns:
      the Baseline B parameters
    • setBLevelParams

      public void setBLevelParams(RemoteBLevelParameters bLevelParams)
      Set the Baseline B parameters (signed properties)
      Parameters:
      bLevelParams - the baseline B properties
    • getSignaturePackaging

      public SignaturePackaging getSignaturePackaging()
      Get Signature packaging
      Returns:
      the expected signature packaging
    • setSignaturePackaging

      public void setSignaturePackaging(SignaturePackaging signaturePackaging)
      Set Signature packaging
      Parameters:
      signaturePackaging - the expected signature packaging
    • getDigestAlgorithm

      public DigestAlgorithm getDigestAlgorithm()
      Get the digest algorithm
      Returns:
      the digest algorithm
    • setDigestAlgorithm

      public void setDigestAlgorithm(DigestAlgorithm digestAlgorithm)
      Set the digest algorithm
      Parameters:
      digestAlgorithm - the digest algorithm to set
    • setEncryptionAlgorithm

      public void setEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm)
      This setter should be used only when dealing with web services (or when signing in three steps). Usually the encryption algorithm is automatically extrapolated from the private key.
      Parameters:
      encryptionAlgorithm - the encryption algorithm to use
    • setMaskGenerationFunction

      public void setMaskGenerationFunction(MaskGenerationFunction maskGenerationFunction)
      Sets the mask generation function of the signature algorithm, when applicable
      Parameters:
      maskGenerationFunction - MaskGenerationFunction
    • getEncryptionAlgorithm

      public EncryptionAlgorithm getEncryptionAlgorithm()
      Get the encryption algorithm
      Returns:
      the encryption algorithm.
    • getMaskGenerationFunction

      public MaskGenerationFunction getMaskGenerationFunction()
      Get the mask generation function
      Returns:
      the mask generation function.
    • getSignatureAlgorithm

      public SignatureAlgorithm getSignatureAlgorithm()
      Gets the signature algorithm.
      Returns:
      the signature algorithm
    • getContentTimestamps

      public List<TimestampDTO> getContentTimestamps()
      Gets a list of content timestamps
      Returns:
      list of TimestampDTOs
    • setContentTimestamps

      public void setContentTimestamps(List<TimestampDTO> contentTimestamps)
      Sets a list of content timestamps to be added into the signature
      Parameters:
      contentTimestamps - list of content TimestampDTOs to set
    • getContentTimestampParameters

      public RemoteTimestampParameters getContentTimestampParameters()
      Get the parameters for content timestamp (Baseline-B)
      Returns:
      the parameters to produce a content timestamp
    • setContentTimestampParameters

      public void setContentTimestampParameters(RemoteTimestampParameters contentTimestampParameters)
      Set the parameters to produce the content timestamp (Baseline-B)
      Parameters:
      contentTimestampParameters - the parameters to produce the content timestamp
    • getSignatureTimestampParameters

      public RemoteTimestampParameters getSignatureTimestampParameters()
      Get the parameters for signature timestamp (Baseline-T)
      Returns:
      the parameters to produce a signature timestamp
    • setSignatureTimestampParameters

      public void setSignatureTimestampParameters(RemoteTimestampParameters signatureTimestampParameters)
      Set the parameters to produce the signature timestamp (Baseline-T)
      Parameters:
      signatureTimestampParameters - the parameters to produce the signature timestamp
    • getArchiveTimestampParameters

      public RemoteTimestampParameters getArchiveTimestampParameters()
      Get the parameters for achive timestamp (Baseline-LTA)
      Returns:
      the parameters to produce an archive timestamp
    • setArchiveTimestampParameters

      public void setArchiveTimestampParameters(RemoteTimestampParameters archiveTimestampParameters)
      Set the parameters to produce the archive timestamp (Baseline-LTA)
      Parameters:
      archiveTimestampParameters - the parameters to produce the archive timestamp
    • isSignWithExpiredCertificate

      public boolean isSignWithExpiredCertificate()
      Indicates if it is possible to sign with an expired certificate. The default value is false.
      Returns:
      true if signature with an expired certificate is allowed
    • setSignWithExpiredCertificate

      public void setSignWithExpiredCertificate(boolean signWithExpiredCertificate)
      Allows to change the default behavior regarding the use of an expired certificate.
      Parameters:
      signWithExpiredCertificate - true if signature with an expired certificate is allowed
    • isGenerateTBSWithoutCertificate

      public boolean isGenerateTBSWithoutCertificate()
      Indicates if it is possible to generate ToBeSigned data without the signing certificate. The default values is false.
      Returns:
      true if signing certificate is not required when generating ToBeSigned data.
    • setGenerateTBSWithoutCertificate

      public void setGenerateTBSWithoutCertificate(boolean generateTBSWithoutCertificate)
      Allows to change the default behaviour regarding the requirements of signing certificate to generate ToBeSigned data.
      Parameters:
      generateTBSWithoutCertificate - true if it should be possible to generate ToBeSigned data without certificate.
    • getImageParameters

      public RemoteSignatureImageParameters getImageParameters()
      Get the image information to be included (PAdES).
      Returns:
      RemoteSignatureImageParameters the image information to be included.
    • setImageParameters

      public void setImageParameters(RemoteSignatureImageParameters imageParameters)
      Set the image information to be included (PAdES).
      Parameters:
      imageParameters - RemoteSignatureImageParameters the image information to be included.
    • getSignatureIdToCounterSign

      public String getSignatureIdToCounterSign()
      Returns a signature Id being counter signed
      Returns:
      String signature Id to counter sign
    • setSignatureIdToCounterSign

      public void setSignatureIdToCounterSign(String signatureIdToCounterSign)
      Sets the signature Id to counter sign
      Parameters:
      signatureIdToCounterSign - String signature id to counter sign
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object