Package com.hybris.cockpitng.actions
Class SimpleAction
- java.lang.Object
-
- com.hybris.cockpitng.actions.SimpleAction
-
- All Implemented Interfaces:
CockpitAction<java.lang.String,java.lang.String>
public class SimpleAction extends java.lang.Object implements CockpitAction<java.lang.String,java.lang.String>
An action that shows the data bound to the action.
-
-
Constructor Summary
Constructors Constructor Description SimpleAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanPerform(ActionContext<java.lang.String> ctx)Returns true if the action can be performed for the given context, false otherwise.java.lang.StringgetConfirmationMessage(ActionContext<java.lang.String> ctx)Returns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).booleanneedsConfirmation(ActionContext<java.lang.String> ctx)Returns true if the action should be confirmed by user before being performed, false otherwise.ActionResult<java.lang.String>perform(ActionContext<java.lang.String> ctx)Performs the action.
-
-
-
Method Detail
-
perform
public ActionResult<java.lang.String> perform(ActionContext<java.lang.String> ctx)
Description copied from interface:CockpitActionPerforms the action.- Specified by:
performin interfaceCockpitAction<java.lang.String,java.lang.String>- Parameters:
ctx- context containing the data and other information- Returns:
- the action result
-
canPerform
public boolean canPerform(ActionContext<java.lang.String> ctx)
Description copied from interface:CockpitActionReturns true if the action can be performed for the given context, false otherwise.- Specified by:
canPerformin interfaceCockpitAction<java.lang.String,java.lang.String>- Parameters:
ctx- context containing the data and other information- Returns:
- true if the action can be performed for the given context, false otherwise
-
needsConfirmation
public boolean needsConfirmation(ActionContext<java.lang.String> ctx)
Description copied from interface:CockpitActionReturns true if the action should be confirmed by user before being performed, false otherwise. This is evaluated by the action renderer.- Specified by:
needsConfirmationin interfaceCockpitAction<java.lang.String,java.lang.String>- 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
public java.lang.String getConfirmationMessage(ActionContext<java.lang.String> ctx)
Description copied from interface:CockpitActionReturns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).- Specified by:
getConfirmationMessagein interfaceCockpitAction<java.lang.String,java.lang.String>- 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:
CockpitAction.needsConfirmation(ActionContext)
-
-