I - input type of the actionO - output type of the actionpublic interface CockpitAction<I,O>
| Modifier and Type | Method and Description |
|---|---|
default boolean |
canPerform(ActionContext<I> ctx)
Returns true if the action can be performed for the given context, false otherwise.
|
default String |
getConfirmationMessage(ActionContext<I> ctx)
Returns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed
(see
needsConfirmation(ActionContext)). |
default boolean |
needsConfirmation(ActionContext<I> ctx)
Returns true if the action should be confirmed by user before being performed, false otherwise.
|
ActionResult<O> |
perform(ActionContext<I> ctx)
Performs the action.
|
ActionResult<O> perform(ActionContext<I> ctx)
ctx - context containing the data and other informationdefault boolean canPerform(ActionContext<I> ctx)
ctx - context containing the data and other informationdefault boolean needsConfirmation(ActionContext<I> ctx)
ctx - context containing the data and other informationdefault String getConfirmationMessage(ActionContext<I> ctx)
needsConfirmation(ActionContext)).ctx - context containing the data and other informationneedsConfirmation(ActionContext)Copyright © 2018. All rights reserved.