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

oracle.reports.plugin
Class PluginFactoryTemplate

java.lang.Object
  |
  +--oracle.reports.plugin.PluginFactoryTemplate
All Implemented Interfaces:
PluginFactory
Direct Known Subclasses:
PluginDataSourceFactoryTemplate

public abstract class PluginFactoryTemplate
extends java.lang.Object
implements PluginFactory

Base Factory class used by the Template Plugin Data Source. Provides sample code for a Plugin Data Source. Application developers are encouraged to extend or copy/modify the Template Plugin Data Source to create their own Plugin Data Source. Subclasses would typically call the following methods in the constructor or setReportContext to set up the Plugin Factory:

    setPluginClass("sample.MyDataSourceClassName");
    setEditorClass("sample.MyEditorClassName");
    setMajorVersion(2);
    setMinorVersion(0);
    setName("MyDataSource");
    setIconName("MyDSIcon");

Reports will call corresponding get methods to get the related Plugin Factory information after setReportContext is called. See PluginDataSourceTemplate for an example.


Constructor Summary
PluginFactoryTemplate()
           

 

Method Summary
 void dispose()
          Removes the Plugin Factory and cleans up related resources.
 PluginEditor getEditor()
          Returns the plugin's editor.
 java.lang.String getEditorClass()
          Returns the plugin editor's class name.
 java.lang.String getHelpPrefix()
          Returns the prefix string for the error message help (e.g., "XR" for Express).
 java.lang.String getHelpSet()
          Returns the full path of the helpset file or a URL to the helpset file.
 java.lang.String getHint()
          Returns the plugin class name.
 java.lang.String getIconName()
          Returns the icon name of the plugin.
 int getMajorVersion()
          Returns the major version of the plugin.
 int getMinorVersion()
          Returns the minor version of the plugin.
 java.lang.String getName()
          Returns the plugin name.
 java.lang.String getPluginClass()
          Returns the plugin's class name.
 ReportContext getReportContext()
          Returns the Report Context, which is passed in to setReportContext.
 Plugin make()
          Makes a new plugin instance.
protected  void setEditorClass(java.lang.String editorname)
          Sets editor class name in the subclass constructor.
protected  void setHelpPrefix(java.lang.String helpPrefix)
          Sets help prefix in the subclass constructor.
protected  void setHelpSet(java.lang.String helpSet)
          Sets help set in the subclass constructor.
 void setHelpSetID(java.lang.String helpSetID)
          Sets the helpset ID for the plugin.
protected  void setHint(java.lang.String hint)
          Sets hint message in the subclass constructor.
protected  void setIconName(java.lang.String icon)
          Sets icon name in the subclass constructor.
protected  void setMajorVersion(int majorVersion)
          Sets major version in the subclass constructor.
protected  void setMinorVersion(int minorVersion)
          Sets minor version in the subclass constructor.
protected  void setName(java.lang.String pluginname)
          Sets plugin name in the subclass constructor.
protected  void setPluginClass(java.lang.String classname)
          Sets plugin class name in the subclass constructor.
 void setReportContext(ReportContext pReportContext)
          Passed in ReportContext.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

PluginFactoryTemplate

public PluginFactoryTemplate()
Method Detail

setMajorVersion

protected void setMajorVersion(int majorVersion)
Sets major version in the subclass constructor.

setMinorVersion

protected void setMinorVersion(int minorVersion)
Sets minor version in the subclass constructor.

setIconName

protected void setIconName(java.lang.String icon)
Sets icon name in the subclass constructor.

setName

protected void setName(java.lang.String pluginname)
Sets plugin name in the subclass constructor.

setPluginClass

protected void setPluginClass(java.lang.String classname)
Sets plugin class name in the subclass constructor.

setEditorClass

protected void setEditorClass(java.lang.String editorname)
Sets editor class name in the subclass constructor.

setHint

protected void setHint(java.lang.String hint)
Sets hint message in the subclass constructor.

setHelpSet

protected void setHelpSet(java.lang.String helpSet)
Sets help set in the subclass constructor.

setHelpPrefix

protected void setHelpPrefix(java.lang.String helpPrefix)
Sets help prefix in the subclass constructor.

dispose

public void dispose()
Removes the Plugin Factory and cleans up related resources. This method is called when Reports is shut down.
Specified by:
dispose in interface PluginFactory

setReportContext

public void setReportContext(ReportContext pReportContext)
Passed in ReportContext. This method is called by Reports right after the Plugin Factory is created. PluginFactoryTemplate saves the passed in Report Context in an object variable for later use. getReportContext returns the saved Report Context. Any subclass of PluginFactoryTemplate that overwrites setReportContext should still call super.setReportContext so that Report Context can be saved and getReportContext can work properly.
Specified by:
setReportContext in interface PluginFactory

getReportContext

public ReportContext getReportContext()
                               throws PluginException
Returns the Report Context, which is passed in to setReportContext. Do not call getReportContext before setReportContext is called (say, inside PluginFactory constructor). If getReportContext returns null, most likely Report Context is not saved in the object variable "reportContext" in setReportContext.

getPluginClass

public java.lang.String getPluginClass()
Returns the plugin's class name.

getEditorClass

public java.lang.String getEditorClass()
Returns the plugin editor's class name.

getMajorVersion

public int getMajorVersion()
Returns the major version of the plugin.
Specified by:
getMajorVersion in interface PluginFactory

getMinorVersion

public int getMinorVersion()
Returns the minor version of the plugin.
Specified by:
getMinorVersion in interface PluginFactory

getIconName

public java.lang.String getIconName()
Returns the icon name of the plugin.
Specified by:
getIconName in interface PluginFactory

getName

public java.lang.String getName()
Returns the plugin name.
Specified by:
getName in interface PluginFactory

getHint

public java.lang.String getHint()
Returns the plugin class name.
Specified by:
getHint in interface PluginFactory

setHelpSetID

public void setHelpSetID(java.lang.String helpSetID)
                  throws PluginException
Sets the helpset ID for the plugin. This ID identifies the helpset associated with this type of plugin. The plugin should stash the ID and use it if it needs to access help using ReportContext.setHelpTopic().
Specified by:
setHelpSetID in interface PluginFactory

getHelpSet

public java.lang.String getHelpSet()
Returns the full path of the helpset file or a URL to the helpset file.
Specified by:
getHelpSet in interface PluginFactory

getHelpPrefix

public java.lang.String getHelpPrefix()
Returns the prefix string for the error message help (e.g., "XR" for Express). This is used to fully qualify the error message help topic ID. For example, "XR-1000" is a help topic ID for error number 1000 in Express PDS. Reports takes two strings provided by PluginFactory (the helpset file and the prefix) and returns a helpSet ID that uniquely identifies this plugin via IPlugin.setHelpSetID(). This helpSet ID is a number (in the form of a String) that gets passed to help methods and RWException. The plugin must supply this prefix if error message help is to be used.
Specified by:
getHelpPrefix in interface PluginFactory

getEditor

public PluginEditor getEditor()
                       throws PluginException
Returns the plugin's editor.
Specified by:
getEditor in interface PluginFactory

make

public Plugin make()
            throws PluginException
Makes a new plugin instance.
Specified by:
make in interface PluginFactory

Oracle Reports
Java API Reference

Copyright © 2003 Oracle Corporation. All Rights Reserved.