com.ibm.itim.fesiextensions

Interface JSObjectFactory

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASS_NAME
      Deprecated. 
      Constant for the JSObject property that holds the class name of the Java object the JSObject was converted from.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method and Description
      java.lang.Object createJavaObject(java.lang.String name, FESI.jslib.JSObject o)
      Deprecated. 
      Create a Java object from the specified JavaScript object.
      FESI.jslib.JSObject createScriptObject(FESI.jslib.JSGlobalObject go, FESI.jslib.JSObject parent, java.lang.String name, java.lang.Object item)
      Deprecated. 
      Create a named object that can be used in the client's script.
    • Field Detail

      • CLASS_NAME

        static final java.lang.String CLASS_NAME
        Deprecated. 
        Constant for the JSObject property that holds the class name of the Java object the JSObject was converted from.
        See Also:
        Constant Field Values
    • Method Detail

      • createScriptObject

        FESI.jslib.JSObject createScriptObject(FESI.jslib.JSGlobalObject go,
                                               FESI.jslib.JSObject parent,
                                               java.lang.String name,
                                               java.lang.Object item)
                                        throws FESI.jslib.JSException
        Deprecated. 
        Create a named object that can be used in the client's script. This method differes from setContextItem in that it will translate the given java object to an object that is compatible with the scripting language implementation and the result can be used in the client scripts, not just by the script engine extensions. The only requirement for the JavaScript object returned is that it has a property that indicates the Java class it was created from. The property is named CLASS_NAME and the value is the name of the Java class.
        Parameters:
        go - JSGlobalObject as calling context.
        parent - JSObject to be registered as a member of. Same as go if global.
        name - Name of the object in the scripting environment
        item - Object that will be made available as a script object
        Returns:
        JSObject representing the given object.
        Throws:
        FESI.jslib.JSException - when the object can not be converted into a format that can be used within the script environment
      • createJavaObject

        java.lang.Object createJavaObject(java.lang.String name,
                                          FESI.jslib.JSObject o)
                                   throws FESI.jslib.JSException
        Deprecated. 
        Create a Java object from the specified JavaScript object. This method is optional. If the factory does not implement it, it must throw an UnsupportedOperationException.
        Parameters:
        name - Name of the JavaScript object. Can be empty.
        o - JSObject to convert from.
        Returns:
        Java object that represents the JSObject.
        Throws:
        FESI.jslib.JSException - if the specified JSObject is malformed or not compatible with this factory.