|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface ScriptEvaluator
This class defines the interface for expression and script evaluation and compilation.
| Field Summary | |
|---|---|
static java.lang.String |
SCRIPT_LANG_PARAM
Gives the key of the named object in the scripting environment that contains the name of currecnt scripting language. |
static java.lang.String |
SCRIPT_PARAMETER_PARAM
Gives the key of the named object in the scripting enviornment that contains the parameter necessary to correctly wrap an object. |
| Method Summary | |
|---|---|
java.lang.Object |
compileExpression(java.lang.String expr)
Compiles an expression into a codebuffer. |
java.lang.Object |
compileScript(java.lang.Object script)
Compiles the script into a code buffer. |
void |
dispose()
Force the ScriptEvaluator to release its resources. |
java.lang.Object |
evaluate(java.lang.String expr)
Evaluates an expression. |
java.lang.Object |
evaluate(java.lang.String expr,
java.lang.String lang)
This method is for testing to call a specific scripting engine; Host components should call evaluate(String) instead. |
void |
execute(java.lang.Object script)
Execute the script object. |
java.lang.String |
getHostComponentName()
Get the name of the host component that initialized this ScriptEvaluator. |
void |
initialize(java.lang.String name,
ScriptInterface context)
Initializes the Script host component's script context, populates runtime context data and load Java scripting objects |
boolean |
isLanguageSupported(java.lang.String language)
Determines if a specific language is supported with script evaluator |
| Methods inherited from interface com.ibm.itim.script.ScriptContextDAO |
|---|
addContextItem, addDisposeListener, lookupItem, updateContextItem |
| Field Detail |
|---|
static final java.lang.String SCRIPT_LANG_PARAM
static final java.lang.String SCRIPT_PARAMETER_PARAM
| Method Detail |
|---|
void dispose()
void initialize(java.lang.String name,
ScriptInterface context)
throws ScriptInitializationException
name - The name of the host component. This name is used to look up
various properties for the script framework including which
extensions to load and which interpreter to use.context - The ScriptInterface to pass to each extension while
initializing them. The system must be able to safely cast
context into whatever type a specified extension requires or
an error will occur.
ScriptInitializationException - Thrown if anything goes wrong while initializing the
ScriptEvaluator. This includes if context cannot be cast to
the proper type for a specified extension.boolean isLanguageSupported(java.lang.String language)
language -
java.lang.Object evaluate(java.lang.String expr)
throws ScriptEvaluationException
expr - Expression as a String
ScriptEvaluationException
java.lang.Object evaluate(java.lang.String expr,
java.lang.String lang)
throws ScriptEvaluationException
expr - Expression as a Stringlang - The language to use to evaluate the expression.
ScriptEvaluationException
java.lang.Object compileExpression(java.lang.String expr)
throws ScriptCompilationException
expr - Expression as a String
ScriptCompilationException
void execute(java.lang.Object script)
throws ScriptEvaluationException
script - Script object
ScriptEvaluationException
java.lang.Object compileScript(java.lang.Object script)
throws ScriptCompilationException
script - the script to cmpile
ScriptCompilationExceptionjava.lang.String getHostComponentName()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||