Class IncrementalUpdateVisitor<T>

java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.pdf.incrementalupdate.IncrementalUpdateVisitor<T>
All Implemented Interfaces:
org.apache.pdfbox.cos.ICOSVisitor

public class IncrementalUpdateVisitor<T> extends Object implements org.apache.pdfbox.cos.ICOSVisitor
  • Field Details

    • PROTECT_SIGNATURE_APPEARANCE

      public static final boolean PROTECT_SIGNATURE_APPEARANCE
      See Also:
    • aggregator

      protected final IncrementalUpdateAggregator<T> aggregator
    • selectiveComputation

      protected final SelectiveComputation selectiveComputation
    • previousExistingFields

      protected Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields
  • Constructor Details

  • Method Details

    • visitFromDocument

      public void visitFromDocument(org.apache.pdfbox.cos.COSDocument obj) throws IOException
      Computa o documento PDF, retornando os bytes do documento com as informações

      Appendix 1: Computation of Object Digests

      Section 1.2.1: Document

      When calculating a digest for the document, the following items are included, in order:

          * A) The values of the following entries in the document catalog (see Table 3.25), if present: AA, Legal; and Perms
          * B) The values of the following entries in the document information dictionary (see Table 10.2), if present: Title, Author, Keywords, and Subject
          * C) All page objects in the document, in page order, as described in Section I.2.2, "Page Objects"
          * D) All named pages specified in the Pages name tree, sorted by name, as described in Section I.2.3, "Named Pages"
          * E) All embedded files specified in the EmbeddedFiles name tree, sorted by name, as described in Section I.2.4, "Embedded Files"
          * Exception 1: we include the AcroForm signature fields in the computation.
      
      Specified by:
      visitFromDocument in interface org.apache.pdfbox.cos.ICOSVisitor
      Parameters:
      obj - o documento PDF a ser computado
      Throws:
      IOException - se ocorrer algum erro de I/O durante a computação do documento
    • visitFromDocumentFieldMDP

      public void visitFromDocumentFieldMDP(org.apache.pdfbox.cos.COSDocument document, SelectiveComputation.FieldMDP fieldMDP) throws IOException
      Throws:
      IOException
    • visitFallback

      public void visitFallback(org.apache.pdfbox.cos.COSDocument document) throws IOException
      Throws:
      IOException
    • visitFromArray

      public void visitFromArray(org.apache.pdfbox.cos.COSArray obj) throws IOException
      Specified by:
      visitFromArray in interface org.apache.pdfbox.cos.ICOSVisitor
      Throws:
      IOException
    • visitFromBoolean

      public void visitFromBoolean(org.apache.pdfbox.cos.COSBoolean obj)
      Specified by:
      visitFromBoolean in interface org.apache.pdfbox.cos.ICOSVisitor
    • visitFromDictionary

      public void visitFromDictionary(org.apache.pdfbox.cos.COSDictionary obj) throws IOException
      Specified by:
      visitFromDictionary in interface org.apache.pdfbox.cos.ICOSVisitor
      Throws:
      IOException
    • visitFromFloat

      public void visitFromFloat(org.apache.pdfbox.cos.COSFloat obj)
      Specified by:
      visitFromFloat in interface org.apache.pdfbox.cos.ICOSVisitor
    • visitFromInt

      public void visitFromInt(org.apache.pdfbox.cos.COSInteger obj)
      Specified by:
      visitFromInt in interface org.apache.pdfbox.cos.ICOSVisitor
    • visitFromName

      public void visitFromName(org.apache.pdfbox.cos.COSName obj)
      Specified by:
      visitFromName in interface org.apache.pdfbox.cos.ICOSVisitor
    • visitFromNull

      public void visitFromNull(org.apache.pdfbox.cos.COSNull obj)
      Specified by:
      visitFromNull in interface org.apache.pdfbox.cos.ICOSVisitor
    • visitFromStream

      public void visitFromStream(org.apache.pdfbox.cos.COSStream obj) throws IOException
      Specified by:
      visitFromStream in interface org.apache.pdfbox.cos.ICOSVisitor
      Throws:
      IOException
    • visitFromString

      public void visitFromString(org.apache.pdfbox.cos.COSString obj)
      Specified by:
      visitFromString in interface org.apache.pdfbox.cos.ICOSVisitor
    • visitFromObject

      public void visitFromObject(org.apache.pdfbox.cos.COSObject obj) throws IOException
      Specified by:
      visitFromObject in interface org.apache.pdfbox.cos.ICOSVisitor
      Throws:
      IOException
    • writeName

      protected void writeName(org.apache.pdfbox.cos.COSName name)
    • appendIdentifier

      public void appendIdentifier(org.apache.pdfbox.cos.COSBase base)
    • write4bytesInteger

      protected void write4bytesInteger(int integer)
    • ifPresent

      public void ifPresent(org.apache.pdfbox.cos.COSBase value) throws IOException
      Throws:
      IOException
    • ifPresentNEntries

      public void ifPresentNEntries(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName... keys) throws IOException
      Throws:
      IOException
    • ifPresentNEntries

      public void ifPresentNEntries(org.apache.pdfbox.cos.COSDictionary dictionary, boolean inheritable, org.apache.pdfbox.cos.COSName... keys) throws IOException
      Throws:
      IOException
    • ifPresent

      public void ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key) throws IOException
      Throws:
      IOException
    • ifPresent

      public void ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key, boolean inheritable) throws IOException
      Throws:
      IOException
    • ifPresentKeyValuePair

      protected void ifPresentKeyValuePair(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key) throws IOException
      Throws:
      IOException
    • writeKeyValuePair

      protected void writeKeyValuePair(org.apache.pdfbox.cos.COSName key, org.apache.pdfbox.cos.COSBase value) throws IOException
      Throws:
      IOException
    • ifPresentKeyValueNEntries

      protected void ifPresentKeyValueNEntries(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName... keys) throws IOException
      Throws:
      IOException
    • alreadyVisited

      protected boolean alreadyVisited(org.apache.pdfbox.cos.COSObject object)
    • markAsVisited

      protected void markAsVisited(org.apache.pdfbox.cos.COSObject object)
    • setPreviousExistingFields

      public void setPreviousExistingFields(Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields)
    • existsInPreviousVersions

      public boolean existsInPreviousVersions(org.apache.pdfbox.cos.COSBase obj)
    • existsInPreviousVersions

      public boolean existsInPreviousVersions(org.apache.pdfbox.cos.COSObjectKey key)
    • getAggregator

      public IncrementalUpdateAggregator<T> getAggregator()
    • getSelectiveComputation

      public SelectiveComputation getSelectiveComputation()
    • getDocument

      public org.apache.pdfbox.cos.COSDocument getDocument()