210 IBM Content Manager OnDemand Guide
9.2.1  Overview
Before version 8.5.0.0, the ODWEK Java APIs provided a tight integration with only a few 
specific transforms: AFP2PDF , AFP2HTML, and AFP2XML. These transform engines were 
used by ODWEK clients to generate different document types for display purposes. Although 
this capability provided invaluable functionality, it meant that new transform engines were not 
readily integrated into ODWEK.
To meet this requirement, a highly flexible interface was added to the ODWEK Java APIs that 
allows a developer to easily implement a third-party document transform solution. 
The new ODWEK Interface allows a client developer to implement an external program to 
transform a document in one of two ways:
/SM590000If the transform vendor provides a basic command-line executable file, it is implemented in 
an XML interface, which supports the retrieval of all of the document details that are stored 
in Content Manager OnDemand, and also allows specific options to be passed to the 
transform.
/SM590000The ODWEK Java APIs also provide a Java interface that a client developer can use to 
add even more flexibility to their client solution. The Java interface allows a client 
developer to get the document byte stream from ODWEK, then use any methods that they 
want to convert the document. These methods can include calls to web services that allow 
remote transformation. After the document is transformed, the resulting data can be 
returned to ODWEK, where it is passed back to the client that made the request.
9.2.2  Configuration
To enable the Generic Transform Interface in ODWEK, an XML document must be created 
and defined in the ODConfig.Properties object. This XML document is identified by the 
<ODConfig.TransformXML> key name and must include the fully qualified path to the XML file 
where the transforms are defined. 
After you configure your XML configuration for the Generic Transform Interface, as described 
in 9.2.3, “Basic implementation: Executable interface” on page 211, you can enable this 
functionality in your ODWEK environment, as shown in Example 9-1.
Example 9-1   Enabling Generic Transform Interface in the ODWEK environment
Properties props = new Properties();
props.setProperty(ODConfig.TRANSFORMS_XML, "transform.xml"); /*Fully qualified 
path to XML file containing transform details.*/
ODConfig odConfig = new ODConfig(ODConstant.PLUGIN, //AfpViewer
                                 ODConstant.APPLET, //LineViewer
                                 null, //MetaViewer
                                 10, //MaxHits
                                 "", //AppletDir
                                 "ENU", //Language
                                 null, //TempDir
                                 "c:\tracedir", //TraceDir
                                 4, //TraceLevel
                                 props); //Additional properties