Class AbstractTrustedListSignatureParametersBuilder

java.lang.Object
eu.europa.esig.dss.xades.tsl.AbstractTrustedListSignatureParametersBuilder
Direct Known Subclasses:
TrustedListV5SignatureParametersBuilder, TrustedListV6SignatureParametersBuilder

public abstract class AbstractTrustedListSignatureParametersBuilder extends Object
This class contains common methods for signature parameters creation for an XML Trusted List signature
  • Constructor Details

    • AbstractTrustedListSignatureParametersBuilder

      protected AbstractTrustedListSignatureParametersBuilder(eu.europa.esig.dss.model.x509.CertificateToken signingCertificate, eu.europa.esig.dss.model.DSSDocument tlXmlDocument)
      The constructor to build Signature Parameters for a Trusted List signing with respect to ETSI TS 119 612
      Parameters:
      signingCertificate - CertificateToken to be used for a signature creation
      tlXmlDocument - DSSDocument Trusted List XML document to be signed
  • Method Details

    • setReferenceId

      public AbstractTrustedListSignatureParametersBuilder setReferenceId(String referenceId)
      Sets an Enveloped Reference Id to use

      Default: "ref-enveloped-signature"

      Parameters:
      referenceId - String reference Id
      Returns:
      this builder
    • setReferenceDigestAlgorithm

      public AbstractTrustedListSignatureParametersBuilder setReferenceDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm)
      Sets an Enveloped Reference DigestAlgorithm to use
      Parameters:
      digestAlgorithm - DigestAlgorithm to be used
      Returns:
      this builder
    • initParameters

      protected XAdESSignatureParameters initParameters()
    • build

      public XAdESSignatureParameters build()
    • isEn319132

      protected abstract boolean isEn319132()
      Gets whether the created XAdES signature shall be conformant to ETSI EN 319 132 standard
      Returns:
      TRUE if the created signature shall be conformant to ETSI EN 319 132 standard (new XAdES), FALSE otherwise
    • getReferences

      protected List<DSSReference> getReferences()
      Returns a list of ds:References to be incorporated within the signature
      Returns:
      a list of DSSReferences
    • getEnvelopedSignatureReference

      protected DSSReference getEnvelopedSignatureReference()
      Creates the enveloped-signature ds:Reference
      Returns:
      DSSReference
    • assertConfigurationIsValid

      public void assertConfigurationIsValid() throws eu.europa.esig.dss.spi.exception.IllegalInputException
      This method helps to determine whether the chosen signature parameters builders is applicable to the given document. Thus, it verifies whether the provided document representing the XML Trusted List is conformant to the definition and the target version. NOTE: this method requires 'dss-validation' module.
      Throws:
      eu.europa.esig.dss.spi.exception.IllegalInputException - if the provided XML Trusted List has invalid structure
      eu.europa.esig.dss.model.DSSException - is other error occurred during the processing
    • getTargetTLVersion

      protected abstract Integer getTargetTLVersion()
      This method returns the target XML Trusted List version to be signed
      Returns:
      Integer
    • setEncryptionAlgorithm

      public eu.europa.esig.dss.signature.AbstractSignatureParametersBuilder setEncryptionAlgorithm(eu.europa.esig.dss.enumerations.EncryptionAlgorithm arg0)
    • setDigestAlgorithm

      public eu.europa.esig.dss.signature.AbstractSignatureParametersBuilder setDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
    • bLevel

      public eu.europa.esig.dss.model.BLevelParameters bLevel()
    • setBLevelParams

      public eu.europa.esig.dss.signature.AbstractSignatureParametersBuilder<XAdESSignatureParameters> setBLevelParams(eu.europa.esig.dss.model.BLevelParameters arg0)