The RowObjectRemover is an algorithm that removes a row. There is a derivative ExtendedRowObjectRemover that checks if a row can be removed or not. The RowObjectCreator is an algorithm that adds a row. There is a derivation ExtendedRowObjectCreator that checks if a row can be added or not.
Improvement
There should be no different interfaces; the RowObjectRemover should test if a row can be removed and return a ResKey if the result is negative. The same for the RowObjectCreator.
Code migration
Migrate implementations of ExtendedRowObjectCreator and ExtendedRowObjectRemover to RowObjectCreator and RowObjectRemover.
Instead of allowCreateNewRow(int, Object, Control) now allowCreateNewRow(int, TableData, Control) must be implemented. Instead of allowRemoveRow(int, Object, Control) now allowRemoveRow(int, TableData, Control) must be implemented.
Note that now the TableData is passed instead of the Row object. The row object can be fetched via tableData.getTableModel().getRowObject(row).
The return value is to be adapted according to the documentation: null if create or remove is allowed, a suitable ResKey if not.
Test
Used by #24540 in TestCompositeAttribute.script.xml.