Oracle Reports
Java API Reference
10g (9.0.4)
B12019-01

oracle.reports.plugin
Interface Plugin

All Known Subinterfaces:
PluginDataSource

public interface Plugin

Base interface of the Reports Plugin. The Reports Plugin API allows application developers to write their own Java components to work with Reports. Currently the Reports Plugin API supports the Plugin Data Source, which allows application developers to write a Java component to provide data for their reporting.


Method Summary
 boolean applyXML(java.lang.String xml)
          Applies a text definition (usually in XML) to the plugin.
 void dispose()
          Removes the plugin and cleans up related resources.
 PluginFactory getFactory()
          Returns the factory object that creates the plugin.
 java.lang.String saveToXML()
          Returns the text definition (usually in XML) of the plugin.
 void setFactory(PluginFactory fac)
          Sets the factory object that creates this plugin.
 void startRuntime()
          Notifies the plugin that Reports is about to start to run.

 

Method Detail

startRuntime

public void startRuntime()
                  throws PluginException
Notifies the plugin that Reports is about to start to run. At runtime, the plugin is not allowed to raise any UI dialog box. If the plugin needs to raise a UI dialog box, such as the Connect dialog box, before its runtime execution, it should be done inside this method. Note: unlike execute methods that may be called many times for one plugin, startRuntime is called only once for one plugin for one report run.

dispose

public void dispose()
Removes the plugin and cleans up related resources. This method is called when the plugin is deleted from the report, or when closing the report.

applyXML

public boolean applyXML(java.lang.String xml)
                 throws PluginException
Applies a text definition (usually in XML) to the plugin. The plugin's text definition is returned from the saveToXML method and stored with the report file (either RDF, JSP, or XML form). When the report file is opened, the stored text definition is passed to this method to restore the plugin object. The syntax of the text definition is up to each plugin to define. This method and saveToXML are paired to serialize and deserialize the plugin into a text definition for Reports to store and restore the plugin with the report file.
Parameters:
xml - The xml to apply.
Returns:
true if the plugin data source changed with the xml. false if the plugin data source is unchanged.

saveToXML

public java.lang.String saveToXML()
                           throws PluginException
Returns the text definition (usually in XML) of the plugin. The text definition must contain complete information about the plugin, so that it can be used to restore the plugin when passed into the applyXML method. The syntax of the text definition is up to each plugin to define. Reports calls this method to get the plugin's text definition and saves it with report (either in RDF, XML, or JSP form). This method and applyXML are paired to serialize and deserialize the plugin into a text definition for Reports to store and restore the plugin with the report file.

setFactory

public void setFactory(PluginFactory fac)
                throws PluginException
Sets the factory object that creates this plugin. Reports will call setFactory right after the plugin is created.

getFactory

public PluginFactory getFactory()
                         throws PluginException
Returns the factory object that creates the plugin. Reports calls setFactory and passes in the factory object right after the plugin is created.

Oracle Reports
Java API Reference

Copyright © 2003 Oracle Corporation. All Rights Reserved.