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.Logger
log
protected OpcPackage
pkg
-
Constructor Summary
Constructors Constructor Description ProtectionSettings(OpcPackage pkg)
-
Method Summary
Modifier and Type Method Description boolean
getMarkAsFinal()
java.lang.Object
getSignatureHelper()
get the SignatureHelper object, so you can sign the package using custom settings.protected void
setDocSecurity(int val)
Note, this won't create the DocPropsExtendedPart (app.xml) if it doesn't existvoid
setMarkAsFinal(boolean val)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
log
protected static org.slf4j.Logger log -
pkg
-
-
Constructor Details
-
ProtectionSettings
-
-
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
-