com.itmusings.stm.action.scriptsupport
Class ScriptAction<T>

java.lang.Object
  extended by com.itmusings.stm.impl.STMActionBase<T>
      extended by com.itmusings.stm.action.scriptsupport.BaseCustomComponentPropertiesAction<T>
          extended by com.itmusings.stm.action.scriptsupport.BaseScriptingAction<T>
              extended by com.itmusings.stm.action.scriptsupport.ScriptAction<T>
All Implemented Interfaces:
ComponentPropertiesAware, ScriptingStrategyAware, STMAction<T>

public class ScriptAction<T>
extends BaseScriptingAction<T>

Mimics a script. The value of the last line of the script is returned as the event from this action. It uses the current scripting strategy for the evaluation. The code custom attribute is supported. Ex: <script code="(a == 100)? 'go ahead' : 'stop'"/> would evaluate to "go ahead" if a is 100 else it would evaluate to 'stop' Languages such as OGNL support the comma operator which allows more exotic expressions. See the testcase for an example.

Author:
Raja Shankar Kolluru

Field Summary
 
Fields inherited from class com.itmusings.stm.action.scriptsupport.BaseScriptingAction
scriptingStrategy
 
Fields inherited from class com.itmusings.stm.action.scriptsupport.BaseCustomComponentPropertiesAction
componentPropertiesHelper, enableInlineScriptsInProperties
 
Constructor Summary
ScriptAction()
           
 
Method Summary
protected  java.lang.String doExecute(T flowContext)
           
 
Methods inherited from class com.itmusings.stm.action.scriptsupport.BaseScriptingAction
setScriptingStrategy
 
Methods inherited from class com.itmusings.stm.action.scriptsupport.BaseCustomComponentPropertiesAction
getComponentProperty, isEnableInlineScriptsInProperties, setComponentPropertiesHelper, setEnableInlineScriptsInProperties
 
Methods inherited from class com.itmusings.stm.impl.STMActionBase
cleanUp, doSetup, execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptAction

public ScriptAction()
Method Detail

doExecute

protected java.lang.String doExecute(T flowContext)
                              throws java.lang.Exception
Overrides:
doExecute in class STMActionBase<T>
Throws:
java.lang.Exception


Copyright © 2011 ITMUSINGS. All Rights Reserved.