com.ibm.itim.script
Interface ScriptContextDAO

All Known Subinterfaces:
ScriptEvaluator

public interface ScriptContextDAO

This Data Access Object defines methods that ScriptExtension classes can use to add or get at context in the scripting environment.

Since:
ITIM 5.0

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

addContextItem

java.lang.Object addContextItem(java.lang.Object obj)
                                throws ScriptEvaluationException
Add a context item into the scripting environment. The item will automatically be wrapped, and the wrapped item is returned. The wrapped item will be assigned a name that can be retrieved with the getKey() method from ObjectWrapper.

Parameters:
obj - The object to wrap and add to the scripting environment.
Returns:
null if (obj == null)
obj if obj is on the no wrap list (see WrapperConfigDefaults).
else - An ObjectWrapper implementation wrapping obj.
Throws:
ScriptEvaluationException - Thrown if an error occurs adding the given item to the scripting environment.
See Also:
WrapperConfigDefaults

updateContextItem

java.lang.Object updateContextItem(java.lang.String name,
                                   java.lang.Object obj)
                                   throws ScriptEvaluationException
Update or set a current context item. The new context item will be the wrapped version of obj and will accessible with as name.

Parameters:
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.
Returns:
null if (obj == null)
obj if obj is on the no wrap list (see WrapperConfigDefaults).
else - An ObjectWrapper implementation wrapping obj.
Throws:
ScriptEvaluationException - Thrown if an error occurs adding the given item to the scripting environment.
See Also:
WrapperConfigDefaults

lookupItem

java.lang.Object lookupItem(java.lang.String name)
Find a context item object that has been added to the scripting environment.

Parameters:
name - The name of the context item to find.
Returns:
The context item or null if no item by the name has been put into the script environment. Also returns null if name == null;

addDisposeListener

void addDisposeListener(DisposeListener listener)
Add a new DisposeListener to be notified when the ScriptContextDAO is disposed. DisposeListeners will be notified before anything else is done in the 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().

Parameters:
listener - The DisposeListener to add.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.