Interface TransactionManager


@OpenApi public interface TransactionManager
Provides access to transaction lifecycle events and allows reacting to model changes.

TransactionManager is used to register TransactionListeners that are invoked during write transactions. Listeners can observe changes, perform validation, or modify the model using nested transactions.

Listeners may be filtered by OperationKind to react only to specific types of operations.

  • Method Details

    • addListener

      @OpenApi void addListener(TransactionListener listener, OperationKind... kind)
      Registers a transaction listener.

      If operation kinds are specified, the listener is invoked only for those kinds. Otherwise, it is invoked for OperationKind.OTHER transactions.

      Parameters:
      listener - listener to add
      kind - operation kinds to listen to
    • removeListener

      @OpenApi void removeListener(TransactionListener listener)
      Unregisters a transaction listener.
      Parameters:
      listener - listener to remove