Class AbstractTrustedListSignatureParametersBuilder
java.lang.Object
eu.europa.esig.dss.xades.tsl.AbstractTrustedListSignatureParametersBuilder
- Direct Known Subclasses:
TrustedListV5SignatureParametersBuilder, TrustedListV6SignatureParametersBuilder
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.eu.europa.esig.dss.model.BLevelParametersbLevel()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 standardeu.europa.esig.dss.signature.AbstractSignatureParametersBuilder<XAdESSignatureParameters> setBLevelParams(eu.europa.esig.dss.model.BLevelParameters arg0) eu.europa.esig.dss.signature.AbstractSignatureParametersBuildersetDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) eu.europa.esig.dss.signature.AbstractSignatureParametersBuildersetEncryptionAlgorithm(eu.europa.esig.dss.enumerations.EncryptionAlgorithm arg0) setReferenceDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) Sets an Enveloped ReferenceDigestAlgorithmto usesetReferenceId(String referenceId) Sets an Enveloped Reference Id to use
-
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
-
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
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
-
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)
-