Package com.hybris.cockpitng.actions
Interface CockpitAction<I,O>
-
- Type Parameters:
I- input type of the actionO- output type of the action
- All Known Implementing Classes:
AbstractStatefulAction,AbstractToggleAction,ActionStubExample,CloneAction,CreateAction,CreatePermissionAction,DeleteAction,DeletePermissionAction,DevToolbarAction,DragAndDropConfigAction,EditAction,FlexibleSidebarToggleAction,HelloWorldAction,ListViewExportCSVAction,LogoAction,MessageAction,PrincipalPermissionAction,RedeployAction,RefreshAction,ReloadLabelsAction,ResetEverythingAction,RunGCAction,SearchByTypeAction,SimpleAction,SplitLayoutChooserAction,ToggleAction,TypePermissionAction
public interface CockpitAction<I,O>Interface of all cockpit action classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancanPerform(ActionContext<I> ctx)Returns true if the action can be performed for the given context, false otherwise.default java.lang.StringgetConfirmationMessage(ActionContext<I> ctx)Returns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeneedsConfirmation(ActionContext)).default booleanneedsConfirmation(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.
-
-
-
Method Detail
-
perform
ActionResult<O> perform(ActionContext<I> ctx)
Performs the action.- Parameters:
ctx- context containing the data and other information- Returns:
- the action result
-
canPerform
default boolean canPerform(ActionContext<I> ctx)
Returns true if the action can be performed for the given context, false otherwise.- Parameters:
ctx- context containing the data and other information- Returns:
- true if the action can be performed for the given context, false otherwise
-
needsConfirmation
default boolean needsConfirmation(ActionContext<I> ctx)
Returns true if the action should be confirmed by user before being performed, false otherwise. This is evaluated by the action renderer.- Parameters:
ctx- context containing the data and other information- Returns:
- true if the action should be confirmed by user before being performed, false otherwise
-
getConfirmationMessage
default java.lang.String getConfirmationMessage(ActionContext<I> ctx)
Returns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeneedsConfirmation(ActionContext)).- Parameters:
ctx- context containing the data and other information- Returns:
- the confirmation message to be shown to the user in the confirmation dialog
- See Also:
needsConfirmation(ActionContext)
-
-