Module jpms_dss_xades
Package eu.europa.esig.dss.xades.tsl
Class AbstractTrustedListSignatureParametersBuilder
java.lang.Object
eu.europa.esig.dss.signature.AbstractSignatureParametersBuilder<XAdESSignatureParameters>
eu.europa.esig.dss.xades.tsl.AbstractTrustedListSignatureParametersBuilder
- All Implemented Interfaces:
eu.europa.esig.dss.model.SignatureParametersBuilder<XAdESSignatureParameters>
- Direct Known Subclasses:
TrustedListV5SignatureParametersBuilder,TrustedListV6SignatureParametersBuilder
public abstract class AbstractTrustedListSignatureParametersBuilder
extends eu.europa.esig.dss.signature.AbstractSignatureParametersBuilder<XAdESSignatureParameters>
This class contains common methods for signature parameters creation for an XML Trusted List signature
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTrustedListSignatureParametersBuilder(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 -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method helps to determine whether the chosen signature parameters builders is applicable to the given document.build()protected DSSReferenceCreates the enveloped-signature ds:Referenceprotected List<DSSReference> Returns a list of ds:References to be incorporated within the signatureprotected abstract IntegerThis method returns the target XML Trusted List version to be signedprotected XAdESSignatureParametersprotected abstract booleanGets whether the created XAdES signature shall be conformant to ETSI EN 319 132 standardsetReferenceDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) Sets an Enveloped ReferenceDigestAlgorithmto usesetReferenceId(String referenceId) Sets an Enveloped Reference Id to useMethods inherited from class eu.europa.esig.dss.signature.AbstractSignatureParametersBuilder
bLevel, setBLevelParams, setDigestAlgorithm, setEncryptionAlgorithm
-
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-CertificateTokento be used for a signature creationtlXmlDocument-DSSDocumentTrusted List XML document to be signed
-
-
Method Details
-
setReferenceId
Sets an Enveloped Reference Id to useDefault: "ref-enveloped-signature"
- Parameters:
referenceId-Stringreference Id- Returns:
- this builder
-
setReferenceDigestAlgorithm
public AbstractTrustedListSignatureParametersBuilder setReferenceDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) Sets an Enveloped ReferenceDigestAlgorithmto use- Parameters:
digestAlgorithm-DigestAlgorithmto be used- Returns:
- this builder
-
initParameters
- Specified by:
initParametersin classeu.europa.esig.dss.signature.AbstractSignatureParametersBuilder<XAdESSignatureParameters>
-
build
- Specified by:
buildin interfaceeu.europa.esig.dss.model.SignatureParametersBuilder<XAdESSignatureParameters>- Overrides:
buildin classeu.europa.esig.dss.signature.AbstractSignatureParametersBuilder<XAdESSignatureParameters>
-
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
Returns a list of ds:References to be incorporated within the signature- Returns:
- a list of
DSSReferences
-
getEnvelopedSignatureReference
Creates the enveloped-signature ds:Reference- Returns:
DSSReference
-
assertConfigurationIsValid
public void assertConfigurationIsValid() throws eu.europa.esig.dss.spi.exception.IllegalInputExceptionThis 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 structureeu.europa.esig.dss.model.DSSException- is other error occurred during the processing
-
getTargetTLVersion
-