Custom Job Type

A new job type is specified using a <JOB> element which must be created with the <JOBS> element. The new job type should be specified using the type attribute. This attribute is case insensitive, and may not contain spaces. Attribute class should be used to specify the fully qualified name of the class implementing the curam.util.xmlserver.DocumentGenerator interface.

For example:

<JOB type="CUSTOM_JOB_TYPE" class="custom.JobImpl" />

The configuration file supports the definition of any number of <JOB> elements.

The curam.util.xmlserver.DocumentGenerator interface requires the following two methods to be implemented.

/**
 * This method should be implemented to generate the document
 * for the custom job type. The method is provided with the
 * xml template and xml data to be merged to create the
 * document. The document result should be sent to the
 * output stream provided.
 *
 * @param xslTemplate The XSL template transformer.
 * @param xmlDataStream The input stream from which to read
 * the XML data.
 * @param docOutput The output stream for the generated
 * document.
 *
 * @throws XMLJobException Generic exception to be thrown on
 * error. Exception handing should be handled within the
 * implemented method.
 */
 void generateDocument(final Transformer xslTemplate,
   final InputStreamReader xmlDataStream,
     final OutputStream docOutput)
       throws XMLJobException;

/**
 * This method should return a String containing the file
 * extension for the file to be generated. For example if
 * generating a HTML file the method should return the
 * String ".html".
 *
 * @return The extension of the file to be generated.
 */
String getFileExtension();