com.ibm.itim.script.wrappers
Interface WrapperFactory

All Known Implementing Classes:
AbstractWrapperFactory, GenericWrapperFactory, JSAttributeValueWrapperFactory, JSCollectionWrapperFactory, JSDirectoryObjectWrapperFactory, JSDNWrapperFactory, JSIRuleResultWrapperFactory, JSMapWrapperFactory, JSPackagedApprovalDocumentWrapperFactory, JSPackagedApprovalItemWrapperFactory, JSRAAttributeWrapperFactory, JSRAObjectWrapperFactory

public interface WrapperFactory

A class that implements WrapperFactory knows how to wrap a specific type of Object or a set of objects. Some scripting engines require a specific wrapper just for that engine. In those cases the WrapperFactory implementation must be aware of each scripting language supported.

Since:
ITIM 5.0

Field Summary
static java.lang.String FESI_LANG
          Constant WrapperFactory classes can use to check for use of the FESI engine.
static java.lang.String IBMJS_LANG
          Constant WrapperFactory classes can use to check for use of the IBMJS engine.
 
Method Summary
 java.lang.Object getObjectToStore(java.lang.Object obj)
          Get the object that should be returned on a lookup call on ObjectWrapperManager.
 ObjectWrapper wrap(java.lang.Object obj, java.lang.String lang, java.lang.Object param)
          Correctly wrap the given object to use in the scripting environment.
 

Field Detail

IBMJS_LANG

static final java.lang.String IBMJS_LANG
Constant WrapperFactory classes can use to check for use of the IBMJS engine.

See Also:
Constant Field Values

FESI_LANG

static final java.lang.String FESI_LANG
Constant WrapperFactory classes can use to check for use of the FESI engine.

See Also:
Constant Field Values
Method Detail

wrap

ObjectWrapper wrap(java.lang.Object obj,
                   java.lang.String lang,
                   java.lang.Object param)
Correctly wrap the given object to use in the scripting environment. If a wrapper that a WrapperFactory creates does not need any special context information, it is safe to ignore lang and param.

Parameters:
obj - The Object to wrap.
lang - The scripting language we are using. This is used to choose a specific wrapper if the wrapper must vary depending on scripting language.
param - Some wrapper classes need parameters to correctly wrap objects. param is how this information is passed. param can be null if no extra information is necessary.
Returns:
null - if (obj == null)
null - if param is not sufficient to wrap the object for the given language.
Wrapped object - else.

getObjectToStore

java.lang.Object getObjectToStore(java.lang.Object obj)
Get the object that should be returned on a lookup call on ObjectWrapperManager. This method exists so that if a different object should be returned than is passed in. This is the case if a DirectoryObjectEntity is wrapped, but a DirectoryObject should be returned. In most cases obj will be returned.

Parameters:
obj - The same object that was passed wrap.
Returns:
The object to store in ObjectWrapperManagers lookup map.


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.