org.oddjob.script
Class ScriptRunner

java.lang.Object
  extended by org.oddjob.script.ScriptRunner

public class ScriptRunner
extends Object

This class is used to run scripts


Constructor Summary
ScriptRunner(String resultVariable)
          Constructor
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptRunner

public ScriptRunner(String resultVariable)
Constructor

Method Detail

addBeans

public void addBeans(Map<String,Object> dictionary)
Add a list of named objects to the list to be exported to the script

Parameters:
dictionary - a map of objects to be placed into the script context indexed by String names.

addBean

public void addBean(String key,
                    Object bean)
Add a single object into the script context.

Parameters:
key - the name in the context this object is to stored under.
bean - the object to be stored in the script context.

executeScript

public Object executeScript(Evaluatable evaluatable)
Do the work of running the script.

Returns:
The result of running the script.