public class BeanShellScript extends AbstractScript
Copyright 2005-2006 Partner Software, Inc.
| Constructor and Description |
|---|
BeanShellScript(java.lang.String scriptText) |
BeanShellScript(VfsFile file) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getVariable(java.lang.String variableName)
Gets a single variable defined for the script.
|
void |
include(java.lang.String includeFile)
Include the named file, which must be available in the ScriptKeeper
provided via setScriptLibs()
|
void |
includeFile(java.lang.String includeFilePath)
Include the given file by path.
|
void |
includeFile(VfsFile includeFile)
Include the given file.
|
protected void |
reloadImp()
Subclasses should implement this method to do any maintenance associated
with changes in the source file.
|
protected java.lang.Object |
runScriptImp(Naming<java.lang.Object> variables)
Subclasses should implement this method with their actual script-running
implementation.
|
void |
setScriptLibs(ScriptKeeper scriptLibs)
Set a ScriptKeeper holding the available script libraries.
|
getFile, getName, getScriptLog, getThrown, getVariables, isModified, parse, run, runScript, runThreaded, setThrown, setVariable, setVariables, toStringpublic BeanShellScript(VfsFile file)
public BeanShellScript(java.lang.String scriptText)
public void setScriptLibs(ScriptKeeper scriptLibs)
public void include(java.lang.String includeFile)
throws bsh.EvalError,
java.io.FileNotFoundException,
java.io.IOException
bsh.EvalErrorjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void includeFile(VfsFile includeFile) throws bsh.EvalError, java.io.FileNotFoundException, java.io.IOException
bsh.EvalErrorjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void includeFile(java.lang.String includeFilePath)
throws bsh.EvalError,
java.io.FileNotFoundException,
java.io.IOException
bsh.EvalErrorjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic java.lang.Object getVariable(java.lang.String variableName)
ScriptScript.setVariable(String, Object).getVariable in interface ScriptgetVariable in class AbstractScriptvariableName - name of the variable in the scriptprotected void reloadImp()
throws java.lang.Exception
AbstractScriptreloadImp in class AbstractScriptjava.lang.Exceptionprotected java.lang.Object runScriptImp(Naming<java.lang.Object> variables) throws java.lang.Exception
AbstractScriptrunScriptImp in class AbstractScriptjava.lang.Exception