Package eu.europa.esig.dss.signature
Class AbstractSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>
java.lang.Object
eu.europa.esig.dss.signature.AbstractSignatureService<SP,TP>
- All Implemented Interfaces:
DocumentSignatureService<SP,TP>
,Serializable
- Direct Known Subclasses:
AbstractASiCSignatureService
,CAdESService
,PAdESService
,XAdESService
public abstract class AbstractSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters> extends Object implements DocumentSignatureService<SP,TP>
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected CertificateVerifier
certificateVerifier
protected TSPSource
tspSource
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSignatureService(CertificateVerifier certificateVerifier)
To construct a signature service theCertificateVerifier
must be set and cannot be null. -
Method Summary
Modifier and Type Method Description protected void
assertSigningDateInCertificateValidityRange(SP parameters)
This method raises an exception if the signing rules forbid the use on an expired certificate.protected String
getFinalArchiveName(DSSDocument originalFile, SigningOperation operation, SignatureLevel level, MimeType containerMimeType)
protected String
getFinalFileName(DSSDocument originalFile, SigningOperation operation, SignatureLevel level)
void
setTspSource(TSPSource tspSource)
This setter allows to define the TSP (timestamp provider) source.DSSDocument
timestamp(DSSDocument toTimestampDocument, TP parameters)
This method allows to add a timestamp to an unsigned documentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.signature.DocumentSignatureService
extendDocument, getContentTimestamp, getDataToSign, signDocument
-
Field Details
-
Constructor Details
-
AbstractSignatureService
To construct a signature service theCertificateVerifier
must be set and cannot be null.- Parameters:
certificateVerifier
-CertificateVerifier
provides information on the sources to be used in the validation process in the context of a signature.
-
-
Method Details
-
setTspSource
Description copied from interface:DocumentSignatureService
This setter allows to define the TSP (timestamp provider) source.- Specified by:
setTspSource
in interfaceDocumentSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>
- Parameters:
tspSource
- The time stamp source which is used when timestamping the signature.
-
assertSigningDateInCertificateValidityRange
This method raises an exception if the signing rules forbid the use on an expired certificate.- Parameters:
parameters
- set of driving signing parameters
-
getFinalArchiveName
protected String getFinalArchiveName(DSSDocument originalFile, SigningOperation operation, SignatureLevel level, MimeType containerMimeType) -
getFinalFileName
protected String getFinalFileName(DSSDocument originalFile, SigningOperation operation, SignatureLevel level) -
timestamp
Description copied from interface:DocumentSignatureService
This method allows to add a timestamp to an unsigned document- Specified by:
timestamp
in interfaceDocumentSignatureService<SP extends SerializableSignatureParameters,TP extends SerializableTimestampParameters>
- Parameters:
toTimestampDocument
- the document to be timestampedparameters
- set of the driving timestamping parameters- Returns:
- the timestamped document
-