public class ScriptRunner extends Object
Constructor and Description |
---|
ScriptRunner(String resultVariable)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addBean(String key,
Object bean)
Add a single object into the script context.
|
void |
addBeans(Map<String,Object> dictionary)
Add a list of named objects to the list to be exported to the script
|
Object |
executeScript(Evaluatable evaluatable)
Do the work of running the script.
|
public ScriptRunner(String resultVariable)
public void addBeans(Map<String,Object> dictionary)
dictionary
- a map of objects to be placed into the script context
indexed by String names.public void addBean(String key, Object bean)
key
- the name in the context this object is to stored under.bean
- the object to be stored in the script context.public Object executeScript(Evaluatable evaluatable)