Class ProtectionSettings

java.lang.Object
org.docx4j.openpackaging.packages.ProtectionSettings
Direct Known Subclasses:
ProtectDocument, ProtectPresentation, ProtectWorkbook

public abstract class ProtectionSettings extends Object
The Protection Settings which are common across docx, pptx, xlsx, namely mark as final, encrypt with password, and digital signature. Subclasses implement the docx and xlsx format specific features.
Since:
3.3.0
Author:
jharrop
  • Field Details

    • log

      protected static org.slf4j.Logger log
    • pkg

      protected OpcPackage pkg
  • Constructor Details

    • ProtectionSettings

      public ProtectionSettings(OpcPackage pkg)
  • Method Details

    • getMarkAsFinal

      public boolean getMarkAsFinal()
      Since:
      3.3.0
    • setMarkAsFinal

      public void setMarkAsFinal(boolean val)
      Since:
      3.3.0
    • setDocSecurity

      protected void setDocSecurity(int val)
      Note, this won't create the DocPropsExtendedPart (app.xml) if it doesn't exist
      Parameters:
      val -
    • getSignatureHelper

      public Object getSignatureHelper() throws Docx4JException
      get the SignatureHelper object, so you can sign the package using custom settings.
      Parameters:
      certificateIS -
      password -
      Returns:
      Throws:
      Docx4JException