Class ProtectionSettings
java.lang.Object
org.docx4j.openpackaging.packages.ProtectionSettings
- Direct Known Subclasses:
ProtectDocument,ProtectPresentation,ProtectWorkbook
public abstract class ProtectionSettings
extends java.lang.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 Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlogprotected OpcPackagepkg -
Constructor Summary
Constructors Constructor Description ProtectionSettings(OpcPackage pkg) -
Method Summary
Modifier and Type Method Description booleangetMarkAsFinal()java.lang.ObjectgetSignatureHelper()get the SignatureHelper object, so you can sign the package using custom settings.protected voidsetDocSecurity(int val)Note, this won't create the DocPropsExtendedPart (app.xml) if it doesn't existvoidsetMarkAsFinal(boolean val)
-
Field Details
-
Constructor Details
-
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
get the SignatureHelper object, so you can sign the package using custom settings.- Parameters:
certificateIS-password-- Returns:
- Throws:
Docx4JException
-