Class FieldMDPSelectiveComputation

java.lang.Object
br.ufsc.labsec.incrementalupdate.selective.FieldMDPSelectiveComputation
All Implemented Interfaces:
SelectiveComputation

public class FieldMDPSelectiveComputation extends Object implements 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.

  • 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:
      getPDFVersion in interface SelectiveComputation
    • allows

      public boolean allows(SelectiveComputation.Change change)
      Specified by:
      allows in interface SelectiveComputation
    • selectiveness

      public boolean selectiveness(SelectiveComputation.Selectiveness selectiveness)
      Specified by:
      selectiveness in interface SelectiveComputation
    • 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:
      useIcpBrRules in interface SelectiveComputation
    • protectVisualRepresentation

      public boolean protectVisualRepresentation()
      Specified by:
      protectVisualRepresentation in interface SelectiveComputation
    • setFieldBytes

      public void setFieldBytes(byte[] fieldBytes)
    • getFieldBytes

      public byte[] getFieldBytes()
    • hasFieldBytes

      public boolean hasFieldBytes()