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 Summary
FieldsModifier and TypeFieldDescriptionprotected final IncrementalUpdateAggregator<T> protected Set<org.apache.pdfbox.cos.COSObjectKey> static final booleanprotected final SelectiveComputation -
Constructor Summary
ConstructorsConstructorDescriptionIncrementalUpdateVisitor(IncrementalUpdateAggregator<T> aggregator, SelectiveComputation selectiveComputation) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanalreadyVisited(org.apache.pdfbox.cos.COSObject object) voidappendIdentifier(org.apache.pdfbox.cos.COSBase base) booleanexistsInPreviousVersions(org.apache.pdfbox.cos.COSBase obj) booleanexistsInPreviousVersions(org.apache.pdfbox.cos.COSObjectKey key) org.apache.pdfbox.cos.COSDocumentvoidifPresent(org.apache.pdfbox.cos.COSBase value) voidifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key) voidifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key, boolean inheritable) protected voidifPresentKeyValueNEntries(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName... keys) protected voidifPresentKeyValuePair(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key) voidifPresentNEntries(org.apache.pdfbox.cos.COSDictionary dictionary, boolean inheritable, org.apache.pdfbox.cos.COSName... keys) voidifPresentNEntries(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName... keys) protected voidmarkAsVisited(org.apache.pdfbox.cos.COSObject object) voidsetPreviousExistingFields(Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields) voidvisitFallback(org.apache.pdfbox.cos.COSDocument document) voidvisitFromArray(org.apache.pdfbox.cos.COSArray obj) voidvisitFromBoolean(org.apache.pdfbox.cos.COSBoolean obj) voidvisitFromDictionary(org.apache.pdfbox.cos.COSDictionary obj) voidvisitFromDocument(org.apache.pdfbox.cos.COSDocument obj) Computa o documento PDF, retornando os bytes do documento com as informaçõesvoidvisitFromDocumentFieldMDP(org.apache.pdfbox.cos.COSDocument document, SelectiveComputation.FieldMDP fieldMDP) voidvisitFromFloat(org.apache.pdfbox.cos.COSFloat obj) voidvisitFromInt(org.apache.pdfbox.cos.COSInteger obj) voidvisitFromName(org.apache.pdfbox.cos.COSName obj) voidvisitFromNull(org.apache.pdfbox.cos.COSNull obj) voidvisitFromObject(org.apache.pdfbox.cos.COSObject obj) voidvisitFromStream(org.apache.pdfbox.cos.COSStream obj) voidvisitFromString(org.apache.pdfbox.cos.COSString obj) protected voidwrite4bytesInteger(int integer) protected voidwriteKeyValuePair(org.apache.pdfbox.cos.COSName key, org.apache.pdfbox.cos.COSBase value) protected voidwriteName(org.apache.pdfbox.cos.COSName name)
-
Field Details
-
PROTECT_SIGNATURE_APPEARANCE
public static final boolean PROTECT_SIGNATURE_APPEARANCE- See Also:
-
aggregator
-
selectiveComputation
-
previousExistingFields
-
-
Constructor Details
-
IncrementalUpdateVisitor
public IncrementalUpdateVisitor(IncrementalUpdateAggregator<T> aggregator, SelectiveComputation selectiveComputation)
-
-
Method Details
-
visitFromDocument
Computa o documento PDF, retornando os bytes do documento com as informaçõesAppendix 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:
visitFromDocumentin interfaceorg.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
- Throws:
IOException
-
visitFromArray
- Specified by:
visitFromArrayin interfaceorg.apache.pdfbox.cos.ICOSVisitor- Throws:
IOException
-
visitFromBoolean
public void visitFromBoolean(org.apache.pdfbox.cos.COSBoolean obj) - Specified by:
visitFromBooleanin interfaceorg.apache.pdfbox.cos.ICOSVisitor
-
visitFromDictionary
- Specified by:
visitFromDictionaryin interfaceorg.apache.pdfbox.cos.ICOSVisitor- Throws:
IOException
-
visitFromFloat
public void visitFromFloat(org.apache.pdfbox.cos.COSFloat obj) - Specified by:
visitFromFloatin interfaceorg.apache.pdfbox.cos.ICOSVisitor
-
visitFromInt
public void visitFromInt(org.apache.pdfbox.cos.COSInteger obj) - Specified by:
visitFromIntin interfaceorg.apache.pdfbox.cos.ICOSVisitor
-
visitFromName
public void visitFromName(org.apache.pdfbox.cos.COSName obj) - Specified by:
visitFromNamein interfaceorg.apache.pdfbox.cos.ICOSVisitor
-
visitFromNull
public void visitFromNull(org.apache.pdfbox.cos.COSNull obj) - Specified by:
visitFromNullin interfaceorg.apache.pdfbox.cos.ICOSVisitor
-
visitFromStream
- Specified by:
visitFromStreamin interfaceorg.apache.pdfbox.cos.ICOSVisitor- Throws:
IOException
-
visitFromString
public void visitFromString(org.apache.pdfbox.cos.COSString obj) - Specified by:
visitFromStringin interfaceorg.apache.pdfbox.cos.ICOSVisitor
-
visitFromObject
- Specified by:
visitFromObjectin interfaceorg.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
- 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
-
getSelectiveComputation
-
getDocument
public org.apache.pdfbox.cos.COSDocument getDocument()
-