WriteProtection
Overview
WriteProtection is a class in Aspose.Words FOSS for Java.
Inherits from: Cloneable.
Specifies write protection settings for a document.
Edition status of its 7 listed members (a property and its accessor methods are listed separately, overloads once): 7 not yet exercised by a verified example.
This class declares 5 methods for WriteProtection objects in Java programs.
Available methods include: getReadOnlyRecommended, isWriteProtected, setPassword, setReadOnlyRecommended, validatePassword.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: readOnlyRecommended, writeProtected.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
readOnlyRecommended | boolean | Read/Write | Specifies whether the document author has recommended that the document be opened as read-only. |
writeProtected | boolean | Read | Returns true when a write protection password is set. |
Methods
| Signature | Description |
|---|---|
getReadOnlyRecommended() → boolean | Specifies whether the document author has recommended that the document be opened as read-only. |
setReadOnlyRecommended(value: boolean) | Sets the read only recommended value. |
setPassword(password: String) | Sets the write protection password for the document. |
validatePassword(password: String) → boolean | Returns true if the specified password is the same as the write-protection password the document was protected with. |
isWriteProtected() → boolean | Returns true when a write protection password is set. |