Class EventActionInfo<T>

java.lang.Object
com.mendix.core.actionmanagement.EventActionInfo<T>

public class EventActionInfo<T> extends Object
Represents an event action.
  • Field Details

    • actionName

      public final String actionName
    • raiseExceptionOnFalse

      public final boolean raiseExceptionOnFalse
  • Constructor Details

    • EventActionInfo

      public EventActionInfo(String classOrActionName, boolean raiseExceptionOnFalse)
      Creates an event action with the specified name.
      Parameters:
      classOrActionName - the name of the custom Java action or microflow
      raiseExceptionOnFalse - whether to throw an exception if the action returns false
    • EventActionInfo

      public EventActionInfo(Consumer<T> consumer, Class<T> returnType)
      Creates an event action with the specified Java action. The action will not raise an exception when its result is false.
      Parameters:
      consumer - the Java function to execute
      returnType - the Java type of the result value
    • EventActionInfo

      public EventActionInfo(Consumer<T> consumer, Class<T> returnType, boolean raiseExceptionOnFalse)
      Creates an event action with the specified Java action.
      Parameters:
      consumer - the Java function to execute
      returnType - the Java type of the result value
      raiseExceptionOnFalse - whether to throw an exception if the action returns false
    • EventActionInfo

      public EventActionInfo(Consumer<IMendixObject> consumer)
      Creates an event action with the specified Java function. The action will not raise an exception when its result is false.
      Parameters:
      consumer - the Java function to execute
    • EventActionInfo

      public EventActionInfo(Consumer<IMendixObject> consumer, boolean raiseExceptionOnFalse)
      Creates an event action with the specified Java function.
      Parameters:
      consumer - the Java function to execute
      raiseExceptionOnFalse - whether to throw an exception if the action returns false
  • Method Details

    • representsFunction

      public Boolean representsFunction()
      Returns whether the event action is a Java function or not.
      Returns:
      true if the action is a function; false otherwise
    • function

      public Consumer<IMendixObject> function()
      Returns the Java function for this event action.
      Returns:
      the function if defined; null otherwise
    • getReturnType

      public Class<T> getReturnType()
      Returns the Java type of the result value.
      Returns:
      the Java type of the result value