Package io.keikai.api
Class SheetProtection.Builder
- java.lang.Object
-
- io.keikai.api.SheetProtection.Builder
-
- Enclosing class:
- SheetProtection
public static final class SheetProtection.Builder extends Object
Builder is used to build instances of SheetProtection from values configured by the setters
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SheetProtectionbuild()Returns an instance of SheetProtection created from the fields set on this builder.static SheetProtection.Buildercreate()Creates the builder instance.SheetProtection.BuilderwithAutoFilterAllowed(boolean autoFilterAllowed)Sets true to allow user to set filters on the protected sheetSheetProtection.BuilderwithDeleteColumnsAllowed(boolean deleteColumnsAllowed)Sets true to allow user to delete columns on the protected sheet.SheetProtection.BuilderwithDeleteRowsAllowed(boolean deleteRowsAllowed)Sets true to allow user to delete rows on the protected sheet.SheetProtection.BuilderwithFormatCellsAllowed(boolean formatCellsAllowed)Sets true to allow user to format any cell on the protected sheet.SheetProtection.BuilderwithFormatColumnsAllowed(boolean formatColumnsAllowed)Sets true to allow user to format any columns on the protected sheet.SheetProtection.BuilderwithFormatRowsAllowed(boolean formatRowsAllowed)Sets true to allow user to format any rows on the protected sheet.SheetProtection.BuilderwithInsertColumnsAllowed(boolean insertColumnsAllowed)Sets true to allow user to insert columns on the protected sheet.SheetProtection.BuilderwithInsertHyperlinksAllowed(boolean insertHyperlinksAllowed)Sets true to allow user to insert hyperlinks on the protected sheet.SheetProtection.BuilderwithInsertRowsAllowed(boolean insertRowsAllowed)Sets true to allow user to insert rows on the protected sheet.SheetProtection.BuilderwithObjectsEditable(boolean objectsEditable)Sets the objectsEditable to true to protect objects.SheetProtection.BuilderwithPassword(String password)Sets the case-sensitive password for the sheet; null or empty string means protect the sheet without password.SheetProtection.BuilderwithPivotTablesAllowed(boolean pivotTablesAllowed)Sets true to allow user to use pivot table reports on the protected sheet.SheetProtection.BuilderwithScenariosEditable(boolean scenarios)Sets true to protect scenarios.SheetProtection.BuilderwithSelectLockedCellsAllowed(boolean selectLockedCellsAllowed)Sets true to allow select locked cells.SheetProtection.BuilderwithSelectUnlockedCellsAllowed(boolean selectUnlockedCellsAllowed)Sets true to allow select unlocked cellsSheetProtection.BuilderwithSortAllowed(boolean sortAllowed)Sets true to allow user to sort on the protected sheet.
-
-
-
Method Detail
-
create
public static SheetProtection.Builder create()
Creates the builder instance.- Returns:
-
withPassword
public SheetProtection.Builder withPassword(String password)
Sets the case-sensitive password for the sheet; null or empty string means protect the sheet without password.Default to null
- Parameters:
password-
-
withObjectsEditable
public SheetProtection.Builder withObjectsEditable(boolean objectsEditable)
Sets the objectsEditable to true to protect objects.Default to true
- Parameters:
objectsEditable-
-
withScenariosEditable
public SheetProtection.Builder withScenariosEditable(boolean scenarios)
Sets true to protect scenarios.Default to true
- Parameters:
scenarios-
-
withFormatCellsAllowed
public SheetProtection.Builder withFormatCellsAllowed(boolean formatCellsAllowed)
Sets true to allow user to format any cell on the protected sheet.Default to false
- Parameters:
formatCellsAllowed-
-
withFormatColumnsAllowed
public SheetProtection.Builder withFormatColumnsAllowed(boolean formatColumnsAllowed)
Sets true to allow user to format any columns on the protected sheet.Default to false
- Parameters:
formatColumnsAllowed-
-
withFormatRowsAllowed
public SheetProtection.Builder withFormatRowsAllowed(boolean formatRowsAllowed)
Sets true to allow user to format any rows on the protected sheet.Default to false
- Parameters:
formatRowsAllowed-
-
withInsertColumnsAllowed
public SheetProtection.Builder withInsertColumnsAllowed(boolean insertColumnsAllowed)
Sets true to allow user to insert columns on the protected sheet.Default to false
- Parameters:
insertColumnsAllowed-
-
withInsertRowsAllowed
public SheetProtection.Builder withInsertRowsAllowed(boolean insertRowsAllowed)
Sets true to allow user to insert rows on the protected sheet.Default to false
- Parameters:
insertRowsAllowed-
-
withInsertHyperlinksAllowed
public SheetProtection.Builder withInsertHyperlinksAllowed(boolean insertHyperlinksAllowed)
Sets true to allow user to insert hyperlinks on the protected sheet.Default to false
- Parameters:
insertHyperlinksAllowed-
-
withDeleteColumnsAllowed
public SheetProtection.Builder withDeleteColumnsAllowed(boolean deleteColumnsAllowed)
Sets true to allow user to delete columns on the protected sheet.Default to false
- Parameters:
deleteColumnsAllowed-
-
withDeleteRowsAllowed
public SheetProtection.Builder withDeleteRowsAllowed(boolean deleteRowsAllowed)
Sets true to allow user to delete rows on the protected sheet.Default to false
- Parameters:
deleteRowsAllowed-
-
withSortAllowed
public SheetProtection.Builder withSortAllowed(boolean sortAllowed)
Sets true to allow user to sort on the protected sheet.Default to false
- Parameters:
sortAllowed-
-
withAutoFilterAllowed
public SheetProtection.Builder withAutoFilterAllowed(boolean autoFilterAllowed)
Sets true to allow user to set filters on the protected sheetDefault to false
- Parameters:
autoFilterAllowed-
-
withPivotTablesAllowed
public SheetProtection.Builder withPivotTablesAllowed(boolean pivotTablesAllowed)
Sets true to allow user to use pivot table reports on the protected sheet.Default to false
- Parameters:
pivotTablesAllowed-
-
withSelectLockedCellsAllowed
public SheetProtection.Builder withSelectLockedCellsAllowed(boolean selectLockedCellsAllowed)
Sets true to allow select locked cells.Default to false
- Parameters:
selectLockedCellsAllowed-
-
withSelectUnlockedCellsAllowed
public SheetProtection.Builder withSelectUnlockedCellsAllowed(boolean selectUnlockedCellsAllowed)
Sets true to allow select unlocked cells- Parameters:
selectUnlockedCellsAllowed-
-
build
public SheetProtection build()
Returns an instance of SheetProtection created from the fields set on this builder.- Returns:
-
-