Oracle Reports
Java API Reference
10g Release 2 (10.1.2)
B14049-01

oracle.reports.plugin.definition
Class ReportContext

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

public class ReportContext
extends java.lang.Object

Reports context object. The context object provides environment information such Reports path, locale, and etc.


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

Constructor Summary
ReportContext(oracle.reports.definition.RWReport rwobj, Trace trace)
Constructor NOTE: Plugin must never try to create any Reports objects by itself.

Method Summary
java.lang.String findFileInReportsPath(java.lang.String filename)
Search for file named in paths specified by REPORTS_PATH environment variable If no such file is found, return null.
java.lang.String getCacheDirectory()
Returns cache directory
java.util.Hashtable getCommandLineArguments()
Returns the command line arguments
java.lang.String getConfigDirectory()
Returns config directory
java.lang.String getDTDDirectory()
Returns DTD directory
java.util.Locale getLocale()
java.lang.String getOracleHome()
Returns ORACLE_HOME directory
java.lang.String getPluginParam(java.lang.String name)
Get the named plugin param from the server config file
java.lang.String getReportsDirectory()
Returns the Reports directory
java.lang.String getServerDirectory()
Returns server directory
java.lang.String getTemplateDirectory()
Returns template directory
java.lang.String getTemporaryDirectory()
Returns Reports temporary directory as defined by REPORTS_TMP environment variable
java.lang.String getTemporaryFile(java.lang.String basename)
Returns a unique temporary file in Reports temporary directory defined by REPORTS_TMP environment variable This method only returns a unique filename for you, no file is created.
Trace getTrace()
Returns trace object
java.lang.String getVersion()
Returns Reports version
boolean isInsideReportsBuilder()
Returns true if current context is running inside Reports Builder.
boolean isUIAllowedNow()
Returns true if Plugin is allowed to raise its UI (say, connect dialog) at this moment.
void showHelpContent(java.lang.String helpSetID)
Displays the help content helpSetID is the id set by Iplugin.setHelpSetID()
void showHelpTopic(java.lang.String helpSetID, java.lang.String topicID)
Displays the help topic If no such topic is found, a generic "Help not found" topic is displayed.

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: Plugin must never try to create any Reports objects by itself.

Method Detail

isInsideReportsBuilder

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

isUIAllowedNow

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

getTrace

public Trace getTrace()
               throws PluginException
Returns trace object

findFileInReportsPath

public java.lang.String findFileInReportsPath(java.lang.String filename)
                                       throws PluginException
Search for file named in paths specified by REPORTS_PATH environment variable If no such file is found, return null. For example: report.findFileInREPORTS_PATH("test.rdf") will return you 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
Get the named plugin param from the server config file

showHelpContent

public void showHelpContent(java.lang.String helpSetID)
                     throws PluginException
Displays the help content helpSetID is 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. helpSetID is 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 config directory

getCacheDirectory

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

getDTDDirectory

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

getOracleHome

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

getServerDirectory

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

getTemplateDirectory

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

getTemporaryDirectory

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

getTemporaryFile

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

getVersion

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

Oracle Reports
Java API Reference

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