Package io.keikai.api
Class SheetProtection.Builder
java.lang.Object
io.keikai.api.SheetProtection.Builder
- Enclosing class:
- SheetProtection
Builder is used to build instances of SheetProtection from values configured by the setters
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns an instance of SheetProtection created from the fields set on this builder.static SheetProtection.Buildercreate()Creates the builder instance.withAutoFilterAllowed(boolean autoFilterAllowed) Sets true to allow user to set filters on the protected sheetwithDeleteColumnsAllowed(boolean deleteColumnsAllowed) Sets true to allow user to delete columns on the protected sheet.withDeleteRowsAllowed(boolean deleteRowsAllowed) Sets true to allow user to delete rows on the protected sheet.withFormatCellsAllowed(boolean formatCellsAllowed) Sets true to allow user to format any cell on the protected sheet.withFormatColumnsAllowed(boolean formatColumnsAllowed) Sets true to allow user to format any columns on the protected sheet.withFormatRowsAllowed(boolean formatRowsAllowed) Sets true to allow user to format any rows on the protected sheet.withInsertColumnsAllowed(boolean insertColumnsAllowed) Sets true to allow user to insert columns on the protected sheet.withInsertHyperlinksAllowed(boolean insertHyperlinksAllowed) Sets true to allow user to insert hyperlinks on the protected sheet.withInsertRowsAllowed(boolean insertRowsAllowed) Sets true to allow user to insert rows on the protected sheet.withObjectsEditable(boolean objectsEditable) Sets the objectsEditable to true to protect objects.withPassword(String password) Sets the case-sensitive password for the sheet; null or empty string means protect the sheet without password.withPivotTablesAllowed(boolean pivotTablesAllowed) Sets true to allow user to use pivot table reports on the protected sheet.withScenariosEditable(boolean scenarios) Sets true to protect scenarios.withSelectLockedCellsAllowed(boolean selectLockedCellsAllowed) Sets true to allow select locked cells.withSelectUnlockedCellsAllowed(boolean selectUnlockedCellsAllowed) Sets true to allow select unlocked cellswithSortAllowed(boolean sortAllowed) Sets true to allow user to sort on the protected sheet.
-
Method Details
-
create
Creates the builder instance.- Returns:
-
withPassword
Sets the case-sensitive password for the sheet; null or empty string means protect the sheet without password.Default to null
- Parameters:
password-
-
withObjectsEditable
Sets the objectsEditable to true to protect objects.Default to true
- Parameters:
objectsEditable-
-
withScenariosEditable
Sets true to protect scenarios.Default to true
- Parameters:
scenarios-
-
withFormatCellsAllowed
Sets true to allow user to format any cell on the protected sheet.Default to false
- Parameters:
formatCellsAllowed-
-
withFormatColumnsAllowed
Sets true to allow user to format any columns on the protected sheet.Default to false
- Parameters:
formatColumnsAllowed-
-
withFormatRowsAllowed
Sets true to allow user to format any rows on the protected sheet.Default to false
- Parameters:
formatRowsAllowed-
-
withInsertColumnsAllowed
Sets true to allow user to insert columns on the protected sheet.Default to false
- Parameters:
insertColumnsAllowed-
-
withInsertRowsAllowed
Sets true to allow user to insert rows on the protected sheet.Default to false
- Parameters:
insertRowsAllowed-
-
withInsertHyperlinksAllowed
Sets true to allow user to insert hyperlinks on the protected sheet.Default to false
- Parameters:
insertHyperlinksAllowed-
-
withDeleteColumnsAllowed
Sets true to allow user to delete columns on the protected sheet.Default to false
- Parameters:
deleteColumnsAllowed-
-
withDeleteRowsAllowed
Sets true to allow user to delete rows on the protected sheet.Default to false
- Parameters:
deleteRowsAllowed-
-
withSortAllowed
Sets true to allow user to sort on the protected sheet.Default to false
- Parameters:
sortAllowed-
-
withAutoFilterAllowed
Sets true to allow user to set filters on the protected sheetDefault to false
- Parameters:
autoFilterAllowed-
-
withPivotTablesAllowed
Sets true to allow user to use pivot table reports on the protected sheet.Default to false
- Parameters:
pivotTablesAllowed-
-
withSelectLockedCellsAllowed
Sets true to allow select locked cells.Default to false
- Parameters:
selectLockedCellsAllowed-
-
withSelectUnlockedCellsAllowed
Sets true to allow select unlocked cells- Parameters:
selectUnlockedCellsAllowed-
-
build
Returns an instance of SheetProtection created from the fields set on this builder.- Returns:
-