Package io.keikai.axyra.sheets
Record Class SheetProtection
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.SheetProtection
public record SheetProtection(boolean selectLockedCells, boolean selectUnlockedCells, boolean formatCells, boolean formatColumns, boolean formatRows, boolean insertColumns, boolean insertRows, boolean insertHyperlinks, boolean deleteColumns, boolean deleteRows, boolean sort, boolean autoFilter, boolean pivotTables, boolean objects, boolean scenarios)
extends Record
Sheet protection options — the checkboxes of Excel's "Protect Sheet"
dialog. Every flag uses allow semantics:
true means users
may perform the action while the sheet is protected.
The on-disk ECMA-376 §18.3.1.85 <sheetProtection> attributes use
the inverse locked semantics (e.g. attribute formatCells="1" means
formatting is prevented); the engine performs the inversion.
defaults() mirrors Excel's dialog defaults: only selecting
locked and unlocked cells is allowed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent builder; every setter takestrue= allowed. -
Constructor Summary
ConstructorsConstructorDescriptionSheetProtection(boolean selectLockedCells, boolean selectUnlockedCells, boolean formatCells, boolean formatColumns, boolean formatRows, boolean insertColumns, boolean insertRows, boolean insertHyperlinks, boolean deleteColumns, boolean deleteRows, boolean sort, boolean autoFilter, boolean pivotTables, boolean objects, boolean scenarios) Creates an instance of aSheetProtectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theautoFilterrecord component.static SheetProtection.Builderbuilder()A builder starting fromdefaults().static SheetProtectiondefaults()Excel's Protect Sheet dialog defaults (only cell selection allowed).booleanReturns the value of thedeleteColumnsrecord component.booleanReturns the value of thedeleteRowsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theformatCellsrecord component.booleanReturns the value of theformatColumnsrecord component.booleanReturns the value of theformatRowsrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinsertColumnsrecord component.booleanReturns the value of theinsertHyperlinksrecord component.booleanReturns the value of theinsertRowsrecord component.booleanobjects()Returns the value of theobjectsrecord component.booleanReturns the value of thepivotTablesrecord component.booleanReturns the value of thescenariosrecord component.booleanReturns the value of theselectLockedCellsrecord component.booleanReturns the value of theselectUnlockedCellsrecord component.booleansort()Returns the value of thesortrecord component.A builder pre-loaded with this value, for read–modify–write round-trips.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SheetProtection
public SheetProtection(boolean selectLockedCells, boolean selectUnlockedCells, boolean formatCells, boolean formatColumns, boolean formatRows, boolean insertColumns, boolean insertRows, boolean insertHyperlinks, boolean deleteColumns, boolean deleteRows, boolean sort, boolean autoFilter, boolean pivotTables, boolean objects, boolean scenarios) Creates an instance of aSheetProtectionrecord class.- Parameters:
selectLockedCells- the value for theselectLockedCellsrecord componentselectUnlockedCells- the value for theselectUnlockedCellsrecord componentformatCells- the value for theformatCellsrecord componentformatColumns- the value for theformatColumnsrecord componentformatRows- the value for theformatRowsrecord componentinsertColumns- the value for theinsertColumnsrecord componentinsertRows- the value for theinsertRowsrecord componentinsertHyperlinks- the value for theinsertHyperlinksrecord componentdeleteColumns- the value for thedeleteColumnsrecord componentdeleteRows- the value for thedeleteRowsrecord componentsort- the value for thesortrecord componentautoFilter- the value for theautoFilterrecord componentpivotTables- the value for thepivotTablesrecord componentobjects- the value for theobjectsrecord componentscenarios- the value for thescenariosrecord component
-
-
Method Details
-
defaults
Excel's Protect Sheet dialog defaults (only cell selection allowed). -
builder
A builder starting fromdefaults(). -
toBuilder
A builder pre-loaded with this value, for read–modify–write round-trips. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
selectLockedCells
public boolean selectLockedCells()Returns the value of theselectLockedCellsrecord component.- Returns:
- the value of the
selectLockedCellsrecord component
-
selectUnlockedCells
public boolean selectUnlockedCells()Returns the value of theselectUnlockedCellsrecord component.- Returns:
- the value of the
selectUnlockedCellsrecord component
-
formatCells
public boolean formatCells()Returns the value of theformatCellsrecord component.- Returns:
- the value of the
formatCellsrecord component
-
formatColumns
public boolean formatColumns()Returns the value of theformatColumnsrecord component.- Returns:
- the value of the
formatColumnsrecord component
-
formatRows
public boolean formatRows()Returns the value of theformatRowsrecord component.- Returns:
- the value of the
formatRowsrecord component
-
insertColumns
public boolean insertColumns()Returns the value of theinsertColumnsrecord component.- Returns:
- the value of the
insertColumnsrecord component
-
insertRows
public boolean insertRows()Returns the value of theinsertRowsrecord component.- Returns:
- the value of the
insertRowsrecord component
-
insertHyperlinks
public boolean insertHyperlinks()Returns the value of theinsertHyperlinksrecord component.- Returns:
- the value of the
insertHyperlinksrecord component
-
deleteColumns
public boolean deleteColumns()Returns the value of thedeleteColumnsrecord component.- Returns:
- the value of the
deleteColumnsrecord component
-
deleteRows
public boolean deleteRows()Returns the value of thedeleteRowsrecord component.- Returns:
- the value of the
deleteRowsrecord component
-
sort
public boolean sort()Returns the value of thesortrecord component.- Returns:
- the value of the
sortrecord component
-
autoFilter
public boolean autoFilter()Returns the value of theautoFilterrecord component.- Returns:
- the value of the
autoFilterrecord component
-
pivotTables
public boolean pivotTables()Returns the value of thepivotTablesrecord component.- Returns:
- the value of the
pivotTablesrecord component
-
objects
public boolean objects()Returns the value of theobjectsrecord component.- Returns:
- the value of the
objectsrecord component
-
scenarios
public boolean scenarios()Returns the value of thescenariosrecord component.- Returns:
- the value of the
scenariosrecord component
-