Interface CoreActionHandler
public interface CoreActionHandler
Defines the interface for an action handler. This is an internal interface that is not to be used and may change any time.
-
Method Summary
Modifier and TypeMethodDescription<R> R
call
(InternalCoreAction<R> action) Executes the specified action.Returns a deep copy of this action handler.Returns the name of the action of this action handler.getClonedContext
(IMendixIdentifier currentIdentifier, List<IMendixIdentifier> constraint) Returns a copy of the context of this action handler with the specified identifier and context objects.Returns the context of this action handler.Returns the event objects for the action of this action handler.Returns the exception that was set for this action handler (if any).com.mendix.thirdparty.org.json.JSONObject
Returns the meta-info for the action of this action handler.getState()
Returns the state for the action of this action handler (if any).void
setActionName
(String actionName) Sets the name of the action of this action handler.void
setAllowsConcurrentExecution
(Boolean enabled) Sets whether the action of this action handler allows concurrent execution.void
setContext
(IContext context) Deprecated.since 9.24.void
setEventObjects
(List<IMendixObject> eventObjects) Sets the event objects for the action of this action handler.void
setException
(Exception exception) Sets the specified exception for this action handler.void
setMetaInfo
(com.mendix.thirdparty.org.json.JSONObject metaInfo) Sets the meta-info for the action of this action handler.void
setState
(ActionState state) Sets the state for the action of this action handler.
-
Method Details
-
setContext
Deprecated.since 9.24. There is no replacement.Sets the context for the action handler to execute in.- Parameters:
context
- the context for executing the action
-
getContext
IContext getContext()Returns the context of this action handler.- Returns:
- the context for executing the action
-
call
Executes the specified action.- Type Parameters:
R
- result type of the action, which should match the return value of the action- Parameters:
action
- the action to execute- Returns:
- the execution result
-
getEventObjects
List<IMendixObject> getEventObjects()Returns the event objects for the action of this action handler.- Returns:
- the Mendix objects
-
setEventObjects
Sets the event objects for the action of this action handler.- Parameters:
eventObjects
- the event objects to set
-
getMetaInfo
com.mendix.thirdparty.org.json.JSONObject getMetaInfo()Returns the meta-info for the action of this action handler.- Returns:
- the meta-info
-
setMetaInfo
void setMetaInfo(com.mendix.thirdparty.org.json.JSONObject metaInfo) Sets the meta-info for the action of this action handler.- Parameters:
metaInfo
- the meta-info to set
-
getActionName
String getActionName()Returns the name of the action of this action handler.- Returns:
- the action name
-
setActionName
Sets the name of the action of this action handler.- Parameters:
actionName
- the name to set
-
getException
Exception getException()Returns the exception that was set for this action handler (if any).- Returns:
- the exception if it was set; null otherwise
-
setException
Sets the specified exception for this action handler.- Parameters:
exception
- the exception to set
-
getState
ActionState getState()Returns the state for the action of this action handler (if any).- Returns:
- the action state if it was set; null otherwise
-
setState
Sets the state for the action of this action handler.- Parameters:
state
- the state to set
-
setAllowsConcurrentExecution
Sets whether the action of this action handler allows concurrent execution. If concurrent execution is not allowed,InternalCoreAction.handleConcurrentExecution()
will be called if the action is called concurrently with itself.- Parameters:
enabled
- true if concurrent execution is allowed; false otherwise
-
createClone
CoreActionHandler createClone()Returns a deep copy of this action handler. The return action handler will contain a copy of the action, with the same context.- Returns:
- the cloned action handler
-
getClonedContext
Returns a copy of the context of this action handler with the specified identifier and context objects.- Parameters:
currentIdentifier
- the identifier to set on the copied context; if null, the existing identifier is not overwrittenconstraint
- the context objects to set on the copied context; if null, the existing objects are not overwritten- Returns:
- the cloned context
-