Package eu.europa.esig.dss.model
Class AbstractSerializableSignatureParameters<TP extends SerializableTimestampParameters>
java.lang.Object
eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP>
- All Implemented Interfaces:
SerializableSignatureParameters
,Serializable
- Direct Known Subclasses:
AbstractSignatureParameters
public abstract class AbstractSerializableSignatureParameters<TP extends SerializableTimestampParameters> extends Object implements SerializableSignatureParameters
Parameters for a Signature creation/extension
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected TP
archiveTimestampParameters
The object representing the parameters related to the archive timestamp (Baseline-LTA)protected TP
contentTimestampParameters
The object representing the parameters related to the content timestamp (Baseline-B)protected TP
signatureTimestampParameters
The object representing the parameters related to the signature timestamp (Baseline-T) -
Constructor Summary
Constructors Constructor Description AbstractSerializableSignatureParameters()
-
Method Summary
Modifier and Type Method Description BLevelParameters
bLevel()
Get Baseline B parameters (signed properties)boolean
equals(Object obj)
TP
getArchiveTimestampParameters()
Get the parameters for achive timestamp (Baseline-LTA)TP
getContentTimestampParameters()
Get the parameters for content timestamp (Baseline-B)DigestAlgorithm
getDigestAlgorithm()
Get the digest algorithmEncryptionAlgorithm
getEncryptionAlgorithm()
Get the encryption algorithmMaskGenerationFunction
getMaskGenerationFunction()
Returns the mask generation functionDigestAlgorithm
getReferenceDigestAlgorithm()
Get the digest algorithm for ds:Reference or message-digest attributeSignatureAlgorithm
getSignatureAlgorithm()
Gets the signature algorithm.SignatureLevel
getSignatureLevel()
Get signature level: XAdES_BASELINE_T, CAdES_BASELINE_LTA...SignaturePackaging
getSignaturePackaging()
Get Signature packagingTP
getSignatureTimestampParameters()
Get the parameters for signature timestamp (Baseline-T)int
hashCode()
boolean
isGenerateTBSWithoutCertificate()
Indicates if it is possible to generate ToBeSigned data without the signing certificate.boolean
isSignWithExpiredCertificate()
Indicates if it is possible to sign with an expired certificate.void
setArchiveTimestampParameters(TP archiveTimestampParameters)
Set the parameters to produce the archive timestamp (Baseline-LTA)void
setBLevelParams(BLevelParameters bLevelParams)
Set the Baseline B parameters (signed properties)void
setContentTimestampParameters(TP contentTimestampParameters)
Set the parameters to produce the content timestamp (Baseline-B)void
setDigestAlgorithm(DigestAlgorithm digestAlgorithm)
Set the digest algorithmvoid
setEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm)
This setter should be used only when dealing with web services (or when signing in three steps).void
setGenerateTBSWithoutCertificate(boolean generateTBSWithoutCertificate)
Allows to change the default behaviour regarding the requirements of signing certificate to generate ToBeSigned data.void
setMaskGenerationFunction(MaskGenerationFunction maskGenerationFunction)
void
setReferenceDigestAlgorithm(DigestAlgorithm referenceDigestAlgorithm)
void
setSignatureLevel(SignatureLevel signatureLevel)
Set signature level.void
setSignaturePackaging(SignaturePackaging signaturePackaging)
Set Signature packagingvoid
setSignatureTimestampParameters(TP signatureTimestampParameters)
Set the parameters to produce the signature timestamp (Baseline-T)void
setSignWithExpiredCertificate(boolean signWithExpiredCertificate)
Allows to change the default behavior regarding the use of an expired certificate.String
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.model.SerializableSignatureParameters
getSigningCertificate
-
Field Details
-
contentTimestampParameters
The object representing the parameters related to the content timestamp (Baseline-B) -
signatureTimestampParameters
The object representing the parameters related to the signature timestamp (Baseline-T) -
archiveTimestampParameters
The object representing the parameters related to the archive timestamp (Baseline-LTA)
-
-
Constructor Details
-
AbstractSerializableSignatureParameters
public AbstractSerializableSignatureParameters()
-
-
Method Details
-
isSignWithExpiredCertificate
public boolean isSignWithExpiredCertificate()Indicates if it is possible to sign with an expired certificate. The default value is false.- Specified by:
isSignWithExpiredCertificate
in interfaceSerializableSignatureParameters
- Returns:
- true if signature with an expired certificate is allowed
-
setSignWithExpiredCertificate
public void setSignWithExpiredCertificate(boolean signWithExpiredCertificate)Allows to change the default behavior regarding the use of an expired certificate.- Parameters:
signWithExpiredCertificate
- true if signature with an expired certificate is allowed
-
isGenerateTBSWithoutCertificate
public boolean isGenerateTBSWithoutCertificate()Indicates if it is possible to generate ToBeSigned data without the signing certificate. The default values is false.- Specified by:
isGenerateTBSWithoutCertificate
in interfaceSerializableSignatureParameters
- Returns:
- true if signing certificate is not required when generating ToBeSigned data.
-
setGenerateTBSWithoutCertificate
public void setGenerateTBSWithoutCertificate(boolean generateTBSWithoutCertificate)Allows to change the default behaviour regarding the requirements of signing certificate to generate ToBeSigned data.- Parameters:
generateTBSWithoutCertificate
- true if it should be possible to generate ToBeSigned data without certificate.
-
getSignatureLevel
Get signature level: XAdES_BASELINE_T, CAdES_BASELINE_LTA...- Returns:
- the expected signature level
-
setSignatureLevel
Set signature level. This field cannot be null.- Parameters:
signatureLevel
- the expected signature level
-
getSignaturePackaging
Get Signature packaging- Returns:
- the expected signature packaging
-
setSignaturePackaging
Set Signature packaging- Parameters:
signaturePackaging
- the expected signature packaging
-
getDigestAlgorithm
Get the digest algorithm- Specified by:
getDigestAlgorithm
in interfaceSerializableSignatureParameters
- Returns:
- the digest algorithm
-
setDigestAlgorithm
Set the digest algorithm- Parameters:
digestAlgorithm
- the digest algorithm to set
-
setEncryptionAlgorithm
This setter should be used only when dealing with web services (or when signing in three steps). Usually the encryption algorithm is automatically extrapolated from the private key.- Parameters:
encryptionAlgorithm
- the encryption algorithm to use
-
setMaskGenerationFunction
-
getEncryptionAlgorithm
Get the encryption algorithm- Returns:
- the encryption algorithm.
-
getSignatureAlgorithm
Gets the signature algorithm.- Returns:
- the signature algorithm
-
getMaskGenerationFunction
Description copied from interface:SerializableSignatureParameters
Returns the mask generation function- Specified by:
getMaskGenerationFunction
in interfaceSerializableSignatureParameters
- Returns:
MaskGenerationFunction
-
getReferenceDigestAlgorithm
Get the digest algorithm for ds:Reference or message-digest attribute- Returns:
- the digest algorithm for ds:Reference or message-digest attribute
-
setReferenceDigestAlgorithm
-
bLevel
Get Baseline B parameters (signed properties)- Specified by:
bLevel
in interfaceSerializableSignatureParameters
- Returns:
- the Baseline B parameters
-
setBLevelParams
Set the Baseline B parameters (signed properties)- Parameters:
bLevelParams
- the baseline B properties
-
getContentTimestampParameters
Get the parameters for content timestamp (Baseline-B)- Returns:
- the parameters to produce a content timestamp
-
setContentTimestampParameters
Set the parameters to produce the content timestamp (Baseline-B)- Parameters:
contentTimestampParameters
- the parameters to produce the content timestamp
-
getSignatureTimestampParameters
Get the parameters for signature timestamp (Baseline-T)- Returns:
- the parameters to produce a signature timestamp
-
setSignatureTimestampParameters
Set the parameters to produce the signature timestamp (Baseline-T)- Parameters:
signatureTimestampParameters
- the parameters to produce the signature timestamp
-
getArchiveTimestampParameters
Get the parameters for achive timestamp (Baseline-LTA)- Returns:
- the parameters to produce an archive timestamp
-
setArchiveTimestampParameters
Set the parameters to produce the archive timestamp (Baseline-LTA)- Parameters:
archiveTimestampParameters
- the parameters to produce the archive timestamp
-
toString
-
hashCode
public int hashCode() -
equals
-