Class ProcessEnabledActionHandler
java.lang.Object
com.aquima.interactions.portal.model.process.wrapper.ProcessEnabledActionHandler
- All Implemented Interfaces:
IActionHandler
An action handler wrapper which provides information about the intended session in which it should be executed.
- Since:
- 9.9
- Author:
- Petru Galanton
-
Constructor Summary
ConstructorDescriptionProcessEnabledActionHandler
(IActionHandler delegate, boolean forTaskSession) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcessEnabledActionHandler
forMainSession
(IActionHandler handler) Returns a wrapper for the given action handler, which executes in the main session of a ProcessEnabledSession, even if an AQ_ExecuteTask service call is currently executing in the main session.static ProcessEnabledActionHandler
forTaskSession
(IActionHandler handler) Returns a wrapper for the given handler which executes in the task session of a ProcessEnabledSession, if an AQ_ExecuteTask service call is currently executing in the main session.handle
(IActionContext context) This method will be called from the portal session to handle an action request from the client.boolean
Indicates whether this action handler should execute in the main session or in the sub-session created for a started task.boolean
This method indicates if the action handler does not modify any profile data.
-
Constructor Details
-
ProcessEnabledActionHandler
Creates a new instance.- Parameters:
delegate
- the wrapped action handlerforTaskSession
- indicates whether this action handler should execute in the main ProcessEnabledSession or in the sub-session of the task (when available)
-
-
Method Details
-
isReadOnly
public boolean isReadOnly()Description copied from interface:IActionHandler
This method indicates if the action handler does not modify any profile data.- Specified by:
isReadOnly
in interfaceIActionHandler
- Returns:
- boolean indicating if the handler does not modify any profile data.
-
handle
Description copied from interface:IActionHandler
This method will be called from the portal session to handle an action request from the client. The method returns an Action result object which can be used by the client to act upon this result.- Specified by:
handle
in interfaceIActionHandler
- Parameters:
context
- The portal context of the current session.- Returns:
- The result of the handle method, may be null.
- Throws:
Exception
- When an unexpected exception occurs.
-
isForTaskSession
public boolean isForTaskSession()Indicates whether this action handler should execute in the main session or in the sub-session created for a started task.- Returns:
- true if the action handler should execute in the task session, false if the action handler should execute in the main session
-
forMainSession
Returns a wrapper for the given action handler, which executes in the main session of a ProcessEnabledSession, even if an AQ_ExecuteTask service call is currently executing in the main session.- Parameters:
handler
- the handler to be executed- Returns:
- the handler wrapper
-
forTaskSession
Returns a wrapper for the given handler which executes in the task session of a ProcessEnabledSession, if an AQ_ExecuteTask service call is currently executing in the main session. If an AQ_ExecuteTask service call is currently not executing, the handler will not be executed.- Parameters:
handler
- the handler to be executed- Returns:
- the handler wrapper
-