Interface ICoreAction<T>

  • Type Parameters:
    T - the result type of the action execution
    All Superinterfaces:
    java.util.concurrent.Callable<T>
    All Known Implementing Classes:
    CoreAction, CustomJavaAction, InternalCoreAction, LoginAction, UserAction

    public interface ICoreAction<T>
    extends java.util.concurrent.Callable<T>
    An action that can be executed within an IContext. It can be executed and scheduled using various methods of Core. Doing so instead of calling it directly has multiple benefits, in particular registered action listeners are executed.

    Some behaviour of action execution, like using the action stack, is only implemented in CoreAction. This interface should therefore not be implemented directly. Its purpose is to reduce dependencies during testing.
    • Method Detail

      • getContext

        IContext getContext()
        Returns the context of the action.
        Returns:
        the context for executing the action
      • setContext

        void setContext​(IContext context)
        Sets the context for the action to execute in.
        Parameters:
        context - the context for executing the action
      • call

        T call()
        Invokes the action handler for this action.
        Specified by:
        call in interface java.util.concurrent.Callable<T>
        Returns:
        the execution result
      • getActionName

        java.lang.String getActionName()
        Returns the name of this action.
        Returns:
        the action name
      • getMetaInfo

        com.mendix.thirdparty.org.json.JSONObject getMetaInfo()
        Returns the meta-info of this action, containing additional details about the action.

        The contents will differ depending on the type of action.

        Returns:
        the meta-info
      • getEventObjects

        java.util.List<IMendixObject> getEventObjects()
        Returns the event objects of this action.
        Returns:
        the Mendix objects