CommandExecutorService (interface)
Provides a mechanism to execute a Command .
API
interface CommandExecutorService {
Bookmark executeCommand(InteractionContextPolicy interactionContextPolicy, Command command) (1)
Bookmark executeCommand(InteractionContextPolicy interactionContextPolicy, CommandDto commandDto, CommandOutcomeHandler outcomeHandler) (2)
Bookmark executeCommand(Command command) (3)
Bookmark executeCommand(CommandDto commandDto, CommandOutcomeHandler outcomeHandler) (4)
}
1 | executeCommand(InteractionContextPolicy, Command)
Executes the specified Command using the required InteractionContextPolicy , updating the Command (or its persistent equivalent) afterwards (for example, setting its Command#getCommandDto() commandDto field. |
2 | executeCommand(InteractionContextPolicy, CommandDto, CommandOutcomeHandler)
Executes the specified command (represented as a CommandDto using the required InteractionContextPolicy . |
3 | executeCommand(Command)
As per #executeCommand(InteractionContextPolicy, Command) , with a policy of InteractionContextPolicy#NO_SWITCH no switch . |
4 | executeCommand(CommandDto, CommandOutcomeHandler)
As per #executeCommand(InteractionContextPolicy, CommandDto, CommandOutcomeHandler) , with a policy of InteractionContextPolicy#NO_SWITCH no switch . |
Members
executeCommand(InteractionContextPolicy, Command)
Executes the specified Command using the required InteractionContextPolicy , updating the Command (or its persistent equivalent) afterwards (for example, setting its Command#getCommandDto() commandDto field.
executeCommand(InteractionContextPolicy, CommandDto, CommandOutcomeHandler)
Executes the specified command (represented as a CommandDto using the required InteractionContextPolicy .
THIS METHOD HAS SIGNIFICANT SIDE-EFFECTS. Specifically, the Command of the executing thread (obtained using org.apache.isis.applib.services.iactn.InteractionProvider to obtain the Interaction , and then Interaction#getCommand() to obtain the Command ) will be UPDATED to hold the CommandDto passed in. |
Optionally an CommandOutcomeHandler can be provided to process the result. This is used by the persistent implementations to update their respective persistent equivalents of Command .