Package eu.europa.esig.dss
Class AbstractSignatureParameters
- java.lang.Object
-
- eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
-
- eu.europa.esig.dss.AbstractSignatureParameters
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CAdESSignatureParameters,XAdESSignatureParameters
public abstract class AbstractSignatureParameters extends AbstractSerializableSignatureParameters
Parameters for a Signature creation/extension- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractSignatureParameters()
-
Method Summary
Modifier and Type Method Description voidclearCertificateChain()Clears the certificate chainList<CertificateToken>getCertificateChain()Set the certificate chainList<TimestampToken>getContentTimestamps()Returns the list of theTimestampTokento be incorporated within the signature and representing the content-timestamp.List<DSSDocument>getDetachedContents()This method returns the documents to sign.StringgetDeterministicId()The ID of xades:SignedProperties is contained in the signed content of the xades Signature.byte[]getSignedData()Get signed dataCertificateTokengetSigningCertificate()Get the signing certificatevoidreinitDeterministicId()This methods reinits the deterministicId to force to recompute itvoidsetCertificateChain(CertificateToken... certificateChainArray)This method sets the list of certificates which constitute the chain.voidsetCertificateChain(List<CertificateToken> certificateChain)Set the certificate chainvoidsetContentTimestamps(List<TimestampToken> contentTimestamps)voidsetDetachedContents(List<DSSDocument> detachedContents)When signing this method is internally invoked by theAbstractSignatureServiceand the related variabledetachedContentis overwritten by the service parameter.voidsetSignedData(byte[] signedData)Set signed datavoidsetSigningCertificate(CertificateToken signingCertificate)Set the signing certificate.-
Methods inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
bLevel, equals, getArchiveTimestampParameters, getContentTimestampParameters, getDigestAlgorithm, getEncryptionAlgorithm, getMaskGenerationFunction, getReferenceDigestAlgorithm, getSignatureAlgorithm, getSignatureLevel, getSignaturePackaging, getSignatureTimestampParameters, hashCode, isGenerateTBSWithoutCertificate, isSignWithExpiredCertificate, setArchiveTimestampParameters, setBLevelParams, setContentTimestampParameters, setDigestAlgorithm, setEncryptionAlgorithm, setGenerateTBSWithoutCertificate, setMaskGenerationFunction, setReferenceDigestAlgorithm, setSignatureLevel, setSignaturePackaging, setSignatureTimestampParameters, setSignWithExpiredCertificate, toString
-
-
-
-
Method Detail
-
getContentTimestamps
public List<TimestampToken> getContentTimestamps()
Returns the list of theTimestampTokento be incorporated within the signature and representing the content-timestamp.- Returns:
ListofTimestampToken
-
setContentTimestamps
public void setContentTimestamps(List<TimestampToken> contentTimestamps)
-
getDeterministicId
public String getDeterministicId()
The ID of xades:SignedProperties is contained in the signed content of the xades Signature. We must create this ID in a deterministic way.- Returns:
- the unique ID for the current signature
-
getDetachedContents
public List<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<DSSDocument> detachedContents)
When signing this method is internally invoked by theAbstractSignatureServiceand the related variabledetachedContentis 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 CertificateToken getSigningCertificate()
Get the signing certificate- Returns:
- the signing certificate
-
setSigningCertificate
public void setSigningCertificate(CertificateToken signingCertificate)
Set the signing certificate. The encryption algorithm is also set from the public key.- Parameters:
signingCertificate- the signing certificate
-
getSignedData
public byte[] getSignedData()
Get signed data- Returns:
-
setSignedData
public void setSignedData(byte[] signedData)
Set signed data- Parameters:
signedData- data that was used when creating the signature value.
-
getCertificateChain
public List<CertificateToken> getCertificateChain()
Set the certificate chain- Returns:
- the certificate chain
-
clearCertificateChain
public void clearCertificateChain()
Clears the certificate chain
-
setCertificateChain
public void setCertificateChain(List<CertificateToken> certificateChain)
Set the certificate chain- Parameters:
certificateChain- theListofCertificateTokens
-
setCertificateChain
public void setCertificateChain(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
-
reinitDeterministicId
public void reinitDeterministicId()
This methods reinits the deterministicId to force to recompute it
-
-