Class FieldMDPSelectiveComputation
java.lang.Object
br.ufsc.labsec.incrementalupdate.selective.FieldMDPSelectiveComputation
- All Implemented Interfaces:
SelectiveComputation
Verifica restrições FieldMDP em atualizações incrementais de campos do PDF.
A regra FieldMDP define quais campos devem permanecer protegidos após a assinatura que estabeleceu a restrição.
-
Nested Class Summary
Nested classes/interfaces inherited from interface SelectiveComputation
SelectiveComputation.Change, SelectiveComputation.Selectiveness -
Constructor Summary
ConstructorsConstructorDescriptionFieldMDPSelectiveComputation(org.apache.pdfbox.cos.COSBase reference, int signatureIndex, org.apache.pdfbox.pdmodel.PDDocument document, boolean icpBrRules, boolean protectVisualRepresentation) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallows(SelectiveComputation.Change change) org.apache.pdfbox.pdmodel.PDDocumentbyte[]floatintbooleanbooleanprotects(org.apache.pdfbox.cos.COSBase field) Indica se o campo informado está protegido pela regra FieldMDP.booleanbooleanselectiveness(SelectiveComputation.Selectiveness selectiveness) voidsetFieldBytes(byte[] fieldBytes) boolean
-
Constructor Details
-
FieldMDPSelectiveComputation
public FieldMDPSelectiveComputation(org.apache.pdfbox.cos.COSBase reference, int signatureIndex, org.apache.pdfbox.pdmodel.PDDocument document, boolean icpBrRules, boolean protectVisualRepresentation) throws IOException - Throws:
IOException
-
-
Method Details
-
getSignatureIndex
public int getSignatureIndex() -
getPDFVersion
public float getPDFVersion()- Specified by:
getPDFVersionin interfaceSelectiveComputation
-
allows
- Specified by:
allowsin interfaceSelectiveComputation
-
selectiveness
- Specified by:
selectivenessin interfaceSelectiveComputation
-
protects
public boolean protects(org.apache.pdfbox.cos.COSBase field) Indica se o campo informado está protegido pela regra FieldMDP.A decisão considera a ação FieldMDP declarada: All protege todos os campos; Include protege apenas os campos listados; Exclude protege todos, exceto os campos listados.
- Parameters:
field- campo de formulário a ser avaliado.- Returns:
- true se o campo estiver protegido pela regra FieldMDP; false caso contrário.
-
getDocument
public org.apache.pdfbox.pdmodel.PDDocument getDocument() -
useIcpBrRules
public boolean useIcpBrRules()- Specified by:
useIcpBrRulesin interfaceSelectiveComputation
-
protectVisualRepresentation
public boolean protectVisualRepresentation()- Specified by:
protectVisualRepresentationin interfaceSelectiveComputation
-
setFieldBytes
public void setFieldBytes(byte[] fieldBytes) -
getFieldBytes
public byte[] getFieldBytes() -
hasFieldBytes
public boolean hasFieldBytes()
-