org.camunda.bpm.engine.impl.scripting
Class JuelScriptEngine

java.lang.Object
  extended by javax.script.AbstractScriptEngine
      extended by org.camunda.bpm.engine.impl.scripting.JuelScriptEngine
All Implemented Interfaces:
Compilable, ScriptEngine

public class JuelScriptEngine
extends AbstractScriptEngine
implements Compilable

ScriptEngine that used JUEL for script evaluation and compilation (JSR-223). Uses EL 1.1 if available, to resolve expressions. Otherwise it reverts to EL 1.0, using ExpressionFactoryResolver.

Author:
Frederik Heremans

Field Summary
 
Fields inherited from class javax.script.AbstractScriptEngine
context
 
Fields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
 
Constructor Summary
JuelScriptEngine()
           
JuelScriptEngine(ScriptEngineFactory scriptEngineFactory)
           
 
Method Summary
 CompiledScript compile(Reader reader)
           
 CompiledScript compile(String script)
           
 Bindings createBindings()
           
 Object eval(Reader reader, ScriptContext scriptContext)
           
 Object eval(String script, ScriptContext scriptContext)
           
 ScriptEngineFactory getFactory()
           
static void importFunctions(ScriptContext ctx, String namespace, Object obj)
           
static void print(Object object)
           
 
Methods inherited from class javax.script.AbstractScriptEngine
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JuelScriptEngine

public JuelScriptEngine(ScriptEngineFactory scriptEngineFactory)

JuelScriptEngine

public JuelScriptEngine()
Method Detail

compile

public CompiledScript compile(String script)
                       throws ScriptException
Specified by:
compile in interface Compilable
Throws:
ScriptException

compile

public CompiledScript compile(Reader reader)
                       throws ScriptException
Specified by:
compile in interface Compilable
Throws:
ScriptException

eval

public Object eval(String script,
                   ScriptContext scriptContext)
            throws ScriptException
Specified by:
eval in interface ScriptEngine
Throws:
ScriptException

eval

public Object eval(Reader reader,
                   ScriptContext scriptContext)
            throws ScriptException
Specified by:
eval in interface ScriptEngine
Throws:
ScriptException

getFactory

public ScriptEngineFactory getFactory()
Specified by:
getFactory in interface ScriptEngine

createBindings

public Bindings createBindings()
Specified by:
createBindings in interface ScriptEngine

print

public static void print(Object object)

importFunctions

public static void importFunctions(ScriptContext ctx,
                                   String namespace,
                                   Object obj)


Copyright © 2014 camunda services GmbH. All Rights Reserved.