|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScriptContextDAO
This Data Access Object defines methods that ScriptExtension classes can use to add or get at context in the scripting environment.
Method Summary | |
---|---|
java.lang.Object |
addContextItem(java.lang.Object obj)
Add a context item into the scripting environment. |
void |
addDisposeListener(DisposeListener listener)
Add a new DisposeListener to be notified when the ScriptContextDAO is disposed. |
java.lang.Object |
lookupItem(java.lang.String name)
Find a context item object that has been added to the scripting environment. |
java.lang.Object |
updateContextItem(java.lang.String name,
java.lang.Object obj)
Update or set a current context item. |
Method Detail |
---|
java.lang.Object addContextItem(java.lang.Object obj) throws ScriptEvaluationException
getKey()
method from ObjectWrapper
.
obj
- The object to wrap and add to the scripting environment.
ScriptEvaluationException
- Thrown if an error occurs adding the given item to the
scripting environment.WrapperConfigDefaults
java.lang.Object updateContextItem(java.lang.String name, java.lang.Object obj) throws ScriptEvaluationException
obj
and will accessible with as
name
.
name
- The name of the context item to update or add. If name is
null, then updateContextItem()
is exactly the
same as addContextItem()
.obj
- The object to wrap and update in the scripting environment.
ScriptEvaluationException
- Thrown if an error occurs adding the given item to the
scripting environment.WrapperConfigDefaults
java.lang.Object lookupItem(java.lang.String name)
name
- The name of the context item to find.
void addDisposeListener(DisposeListener listener)
dispose()
method, though the order the
DisposeListeners are notified in is not guarenteed. Each listener will
only be notified once regardless of how many times it is added via
addDisposeListener()
.
listener
- The DisposeListener to add.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |