Creating a postprocessing plug-in

Administrators can create a postprocessing plug-in to add postprocessing capabilities at the deployment level for all of the users in your organization, instead of coded into each individual document specification. For example, you could add postprocessing capabilities such as copying, archiving or renaming output files, emailing the results or uploading generated documents to a server.

About this task

Procedure

To create a new plug-in for postprocessing and deploy it into the client:

  1. Create a new plug-in project.
  2. Add a new extension where the extension point should be: RRDGPostProcessor.
  3. Provide a ID and name for the new extension. For example, if the new extension is called PostProcessor1, an entry similar to this should appear in your plugin.xml file:
    <extension id="PostProcessor1" name="PostProcessor1" point="com.ibm.rational.rrdg.RRDGPostProcessor">
         <RRDGPostProcessor class="com.ibm.rational.rpe.postprocessor.PostProcessor1">
         </RRDGPostProcessor>
    </extension>
  4. Create a PostProcessor1 class with the following code:
    public class PostProcessor1 implements IPostProcessor
    {
        @Override
        public void processResults(List <RPEResult> results) 
        {  
           //All the code for processing results should go here. 
        }
     }
  5. The code for processing results should be added to the PostProcessor1.processResults method.
  6. Compile the plug-in and package as a .jar file.
  7. For local document generation, place the packaged .jar file into the <RPE_installdir>/launcher/plugins folder and it should be loaded when Launcher starts. For Document Studio, add the .jar file to the <RPE_installdir>/studio/plugins folder.
  8. For Remote services, add the packaged .jar file to the <RPE_installdir>/webapps/WEB-INF/lib/plugins folder. If the plugins folder does not exist, then create the folder manually.

Feedback