org.ow2.orchestra.pvm.internal.script
Class ScriptManager

java.lang.Object
  extended by org.ow2.orchestra.pvm.internal.script.ScriptManager

public class ScriptManager
extends Object

Author:
Tom Baeyens

Field Summary
protected  String defaultExpressionLanguage
           
protected  String defaultScriptLanguage
           
protected  String[] readContextNames
           
protected  javax.script.ScriptEngineManager scriptEngineManager
           
protected  String writeContextName
           
 
Constructor Summary
ScriptManager()
           
 
Method Summary
static ScriptManager createDefault()
           
protected  Object evaluate(javax.script.ScriptEngine scriptEngine, String script)
           
 Object evaluate(String script, Execution execution, String language)
          evaluates the script with the given language.
 Object evaluateExpression(String expression, Execution execution, String language)
          evaluates the expression with the given language or with the defaultExpressionLanguage if the given language is null.
 Object evaluateScript(String script, Execution execution, String language)
          evaluates the script with the given language or with the defaultScriptLanguage if the given language is null.
static ScriptManager getScriptManager()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultExpressionLanguage

protected String defaultExpressionLanguage

defaultScriptLanguage

protected String defaultScriptLanguage

scriptEngineManager

protected javax.script.ScriptEngineManager scriptEngineManager

readContextNames

protected String[] readContextNames

writeContextName

protected String writeContextName
Constructor Detail

ScriptManager

public ScriptManager()
Method Detail

getScriptManager

public static ScriptManager getScriptManager()

createDefault

public static ScriptManager createDefault()

evaluateExpression

public Object evaluateExpression(String expression,
                                 Execution execution,
                                 String language)
evaluates the expression with the given language or with the defaultExpressionLanguage if the given language is null.


evaluateScript

public Object evaluateScript(String script,
                             Execution execution,
                             String language)
evaluates the script with the given language or with the defaultScriptLanguage if the given language is null.


evaluate

public Object evaluate(String script,
                       Execution execution,
                       String language)
evaluates the script with the given language. If script is null, then this method will return null.

Throws:
PvmException - if language is null.

evaluate

protected Object evaluate(javax.script.ScriptEngine scriptEngine,
                          String script)


Copyright © 2011 OW2 Consortium. All Rights Reserved.