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

oracle.reports.plugin.definition
Class ReportContext

java.lang.Object
  |
  +--oracle.reports.plugin.definition.ReportContext

public class ReportContext
extends java.lang.Object

The Reports context object. The context object provides environment information such as the Reports path, locale, and so on.


Field Summary
protected  oracle.reports.definition.RWReport mRWObj
           
protected  Trace mTrace
           

 

Constructor Summary
ReportContext(oracle.reports.definition.RWReport rwobj, Trace trace)
          Constructor.

 

Method Summary
 java.lang.String findFileInReportsPath(java.lang.String filename)
          Searches for a file named in paths specified by the REPORTS_PATH environment variable.
 java.lang.String getCacheDirectory()
          Returns the cache directory.
 java.util.Hashtable getCommandLineArguments()
          Returns the command line arguments.
 java.lang.String getConfigDirectory()
          Returns the configuration directory.
 java.lang.String getDTDDirectory()
          Returns the DTD directory.
 java.util.Locale getLocale()
           
 java.lang.String getOracleHome()
          Returns the ORACLE_HOME directory.
 java.lang.String getPluginParam(java.lang.String name)
          Returns the named plugin parameter from the server configuration file.
 java.lang.String getReportsDirectory()
          Returns the Reports directory.
 java.lang.String getServerDirectory()
          Returns the server directory.
 java.lang.String getTemplateDirectory()
          Returns the template directory.
 java.lang.String getTemporaryDirectory()
          Returns the Reports temporary directory as defined by the REPORTS_TMP environment variable.
 java.lang.String getTemporaryFile(java.lang.String basename)
          Returns a unique temporary file in the Reports temporary directory defined by the REPORTS_TMP environment variable.
 Trace getTrace()
          Returns the trace object.
 java.lang.String getVersion()
          Returns the Reports version.
 boolean isInsideReportsBuilder()
          Returns true if the current context is running inside Reports Builder.
 boolean isUIAllowedNow()
          Returns true if the plugin is allowed to raise its UI (for example, the Connect dialog box) at this moment.
 void showHelpContent(java.lang.String helpSetID)
          Displays the help content.
 void showHelpTopic(java.lang.String helpSetID, java.lang.String topicID)
          Displays the help topic.

 

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

 

Field Detail

mRWObj

protected oracle.reports.definition.RWReport mRWObj

mTrace

protected Trace mTrace
Constructor Detail

ReportContext

public ReportContext(oracle.reports.definition.RWReport rwobj,
Trace trace)
              throws PluginException
Constructor. NOTE: A plugin must never try to create any Reports objects by itself.
Method Detail

isInsideReportsBuilder

public boolean isInsideReportsBuilder()
                               throws PluginException
Returns true if the current context is running inside Reports Builder. This is for a plugin to check if it is running in the design environment or the deployment environment.

isUIAllowedNow

public boolean isUIAllowedNow()
                       throws PluginException
Returns true if the plugin is allowed to raise its UI (for example, the Connect dialog box) at this moment. A plugin is allowed to raise UI only at design time inside Reports Builder. A plugin is not allowed to raise UI all the time when running inside the Reports Runtime Engine (serving Reports Server).

getTrace

public Trace getTrace()
               throws PluginException
Returns the trace object.

findFileInReportsPath

public java.lang.String findFileInReportsPath(java.lang.String filename)
                                       throws PluginException
Searches for a file named in paths specified by the REPORTS_PATH environment variable. If no such file is found, returns null.

For example:
report.findFileInREPORTS_PATH("test.rdf")
will return
d:\orawin70\report70\demo\reqfiles\test.rdf


getLocale

public java.util.Locale getLocale()
                           throws PluginException

getPluginParam

public java.lang.String getPluginParam(java.lang.String name)
                                throws PluginException
Returns the named plugin parameter from the server configuration file.

showHelpContent

public void showHelpContent(java.lang.String helpSetID)
                     throws PluginException
Displays the help content.
Parameters:
helpSetID - The ID set by Iplugin.setHelpSetID().

showHelpTopic

public void showHelpTopic(java.lang.String helpSetID,
                          java.lang.String topicID)
                   throws PluginException
Displays the help topic. If no such topic is found, a generic "Help not found" topic is displayed.
Parameters:
helpSetID - The ID set by Iplugin.setHelpSetID().

getCommandLineArguments

public java.util.Hashtable getCommandLineArguments()
                                            throws PluginException
Returns the command line arguments.

getReportsDirectory

public java.lang.String getReportsDirectory()
                                     throws PluginException
Returns the Reports directory.

getConfigDirectory

public java.lang.String getConfigDirectory()
                                    throws PluginException
Returns the configuration directory.

getCacheDirectory

public java.lang.String getCacheDirectory()
                                   throws PluginException
Returns the cache directory.

getDTDDirectory

public java.lang.String getDTDDirectory()
                                 throws PluginException
Returns the DTD directory.

getOracleHome

public java.lang.String getOracleHome()
                               throws PluginException
Returns the ORACLE_HOME directory.

getServerDirectory

public java.lang.String getServerDirectory()
                                    throws PluginException
Returns the server directory.

getTemplateDirectory

public java.lang.String getTemplateDirectory()
                                      throws PluginException
Returns the template directory.

getTemporaryDirectory

public java.lang.String getTemporaryDirectory()
                                       throws PluginException
Returns the Reports temporary directory as defined by the REPORTS_TMP environment variable.

getTemporaryFile

public java.lang.String getTemporaryFile(java.lang.String basename)
                                  throws PluginException
Returns a unique temporary file in the Reports temporary directory defined by the REPORTS_TMP environment variable. This method only returns a unique filename; no file is created. You are responsible for removing this file when you are done with it.
Parameters:
basename - The basename for the temporary file. For ease in identifying who created a temporary file, it is recommended that you use the same basename as your help prefix. For example:
report.getTemporaryFile("XDS")
will return
d:\temp\XDS00501440

getVersion

public java.lang.String getVersion()
                            throws PluginException
Returns the Reports version.

Oracle Reports
Java API Reference

Copyright © 2003 Oracle Corporation. All Rights Reserved.