Class DeleteRowOperationBase
java.lang.Object
ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
ro.sync.ecss.extensions.commons.table.operations.DeleteRowOperationBase
- All Implemented Interfaces:
AuthorOperation
,Extension
- Direct Known Subclasses:
DeleteRowOperation
,DeleteRowOperation
,DeleteRowOperation
,DeleteRowOperation
,DeleteRowOperation
,DeleteRowOperation
@API(type=INTERNAL,
src=PUBLIC)
public abstract class DeleteRowOperationBase
extends AbstractTableOperation
Operation used to delete table rows. If there is a selection in the table all the rows that intersect
that selection are removed. If there is no selection in the table, the row at caret is deleted.
-
Field Summary
Fields inherited from class ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
CHANGE_TRACKING_BEHAVIOR_ARGUMENT, TABLE_INFO_ARGUMENT_DESCRIPTOR, TABLE_INFO_ARGUMENT_NAME, tableHelper
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract SplitCellAboveBelowOperationBase
Create the split cell operation.final void
doOperationInternal
(AuthorAccess authorAccess, ArgumentsMap args) Delete the table rows.No arguments for this operation.boolean
performDeleteRows
(AuthorAccess authorAccess, int startRowOffset, int endRowOffset) Delete table rows.boolean
performDeleteRows
(AuthorAccess authorAccess, List<ContentInterval> contentIntervals) Delete table rows.Methods inherited from class ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
createEmptyCell, doOperation, findCellInsertionOffset, getElementAncestor, isElement, isTableElement
-
Constructor Details
-
DeleteRowOperationBase
Constructor.- Parameters:
documentTypeHelper
- The table helper specific to a document type. An implementation ofAuthorTableHelper
.
-
-
Method Details
-
performDeleteRows
public boolean performDeleteRows(AuthorAccess authorAccess, List<ContentInterval> contentIntervals) throws AuthorOperationException Delete table rows. The rows that must be deleted are determined in the following order:- by the list of content intervals if not
null
- all the rows that intersect the selection
- the row at caret offset
- Parameters:
authorAccess
- The access to Author operations.contentIntervals
- The content intervals that intersects the rows that must be deleted. Each interval contains two integers, one for start interval offset and one for end interval offset.- Returns:
true
if the rows are deleted.- Throws:
AuthorOperationException
- by the list of content intervals if not
-
performDeleteRows
public boolean performDeleteRows(AuthorAccess authorAccess, int startRowOffset, int endRowOffset) throws AuthorOperationException Delete table rows. The row that must be deleted is determined in the following order:- by startRowOffset and endRowOffset if both are bigger than
0
- all the rows that intersect the selection
- the row at caret offset
- Parameters:
authorAccess
- The access to Author operations.startRowOffset
- The start row offset.endRowOffset
- The end row offset.- Returns:
true
if at least one row is deleted.- Throws:
IllegalArgumentException
AuthorOperationException
- by startRowOffset and endRowOffset if both are bigger than
-
doOperationInternal
public final void doOperationInternal(AuthorAccess authorAccess, ArgumentsMap args) throws AuthorOperationException Delete the table rows. For this operation the caret must be inside a table cell.- Specified by:
doOperationInternal
in classAbstractTableOperation
- Parameters:
authorAccess
- The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.args
- The map of arguments. All the arguments defined by methodAuthorOperation.getArguments()
must be present in the map of arguments.- Throws:
AuthorOperationException
- Thrown when the operation fails.- See Also:
-
getArguments
No arguments for this operation.- Returns:
- An array of
ArgumentDescriptor
representing the arguments this operation uses. - See Also:
-
getDescription
- Returns:
- The description of the extension.
- See Also:
-
createSplitCellOperation
Create the split cell operation. The operation is needed to split the cells that span over multiple rows and start on the row to be deleted.- Returns:
- The split cell operation.
-