SyncControl (record)

Controls the way that a (synchronous) wrapper works.

API

SyncControl.java
record SyncControl {
  SyncControl(boolean isSkipRules, boolean isSkipExecute, Can<CommandListener> commandListeners, ExceptionHandler exceptionHandler)
  SyncControl defaults()
  SyncControl withSkipRules()     (1)
  SyncControl withCheckRules()
  SyncControl withExecute()     (2)
  SyncControl withNoExecute()     (3)
  SyncControl listen(CommandListener commandListener)
  SyncControl withExceptionHandler(ExceptionHandler exceptionHandler)     (4)
  boolean isEquivalent(SyncControl other)     (5)
}
1 withSkipRules()

Skip checking business rules (hide/disable/validate) before executing the underlying property or action

2 withExecute()

Explicitly set the action to be executed.

3 withNoExecute()

Explicitly set the action to not be executed, in other words a 'dry run'.

4 withExceptionHandler(ExceptionHandler)

How to handle exceptions if they occur, using the provided ExceptionHandler .

5 isEquivalent(SyncControl)

Members

withSkipRules()

Skip checking business rules (hide/disable/validate) before executing the underlying property or action

withExecute()

Explicitly set the action to be executed.

withNoExecute()

Explicitly set the action to not be executed, in other words a 'dry run'.

withExceptionHandler(ExceptionHandler)

How to handle exceptions if they occur, using the provided ExceptionHandler .

The default behaviour is to rethrow the exception.

isEquivalent(SyncControl)