Developing a custom Processor
You can change the way the Content Deployer processes packages by creating a custom Processor using the Processor Java class that extends com.tridion.deployer.Processor. The new object overrides the default methods and provides methods required by a custom implementation.
For example, if you override process(TransportPackage data), a custom Processor can perform different or additional actions than the standard Processor on incoming Transport Packages.
To add extra Processors to the calling chain, you must modify the Content Deployer configuration file, cd_deployer_conf.xml (refer to the Content Deployer sample configuration file for details). Add extra Processor elements under the Processors element with an Action attribute that matches the action for which the Processor is registered.
In the following example, for the Deploy action, the Processors configuration first uses the standard Deployment processor and then uses a custom Processor class (mypackage.MyProcessor):
<Processors>
<Processor Action="Deploy" Class="com.tridion.deployer.Processor">
<Module Type="PageDeploy" Class="com.tridion.deployer.modules.PageDeploy"/>
<Module Type="BinaryDeploy" Class="com.tridion.deployer.modules.BinaryDeploy"/>
<Module Type="ComponentDeploy" Class="com.tridion.deployer.modules.ComponentDeploy"/>
</Processor>
<Processor Action="Deploy" Class="mypackage.MyProcessor">
<!-- custom configuration for this processor can go here -->
</Processor>
</Processors>
Processors are called in the order in which they are included in the Content Deployer configuration file. In this example, the process() method is called on com.tridion.deployer.Processor first, and is then called on mypackage.MyProcessor.
If the process() method throws a ProcessingException, all further processing is aborted, and other Processors in the chain are not called.