WriteProtection

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

NameTypeAccessDescription
readOnlyRecommendedbooleanRead/WriteSpecifies whether the document author has recommended that the document be opened as read-only.
writeProtectedbooleanReadReturns true when a write protection password is set.

Methods

SignatureDescription
getReadOnlyRecommended() → booleanSpecifies 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) → booleanReturns true if the specified password is the same as the write-protection password the document was protected with.
isWriteProtected() → booleanReturns true when a write protection password is set.

See Also