Class DefaultActionInvoker
- java.lang.Object
-
- org.pentaho.platform.scheduler2.action.DefaultActionInvoker
-
- All Implemented Interfaces:
org.pentaho.platform.api.action.IActionInvoker
public class DefaultActionInvoker extends Object implements org.pentaho.platform.api.action.IActionInvoker
A concrete implementation of theIActionInvoker
interface that invokes theIAction
locally.
-
-
Constructor Summary
Constructors Constructor Description DefaultActionInvoker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IBackgroundExecutionStreamProvider
getStreamProvider(Map<String,Serializable> params)
org.pentaho.platform.api.action.IActionInvokeStatus
invokeAction(org.pentaho.platform.api.action.IAction actionBean, String actionUser, Map<String,Serializable> params)
Invokes the providedIAction
as the providedactionUser
.protected org.pentaho.platform.api.action.IActionInvokeStatus
invokeActionImpl(org.pentaho.platform.api.action.IAction actionBean, String actionUser, Map<String,Serializable> params)
Invokes the providedIAction
as the providedactionUser
.boolean
isSupportedAction(org.pentaho.platform.api.action.IAction action)
void
validate(org.pentaho.platform.api.action.IAction actionBean, String actionUser, Map<String,Serializable> params)
Validates that the conditions required for theIAction
to be invoked are true, throwing anActionInvocationException
, if the conditions are not met.
-
-
-
Method Detail
-
getStreamProvider
protected IBackgroundExecutionStreamProvider getStreamProvider(Map<String,Serializable> params)
- Parameters:
params
- theMap
or parameters needed to invoke theIAction
- Returns:
- a
IBackgroundExecutionStreamProvider
represented in theparams
Map
-
validate
public void validate(org.pentaho.platform.api.action.IAction actionBean, String actionUser, Map<String,Serializable> params) throws org.pentaho.platform.api.action.ActionInvocationException
Validates that the conditions required for theIAction
to be invoked are true, throwing anActionInvocationException
, if the conditions are not met.- Parameters:
actionBean
- TheIAction
to be invokedactionUser
- The user invoking theIAction
params
- theMap
or parameters needed to invoke theIAction
- Throws:
org.pentaho.platform.api.action.ActionInvocationException
- when conditions needed to invoke theIAction
are not met
-
invokeAction
public org.pentaho.platform.api.action.IActionInvokeStatus invokeAction(org.pentaho.platform.api.action.IAction actionBean, String actionUser, Map<String,Serializable> params) throws Exception
Invokes the providedIAction
as the providedactionUser
.- Specified by:
invokeAction
in interfaceorg.pentaho.platform.api.action.IActionInvoker
- Parameters:
actionBean
- theIAction
being invokedactionUser
- The user invoking theIAction
params
- theMap
or parameters needed to invoke theIAction
- Returns:
- the
IActionInvokeStatus
object containing information about the action invocation - Throws:
Exception
- when theIAction
cannot be invoked for some reason.
-
invokeActionImpl
protected org.pentaho.platform.api.action.IActionInvokeStatus invokeActionImpl(org.pentaho.platform.api.action.IAction actionBean, String actionUser, Map<String,Serializable> params) throws Exception
Invokes the providedIAction
as the providedactionUser
.- Parameters:
actionBean
- theIAction
being invokedactionUser
- The user invoking theIAction
params
- theMap
or parameters needed to invoke theIAction
- Returns:
- the
IActionInvokeStatus
object containing information about the action invocation - Throws:
Exception
- when theIAction
cannot be invoked for some reason.
-
isSupportedAction
public boolean isSupportedAction(org.pentaho.platform.api.action.IAction action)
- Specified by:
isSupportedAction
in interfaceorg.pentaho.platform.api.action.IActionInvoker
-
-