public class WriteProtection
extends java.lang.Object
| Constructor and Description |
|---|
WriteProtection(IWorkbookForShell workbook) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getReadOnlyRecommended()
Gets if the Read Only Recommended option is selected.
|
boolean |
getWriteReserved()
Gets whether this workbook is write protected.
|
java.lang.String |
getWriteReservedBy()
Gets the name of the user who currently has write permission for the workbook.
If you don't explicitly specify this property, the value will come from the IWorkbook.Author, and if the IWorkbook.Author is empty string or null, the value will be "GcExcel". |
void |
setReadOnlyRecommended(boolean value)
Sets if the Read Only Recommended option is selected.
|
void |
setWritePassword(java.lang.String value)
Sets the protected password to modify the file.
|
void |
setWriteReservedBy(java.lang.String value)
Sets the name of the user who currently has write permission for the workbook.
|
boolean |
validatePassword(java.lang.String password)
Returns true if the specified password is the same as the write-protection password the file was protected with.
|
public java.lang.String getWriteReservedBy()
public void setWriteReservedBy(java.lang.String value)
public boolean getReadOnlyRecommended()
public void setReadOnlyRecommended(boolean value)
public boolean getWriteReserved()
public void setWritePassword(java.lang.String value)
public boolean validatePassword(java.lang.String password)
password - The specified password..