Class JoinOperationBase
java.lang.Object
ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
ro.sync.ecss.extensions.commons.table.operations.JoinOperationBase
- All Implemented Interfaces:
AuthorOperation
,Extension
- Direct Known Subclasses:
JoinOperation
,JoinOperation
,JoinOperation
@API(type=INTERNAL,
src=PUBLIC)
public abstract class JoinOperationBase
extends AbstractTableOperation
Operation for joining the content of selected cells.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Cursor outlide the table error messagestatic final String
Rectangular selection error messagestatic final String
Select at least two adjacent cellsFields 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 void
doOperationInternal
(AuthorAccess authorAccess, ArgumentsMap args) Join the contents of selected cells.protected abstract void
generateColumnSpecifications
(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement tableElement) Generates column specifications for the given table and inserts them into the document.void
joinCells
(AuthorAccess authorAccess, AuthorElement tableElement, List<AuthorElement> cellElements) Join table cells.Methods inherited from class ro.sync.ecss.extensions.commons.table.operations.AbstractTableOperation
createEmptyCell, doOperation, findCellInsertionOffset, getElementAncestor, isElement, isTableElement
-
Field Details
-
CURSOR_OUTSIDE_THE_TABLE_ERROR_MESSAGE
Cursor outlide the table error message- See Also:
-
SELECT_AT_LEAST_TWO_ADJACENT_CELLS_ERROR_MESSAGE
Select at least two adjacent cells- See Also:
-
RECTANGULAR_SELECTIONS_ERROR_MESSAGE
Rectangular selection error message- See Also:
-
-
Constructor Details
-
JoinOperationBase
Constructor.- Parameters:
tableHelper
- Table helper with methods specific to a document type.
-
-
Method Details
-
doOperationInternal
protected void doOperationInternal(AuthorAccess authorAccess, ArgumentsMap args) throws IllegalArgumentException, AuthorOperationException Join the contents of selected cells.- 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:
IllegalArgumentException
- Thrown when one or more arguments are illegal.AuthorOperationException
- Thrown when the operation fails.- See Also:
-
joinCells
public void joinCells(AuthorAccess authorAccess, AuthorElement tableElement, List<AuthorElement> cellElements) throws AuthorOperationException, BadLocationException Join table cells.- Parameters:
authorAccess
- The author access.tableElement
- The table element.cellElements
- The cells fragments.- Throws:
AuthorOperationException
BadLocationException
-
getDescription
- Returns:
- The description of the extension.
- See Also:
-
getArguments
- Returns:
- An array of
ArgumentDescriptor
representing the arguments this operation uses. - See Also:
-
generateColumnSpecifications
protected abstract void generateColumnSpecifications(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement tableElement) throws AuthorOperationException Generates column specifications for the given table and inserts them into the document.- Parameters:
authorAccess
- Author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.tableCellSpanProvider
- Table cell span provider.tableElement
- The table element.- Throws:
AuthorOperationException
- Failed to insert the column specifications into the table.
-