IBM TDI 7.1 (TDI) allows us to use Java objects in your script code to perform specific operations not provided directly by TDI. Because calling methods of Java objects when the Java object must be constructed and parameters mapped to proper classes can be difficult, the Java class Function Component makes using Java objects in your scripts easier. The Java Class Function Component allows us to choose a Java class and method through the Config Editor and performs the conversion and mapping of parameters to the method.
The schema for the Java Class Function Component is dynamic and reflects the chosen Java class and method. The Function Component also performs dynamic conversion of parameters to match the signature of the target Java class/method.
Parameter conversion is performed for the most common types. However, it is beyond the scope of this FC to provide conversion for all potential Java class objects. For unsupported objects explicitly create these before invoking the Java Class Function Component. Below is a table of objects that the Java Class Function Component will recognize for parameter conversions.
Parameter type | Notes |
---|---|
Integer | Both object and primitive type |
Long | Both object and primitive type |
Double | Both object and primitive type |
Float | Both object and primitive type |
Short | Both object and primitive type |
Byte | Both object and primitive type |
Character | Both object and primitive type |
Boolean | Both object and primitive type |
Date | Only conversion from default date format as defined by DateFormat |
String |
In addition to these types, the Java Class Function Component will also attempt conversion into primitive arrays and java.util.Collection objects.
The Java Class Function Component uses the following parameters: