Class AbstractSignatureParameters<TP extends eu.europa.esig.dss.model.SerializableTimestampParameters>

java.lang.Object
eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP>
eu.europa.esig.dss.signature.AbstractSignatureParameters<TP>
Type Parameters:
TP - implementation of certain format signature parameters
All Implemented Interfaces:
eu.europa.esig.dss.model.SerializableSignatureParameters, Serializable

public abstract class AbstractSignatureParameters<TP extends eu.europa.esig.dss.model.SerializableTimestampParameters> extends eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP>
Parameters for a Signature creation/extension
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The internal signature processing variable

    Fields inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters

    archiveTimestampParameters, contentTimestampParameters, signatureTimestampParameters
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor instantiating object with null values
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    List<eu.europa.esig.dss.model.x509.CertificateToken>
    Set the certificate chain
    List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken>
    Returns the list of the TimestampToken to be incorporated within the signature and representing the content-timestamp.
    Gets the signature creation context (internal variable)
    List<eu.europa.esig.dss.model.DSSDocument>
    This method returns the documents to sign.
    The deterministic identifier used for unique identification of a created signature (used in XAdES and PAdES).
    byte[]
    Get signed data
    eu.europa.esig.dss.model.x509.CertificateToken
    Get the signing certificate
    int
     
    void
    This method re-inits signature parameters to clean temporary settings
    void
    setCertificateChain(eu.europa.esig.dss.model.x509.CertificateToken... certificateChainArray)
    This method sets the list of certificates which constitute the chain.
    void
    setCertificateChain(List<eu.europa.esig.dss.model.x509.CertificateToken> certificateChain)
    Set the certificate chain
    void
    setContentTimestamps(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> contentTimestamps)
    Sets a list of content timestamps to be included into the signature
    void
    setDetachedContents(List<eu.europa.esig.dss.model.DSSDocument> detachedContents)
    When signing this method is internally invoked by the AbstractSignatureService and the related variable detachedContent is overwritten by the service parameter.
    void
    setSignedData(byte[] signedData)
    Set signed data
    void
    setSigningCertificate(eu.europa.esig.dss.model.x509.CertificateToken signingCertificate)
    Set the signing certificate.
     

    Methods inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters

    bLevel, getArchiveTimestampParameters, getContentTimestampParameters, getDigestAlgorithm, getEncryptionAlgorithm, getReferenceDigestAlgorithm, getSignatureAlgorithm, getSignatureLevel, getSignaturePackaging, getSignatureTimestampParameters, getValidationDataEncapsulationStrategy, isCheckCertificateRevocation, isGenerateTBSWithoutCertificate, setArchiveTimestampParameters, setBLevelParams, setCheckCertificateRevocation, setContentTimestampParameters, setDigestAlgorithm, setEncryptionAlgorithm, setGenerateTBSWithoutCertificate, setReferenceDigestAlgorithm, setSignatureLevel, setSignaturePackaging, setSignatureTimestampParameters, setValidationDataEncapsulationStrategy

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • context

      protected ProfileParameters context
      The internal signature processing variable
  • Constructor Details

    • AbstractSignatureParameters

      protected AbstractSignatureParameters()
      Default constructor instantiating object with null values
  • Method Details

    • getContentTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getContentTimestamps()
      Returns the list of the TimestampToken to be incorporated within the signature and representing the content-timestamp.
      Returns:
      List of TimestampToken
    • setContentTimestamps

      public void setContentTimestamps(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> contentTimestamps)
      Sets a list of content timestamps to be included into the signature
      Parameters:
      contentTimestamps - a list of TimestampTokens
    • getDetachedContents

      public List<eu.europa.esig.dss.model.DSSDocument> getDetachedContents()
      This method returns the documents to sign. In the case of the DETACHED signature this is the detached document.
      Returns:
      the list of detached documents
    • setDetachedContents

      public void setDetachedContents(List<eu.europa.esig.dss.model.DSSDocument> detachedContents)
      When signing this method is internally invoked by the AbstractSignatureService and the related variable detachedContent is overwritten by the service parameter. In the case of the DETACHED signature this is the detached document. In the case of ASiC-S this is the document to be signed.

      When extending this method must be invoked to indicate the detachedContent.

      Parameters:
      detachedContents - the list of detached documents
    • getSigningCertificate

      public eu.europa.esig.dss.model.x509.CertificateToken getSigningCertificate()
      Get the signing certificate
      Returns:
      the signing certificate
    • setSigningCertificate

      public void setSigningCertificate(eu.europa.esig.dss.model.x509.CertificateToken signingCertificate)
      Set the signing certificate. The encryption algorithm is also set from the public key. Note: This method overwrites the encryptionAlgorithm value by extracting the encryption algorithm from the provided signing-certificate. In order to enforce a specific encryption algorithm (when supported by the key), please execute #setEncryptionAlgorithm method after this method.
      Parameters:
      signingCertificate - the signing certificate
    • getSignedData

      public byte[] getSignedData()
      Get signed data
      Returns:
      signed data binaries
    • setSignedData

      public void setSignedData(byte[] signedData)
      Set signed data
      Parameters:
      signedData - data that was used when creating the signature value.
    • getCertificateChain

      public List<eu.europa.esig.dss.model.x509.CertificateToken> getCertificateChain()
      Set the certificate chain
      Returns:
      the certificate chain
    • setCertificateChain

      public void setCertificateChain(List<eu.europa.esig.dss.model.x509.CertificateToken> certificateChain)
      Set the certificate chain
      Parameters:
      certificateChain - the List of CertificateTokens
    • setCertificateChain

      public void setCertificateChain(eu.europa.esig.dss.model.x509.CertificateToken... certificateChainArray)
      This method sets the list of certificates which constitute the chain. If the certificate is already present in the array then it is ignored.
      Parameters:
      certificateChainArray - the array containing all certificates composing the chain
    • getDeterministicId

      public String getDeterministicId()
      The deterministic identifier used for unique identification of a created signature (used in XAdES and PAdES). The identifier shall be built in a deterministic way to ensure the same value on both method calls during the signature creation.
      Returns:
      the unique ID for the current signature or a document
    • getContext

      public ProfileParameters getContext()
      Gets the signature creation context (internal variable)
      Returns:
      ProfileParameters
    • reinit

      public void reinit()
      This method re-inits signature parameters to clean temporary settings
    • toString

      public String toString()
      Overrides:
      toString in class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP extends eu.europa.esig.dss.model.SerializableTimestampParameters>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP extends eu.europa.esig.dss.model.SerializableTimestampParameters>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP extends eu.europa.esig.dss.model.SerializableTimestampParameters>