Publishing Engine Programmer's Guide > PTC Arbortext Publishing > Arbortext Publishing Engine Client Composer > The Client Composition Extension > The com.arbortext.e3c.ClientCompositionExtension Interface > The preProcess Method
  
The preProcess Method
The preProcess method is called by the Client Composition Extension just before it zips the input directory to a JAR file and transmits it to the Arbortext PE server as part of the publishing request. It has the following signature:
public void preProcess(
File inputDir,
E3ServerCompositionRequest request,
Map localParameters,
E3Tracer tracer
);
The inputDir gives the location of the directory that will be zipped into a JAR file and transmitted to the Arbortext PE server. The Client Composition Extension can create files and subdirectories in it, and they will be transmitted to the server along with everything else in the directory.
To avoid naming collisions, recall that the Arbortext Publishing Engine Client Composer may have files beginning with the string x followed by an integer and a file extension of .xml, .html, or .sgml, along with subdirectories beginning with x followed by an integer and ending in -graphics. The Client Composer also writes a file named index.xml before transmitting the directory to the Arbortext PE server.
The parameter request is the request that is being transmitted to the Arbortext PE server. The Client Composer will serialize it to the input directory under the name index.xml before zipping the input directory into a JAR file. The Client Composition Extension can modify the request by calling its addParameter, setDoc, and setPath methods. Refer to the Javadoc for information on these methods.
Adding a parameter simply manipulates string values. If you add a parameter, only the content of index.xml changes. No work happens because of it, such as opening documents, flattening entities, copying graphics, and so on.
To obtain the processing that the Client Composer provides for document, entry, file, local, opendoc, and string, you must code that behavior directly.
The localParameters parameter is a map containing the local parameters passed to the Client Composer. It contains string parameter names and string parameter values. These parameters are not transmitted to the Arbortext PE server.
The parameter tracer is a tracing object that makes entries in the Arbortext Publishing Engine debugging log, described in Debugging the Client Composer.