Package org.openbravo.base.expression
Class OBScriptEngine
- java.lang.Object
-
- org.openbravo.base.expression.OBScriptEngine
-
public class OBScriptEngine extends Object
Class that wraps a ScriptEngine and that should be used to evaluate javascript scripts It is a singleton, and it takes advantage of the thread safety of ScriptEngine
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
eval(String script)
Object
eval(String script, Map<String,Object> properties)
static OBScriptEngine
getInstance()
-
-
-
Method Detail
-
getInstance
public static OBScriptEngine getInstance()
-
eval
public Object eval(String script) throws ScriptException
- Throws:
ScriptException
-
eval
public Object eval(String script, Map<String,Object> properties) throws ScriptException
- Throws:
ScriptException
-
-