- Post-processing (pre-delivery) plugins, which allow you to add processing logic after publication contents have been personalized.
- Distribution complete (post-delivery) plugins, which allow you to add processing logic after publication contents have been delivered.
Building and deploying custom post-processing (pre-delivery) publication extensions
This method is invoked one time for each destination and scope. It must return an IInfoObjects collection containing the artifacts created by the plugin that will be delivered to the recipients associated with the current destination and scope. The parameter is a com.businessobjects.publisher.postprocessing.IPublicationPostProcessingContext object, which contains information about the context, including the current scope and destination, and any parameters that were used to invoke the plugin.
This method must return a collection of com.businessobjects.publisher.postprocessing.PluginTargetDestination representing the destinations for which the plugin will be invoked.
|getAdminLogAdapter()||This method returns a logger that can be used to log information during post-processing|
|getDestination()||This method returns the current destination.|
|getDocuments()||This method returns the static documents and schedulable document artifacts for the current scope and destination.|
|getEnterpriseSession()||This method returns the session associated with the current user.|
|getInfoStore()||This method returns an InfoStore object that can be used to query the BusinessObjects Enterprise repository.|
|getOptions()||This method returns the generic parameter value, that was passed in through the CMC UI.|
|getPluginArtifacts()||This method returns all artifacts that have been generated during the publishing process.|
|getPublication()||This method returns the publication that invoked this plugin.|
|getScopeFilter(IInfoObject doc)||This method returns IScopeFilter object that can be used to obtain personalization information|
|getScopeID()||This method returns the ID of the current scope.|
|getTempDirectory()||This method returns the path of the directory on the processing server that is used by BusinessObjects Enterprise for storing temporary files.|
The com.businessobjects.publisher.postprocessing.PostProcessingPluginHelper provides several static methods that can be used in post-processing plugins. For example, to add new artifacts, use createInfoObject method. The following code creates a text file info object.
ITxt textInfoObject = (ITxt) PostProcessingPluginHelper.createInfoObject(context, ITxt.PROGID, “text/plain”, null, null);
For detailed information on IPublicationPostProcessingPlugin, IPublicationPostProcessingContext, PluginTargetDestination, and PostProcessingPluginHelper, see the SAP BusinessObjects Business Intelligence Platform Java API Reference .
An example publication extension is posted at this blog post: Sample Publication Extension: Deliver shortcut to a BI platform folder based on personalization . This post processing publication extension creates a shortcut of the publication artifact in a folder based on the personalization. For example if you personalize on Country and have a folder for USA and Canada, then a shortcut for the publication artifact filtered to USA will be created in a USA folder, and a shortcut for the Canada document will be created in a Canada folder.
After the publication extension is built into a jar file, it needs to be deployed in the publication extensions directory. The default location of this directory is <Enterprise Dir>\java\lib\publishingPlugins. Once the extension was added, you have to restart the Adaptive Processing Server.
Adding a publication extensions to a publication
A publication extension can be added to a publication either programmatically or from the Central Management Console (CMC). The BI launch pad application does not allow you to specify publication extensions for a publication through the UI.
At this point it is assumed that you have already deployed the publication extension as described above on all computers that run the Adaptive Processing Server.
Below are the steps to add a publication extension via the CMC:
- Double-click a publication to open it. The “Properties” dialog box appears.
- Expand Additional Options, and click Publication Extension.
- In the Publication Extension Name box, type a name for the extension.
- In the Class Name box, type the fully qualified class name for the extension.
- (Optional) In the Parameter box, type a serialized string that your extension requires. What the parameter is would depend on how the extension was designed.
- To use the extension after processing but before delivery, above the Before Publication Delivery list, click the Add button. The extension is added to the Before Publication Delivery list.
- To use the extension after delivery, above the After Publication Delivery list, click the Add button. The extension is added to the After Publication Delivery list.
- Click Save.
- Repeat steps 2 to 8 for each extension you want to add.
To define the order in which to execute publication extensions, click Move Up or Move Down under the Before Publication Delivery list or the After Publication Delivery list.