com.ibm.itim.fesiextensions
Class DataMapper

java.lang.Object
  extended by com.ibm.itim.fesiextensions.DataMapper

Deprecated. This class is part of the FESI script framework and will no longer be supported or maintained as of ITIM 5.0. Most of the functionality provided by DataMapper is provided by ObjectWrapperManager.

public class DataMapper
extends java.lang.Object

This class provides helper methods to convert object between FESI script environment and Java In the following case, we need to consider about object conversion from FESI to JAVA: 1. When a JAVA method is invoked within FESI script environment. 2. When object is returned from FESI script FESI would try to convert the script object into Java Object, for example, String in FESI would be converted to java.lang.String in Java. In the case that FESI does not know how to do the conversion, it would pass in a FESI.data.JSObject, in this case, conversion must be done explicitly using scriptToJava() method In the case that a JAVA object returned to FESI via registered Script Object, FESI will automatically convert it to FESI object; or if it does not know how to convert, it makes a wrapper object out of it, so that the Java object can be used in FESI script environment. If a JAVA object is registered as a Script Object, or returned to FESI via another Java method, it is recommended that a wrapper object to be created to wrap the original JAVA object and then invoke JSGlobalObject.makeObjectWrapper() to wrap it in FESI. {{TODO}}Methods in this class should be used in all itim FESI wrapper class to convert input parameters passed in from FESI and data returned to FESI if it is necessary. Because of the risks involved with possible regression, we only used this method in the get() and set() methods in RelevantDataWrapper class, and it is not validated against all other wrapper methods in 4.6 module, and an enhancement request (S15143) is created to revist this issue in the next ITIM release.


Constructor Summary
DataMapper()
          Deprecated. Constructor
 
Method Summary
 java.lang.Object convertJSObjectToJava(FESI.jslib.JSObject jsObj)
          Deprecated. Converts a FESI script object into a matching JAVA object
 java.lang.Object javaToScriptWrapper(java.lang.Object javaObj)
          Deprecated. Returns the wrapper object for a Java object to be returned to FESI Script {{TODO}}The implementation does not take advantage of the JSGlobalObjectFactory to locate the corresponding JSxxxFactory object, it will require some refactory work to do so.
 java.lang.Object scriptToJava(java.lang.Object scriptObj)
          Deprecated. Converts a FESI script object into a matching JAVA object If global factory exists, try to convert using it;
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataMapper

public DataMapper()
Deprecated. 
Constructor

Method Detail

scriptToJava

public java.lang.Object scriptToJava(java.lang.Object scriptObj)
                              throws ScriptEvaluatorException
Deprecated. 
Converts a FESI script object into a matching JAVA object If global factory exists, try to convert using it;

Parameters:
scriptObj - FESI script object
Returns:
JAVA object
Throws:
ScriptEvaluatorException - when conversion wasn't successful

javaToScriptWrapper

public java.lang.Object javaToScriptWrapper(java.lang.Object javaObj)
Deprecated. 
Returns the wrapper object for a Java object to be returned to FESI Script {{TODO}}The implementation does not take advantage of the JSGlobalObjectFactory to locate the corresponding JSxxxFactory object, it will require some refactory work to do so. An enhancement request ?? has been created to address this in next release.

Parameters:
javaObj - A Java Object
Returns:
wrapper of the Java Object

convertJSObjectToJava

public java.lang.Object convertJSObjectToJava(FESI.jslib.JSObject jsObj)
                                       throws ScriptEvaluatorException
Deprecated. 
Converts a FESI script object into a matching JAVA object

Parameters:
jsObj - FESI script object
Returns:
JAVA object
Throws:
ScriptEvaluatorException - when conversion wasn't successful


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.