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

    Fields inherited from class eu.europa.esig.dss.signature.AbstractSignatureService

    certificateVerifier, tspSource
  • Constructor Summary

    Constructors 
    Constructor Description
    PAdESService​(eu.europa.esig.dss.validation.CertificateVerifier certificateVerifier)
    This is the constructor to create an instance of the PAdESService.
  • Method Summary

    Modifier and Type Method Description
    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
    protected byte[] computeDocumentDigest​(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters)  
    eu.europa.esig.dss.model.DSSDocument extendDocument​(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-fields
    eu.europa.esig.dss.validation.timestamp.TimestampToken getContentTimestamp​(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters)  
    eu.europa.esig.dss.model.ToBeSigned getDataToSign​(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters)  
    eu.europa.esig.dss.model.DSSDocument signDocument​(eu.europa.esig.dss.model.DSSDocument toSignDocument, PAdESSignatureParameters parameters, eu.europa.esig.dss.model.SignatureValue signatureValue)  

    Methods inherited from class eu.europa.esig.dss.signature.AbstractSignatureService

    assertSigningDateInCertificateValidityRange, getFinalFileName, getFinalFileName, setTspSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PAdESService

      public PAdESService​(eu.europa.esig.dss.validation.CertificateVerifier certificateVerifier)
      This is the constructor to create an instance of the PAdESService. A certificate verifier must be provided.
      Parameters:
      certificateVerifier - CertificateVerifier provides 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

      public List<String> getAvailableSignatureFields​(eu.europa.esig.dss.model.DSSDocument document)
      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 document
      parameters - the parameters with the coordinates,... of the signature field
      Returns:
      the pdf document with the new added signature field