Oracle Reports
Java API Reference
11g Release 1 (11.1.1)
E10775-01

oracle.reports.plugin
Class PluginFactoryTemplate

java.lang.Object
  extended by 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 of Template Plug-in Data Source. It provides sample code of a real functioning Plug-in Data Source. Application developers are encouraged to extend, or copy/modify Template Plug-in Data Source to create their own Plug-in Data Source. Subclasse would typically call the following methods in its constructor or setReportContext to set up the Plugin Factory. Reports will call conrresponding get methods to get the related Plugin Factory information after setReportContext is called. setPluginClass("sample.MyDataSourceClassName"); setEditorClass("sample.MyEditorClassName"); setMajorVersion(2); setMinorVersion(0); setName("MyDataSource"); setIconName("MyDSIcon"); Please see PluginDataSourceTemplate for example.


Constructor Summary
PluginFactoryTemplate()
           
 
Method Summary
 void dispose()
          Clean any factory resources here.
 PluginEditor getEditor()
          Returns Plug-in's Editor
 java.lang.String getEditorClass()
          Returns Plug-in Editor class name.
 java.lang.String getHelpPrefix()
          Gets prefix string for the error message help.
 java.lang.String getHelpSet()
          Returns the full path of helpset file or a URL to the helpset file
 java.lang.String getHint()
          Returns Plug-in class name.
 java.lang.String getIconName()
          Returns icon name of the Plug-in.
 int getMajorVersion()
          Returns major version.
 int getMinorVersion()
          Returns minor version.
 java.lang.String getName()
          Returns Plug-in name.
 java.lang.String getPluginClass()
          Returns Plug-in class name.
 ReportContext getReportContext()
          Returns Report Context which is passed in to setReportContext.
 Plugin make()
          Make new Plug-in instance.
protected  void setEditorClass(java.lang.String editorname)
          For subclass to set edior class name in its constructor.
protected  void setHelpPrefix(java.lang.String helpPrefix)
          For subclass to set help prefix in its constructor.
protected  void setHelpSet(java.lang.String helpSet)
          For subclass to set help set in its constructor.
 void setHelpSetID(java.lang.String helpSetID)
          Set helpset id to the plugin.
protected  void setHint(java.lang.String hint)
          For subclass to set hint message in its constructor.
protected  void setIconName(java.lang.String icon)
          For subclass to set icon name in its constructor.
protected  void setMajorVersion(int majorVersion)
          For subclass to set major version in its constructor.
protected  void setMinorVersion(int minorVersion)
          For subclass to set minor version in its constructor.
protected  void setName(java.lang.String pluginname)
          For subclass to set Plug-in name in its constructor.
protected  void setPluginClass(java.lang.String classname)
          For subclass to set Plug-in class name in its 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)
For subclass to set major version in its constructor.


setMinorVersion

protected void setMinorVersion(int minorVersion)
For subclass to set minor version in its constructor.


setIconName

protected void setIconName(java.lang.String icon)
For subclass to set icon name in its constructor.


setName

protected void setName(java.lang.String pluginname)
For subclass to set Plug-in name in its constructor.


setPluginClass

protected void setPluginClass(java.lang.String classname)
For subclass to set Plug-in class name in its constructor.


setEditorClass

protected void setEditorClass(java.lang.String editorname)
For subclass to set edior class name in its constructor.


setHint

protected void setHint(java.lang.String hint)
For subclass to set hint message in its constructor.


setHelpSet

protected void setHelpSet(java.lang.String helpSet)
For subclass to set help set in its constructor.


setHelpPrefix

protected void setHelpPrefix(java.lang.String helpPrefix)
For subclass to set help prefix in its constructor.


dispose

public void dispose()
Clean any factory resources here.

Specified by:
dispose in interface PluginFactory

setReportContext

public void setReportContext(ReportContext pReportContext)
Passed in ReportContext. This method is called by Reports right after 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 which 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 Report Context which is passed in to setReportContext. Please don't call getReportContext before setReportConext is called (say, inside PluginFactory constructor). If getReportContext return null, probably Report Context is not saved in object variable "reportContext" in setReportConext.

Throws:
PluginException

getPluginClass

public java.lang.String getPluginClass()
Returns Plug-in class name.


getEditorClass

public java.lang.String getEditorClass()
Returns Plug-in Editor class name.


getMajorVersion

public int getMajorVersion()
Returns major version.

Specified by:
getMajorVersion in interface PluginFactory

getMinorVersion

public int getMinorVersion()
Returns minor version.

Specified by:
getMinorVersion in interface PluginFactory

getIconName

public java.lang.String getIconName()
Returns icon name of the Plug-in.

Specified by:
getIconName in interface PluginFactory

getName

public java.lang.String getName()
Returns Plug-in name.

Specified by:
getName in interface PluginFactory

getHint

public java.lang.String getHint()
Returns Plug-in class name.

Specified by:
getHint in interface PluginFactory

setHelpSetID

public void setHelpSetID(java.lang.String helpSetID)
                  throws PluginException
Set helpset id to the plugin. This id identifies the helpset associated with this particular type of plugin. Plugin should stash the id and use it if it needs to access help using ReportContext.setHelpTopic().

Specified by:
setHelpSetID in interface PluginFactory
Throws:
PluginException

getHelpSet

public java.lang.String getHelpSet()
Returns the full path of helpset file or a URL to the helpset file

Specified by:
getHelpSet in interface PluginFactory

getHelpPrefix

public java.lang.String getHelpPrefix()
Gets 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 this two strings provided by PluginFactory (the helpset file and the prefix) and returns a helpSetID that uniquely identify this plugin via IPlugin.setHelpSetID(). This helpSetID is a number (in the form of a String) that gets passed around to help methods and RWException. Plugin is required to supply this prefix if error message help is to be used.

Specified by:
getHelpPrefix in interface PluginFactory

getEditor

public PluginEditor getEditor()
                       throws PluginException
Returns Plug-in's Editor

Specified by:
getEditor in interface PluginFactory
Returns:
plugin editor
Throws:
PluginException

make

public Plugin make()
            throws PluginException
Make new Plug-in instance.

Specified by:
make in interface PluginFactory
Returns:
created plugin instance
Throws:
PluginException

Oracle Reports
Java API Reference

Copyright © 1994, 2009 Oracle Corporation. All Rights Reserved.