Interface CockpitAction<I,​O>

    • 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 (see needsConfirmation(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)