Advanced implementation
The advanced implementation of the Generic Transform Interface allows you to write a Java class that can handle the transform requests in a programmatic way, allowing for the most application flexibility to transform data in any way that you choose.
About this task
First, create a custom Java transform class that implements the transformData method. Next, add a <ClientClass> child node to the XML with the name of the custom Java transform class. The transformData method is the vehicle for ODWEK to pass document and resource (when applicable) data and its requested details from the Content Manager OnDemand server to the custom Java transform class.
<Transforms>
<transform>
<TransformName>MYTXFRM</TransformName>
<TransformDescription>GENERIC Transform Engine</TransformDescription>
<ClientClass>com.companyA.corp.CustomTransform</ClientClass>
<OutputMimeType>application/pdf</OutputMimeType>
<OutputExtension>pdf</OutputExtension>
<CmdParms>
<AG_NAME>agName</AG_NAME>
<APPL_NAME>applName</APPL_NAME>
<RECORDFORMAT>recfmt</RECORDFORMAT>
<RECORDLENGTH>LineLength</RECORDLENGTH>
<CARRIAGECONTROL>CC</CARRIAGECONTROL>
<CODEPAGE>CodePage</CODEPAGE>
</CmdParms>
</transform>
</Transforms>
As with the basic implementation, this XML stanza allows you to set up which details are required for document transformation and how those details should be passed to the custom Java transform class.
The XML shows an example of how the <ClientClass> can be used to access the document data. The XML child nodes of the <CmdParms> node determine which document details are passed to the Java class by using the TXFRM_REQ_PROPS. The node name options can be found in the ODWEK client HashMap keys section. The element contents are passed as Keys and the corresponding Values are definition specific from the Content Manager OnDemand server.