Formatter
A formatter is a Java™ class that generates a custom routing file string.
To create a custom routing file, implement a unique formatter class. Your formatter must implement the
RouteFileFormatterInterface interface in the
com.ibm.paydir.rtefile.formatter package.
To use the formatter, the formatter class needs to be in the shared library directory for Distribution. You must also define the class and routing file schema name by using the manage transmission definitions page in Transaction Server. For more information, see Transmission definitions management.
RouteFileFormatterInterface contains the method processXML, which is
defined as shown in the following example.
public String processXML(String baseRte, HashMap custAttr,
HashMap appObj, String schema)
throws FormatterException;processXML.
| Parameter name | Parameter type | Description |
|---|---|---|
| baseRte | String | The routing file created by Distribution. |
| custAttr | HashMap | The custom attribute definition as name and value pairs. |
| appObj | HashMap | The business object pairs that are shown in the following list.
|
| schema | String | Schema definition. (Optional) |
processXML returns the XML for the new custom routing file as a Java String.
If processXML could not create the custom routing file, it raises a Java exception called FormatterException. The exception is logged and the
original routing file that was created by Distribution is used.
The call to the formatter is timed, logged, and printed with the other file timing values.