Class PAdESService
java.lang.Object
eu.europa.esig.dss.signature.AbstractSignatureService<PAdESSignatureParameters>
eu.europa.esig.dss.pades.signature.PAdESService
- All Implemented Interfaces:
eu.europa.esig.dss.signature.DocumentSignatureService<PAdESSignatureParameters>,Serializable
public class PAdESService extends eu.europa.esig.dss.signature.AbstractSignatureService<PAdESSignatureParameters>
PAdES implementation of the DocumentSignatureService
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PAdESService(eu.europa.esig.dss.validation.CertificateVerifier certificateVerifier)This is the constructor to create an instance of thePAdESService. -
Method Summary
Modifier and Type Method Description eu.europa.esig.dss.model.DSSDocumentaddNewSignatureField(eu.europa.esig.dss.model.DSSDocument document, SignatureFieldParameters parameters)This method allows to add a new signature field to an existing pdf documentprotected byte[]computeDocumentDigest(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters)eu.europa.esig.dss.model.DSSDocumentextendDocument(eu.europa.esig.dss.model.DSSDocument original, PAdESSignatureParameters parameters)protected byte[]generateCMSSignedData(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue)List<String>getAvailableSignatureFields(eu.europa.esig.dss.model.DSSDocument document)This method returns not signed signature-fieldseu.europa.esig.dss.validation.timestamp.TimestampTokengetContentTimestamp(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters)eu.europa.esig.dss.model.ToBeSignedgetDataToSign(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters)eu.europa.esig.dss.model.DSSDocumentsignDocument(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue)
-
Constructor Details
-
PAdESService
public PAdESService(eu.europa.esig.dss.validation.CertificateVerifier certificateVerifier)This is the constructor to create an instance of thePAdESService. A certificate verifier must be provided.- Parameters:
certificateVerifier-CertificateVerifierprovides information on the sources to be used in the validation process in the context of a signature.
-
-
Method Details
-
getContentTimestamp
public eu.europa.esig.dss.validation.timestamp.TimestampToken getContentTimestamp(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters) -
getDataToSign
public eu.europa.esig.dss.model.ToBeSigned getDataToSign(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters) throws eu.europa.esig.dss.model.DSSException- Throws:
eu.europa.esig.dss.model.DSSException
-
computeDocumentDigest
protected byte[] computeDocumentDigest(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters) -
signDocument
public eu.europa.esig.dss.model.DSSDocument signDocument(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) throws eu.europa.esig.dss.model.DSSException- Throws:
eu.europa.esig.dss.model.DSSException
-
generateCMSSignedData
protected byte[] generateCMSSignedData(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue) -
extendDocument
public eu.europa.esig.dss.model.DSSDocument extendDocument(eu.europa.esig.dss.model.DSSDocument original, PAdESSignatureParameters parameters) throws eu.europa.esig.dss.model.DSSException- Throws:
eu.europa.esig.dss.model.DSSException
-
getAvailableSignatureFields
This method returns not signed signature-fields- Parameters:
document- the pdf document- Returns:
- the list of empty signature fields
-
addNewSignatureField
public eu.europa.esig.dss.model.DSSDocument addNewSignatureField(eu.europa.esig.dss.model.DSSDocument document, SignatureFieldParameters parameters)This method allows to add a new signature field to an existing pdf document- Parameters:
document- the pdf documentparameters- the parameters with the coordinates,... of the signature field- Returns:
- the pdf document with the new added signature field
-