DecoratorCollection

Runtime CRUD API for managing Decorator instances on document fields, rows, and columns.

All operations accept a path string that identifies the target:

  • "pageId/fieldPositionId" — field decorators

  • "pageId/fieldPositionId/rowId" — row decorators (schema-level)

  • "pageId/fieldPositionId/rowId/columnId" — column/cell decorators

Invalid inputs are reported through the editor's ErrorHandler rather than throwing exceptions.

Functions

Link copied to clipboard
abstract fun add(path: String, decorator: Decorator)

Appends a new decorator to the target identified by path.

Link copied to clipboard
abstract fun list(path: String): List<Decorator>

Returns all decorators currently attached to the target identified by path.

Link copied to clipboard
abstract fun remove(path: String, action: String)

Removes the decorator identified by the given action value from the target.

Link copied to clipboard
abstract fun update(path: String, action: String, decorator: Decorator)

Finds the existing decorator on the target by its action value and merges the provided properties into it. Only non-null properties in decorator overwrite existing values.