Class 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 Detail

      • SimpleAction

        public SimpleAction()
    • Method Detail

      • perform

        public ActionResult<java.lang.String> perform​(ActionContext<java.lang.String> ctx)
        Description copied from interface: CockpitAction
        Performs the action.
        Specified by:
        perform in interface CockpitAction<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: CockpitAction
        Returns true if the action can be performed for the given context, false otherwise.
        Specified by:
        canPerform in interface CockpitAction<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: CockpitAction
        Returns true if the action should be confirmed by user before being performed, false otherwise. This is evaluated by the action renderer.
        Specified by:
        needsConfirmation in interface CockpitAction<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