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 Details

    • 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 sheet

      Default 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: