org.outerj.xreporter.report.definition
Interface ExecutionContext

All Known Implementing Classes:
GroupingExecutionContext, ReportImpl, Step.StepExecutionContext

public interface ExecutionContext

This is the interface through which other parts of XReporter (such as the report defintion classes) get access to report instance data. There are actually two implementations of this interface: one is ReportImpl itself, the other one is Step. If the ExecutionContext is a Step, some methods will behave differently, e.g. only input fields from the current or previous steps will be available. The creation of temporary tables is also tracked on a per-step basis. Most other methods are simply delegated to ReportImpl.


Method Summary
 Columns getColumns()
          Provides access to the Columns configuration.
 DataSource getDataSource()
          Gets the data source of the report instance.
 DataSourceManager getDataSourceManager()
          Gets the data source manager.
 ExpressionContext getExpressionContext()
          Gets the context for evaluating expressions.
 java.lang.String getHostName()
          Return the host name of the server instance this report is running on.
 InputField getInputField(java.lang.String name)
          If the ExecutionContext is a Step, then this will only provide access to InputField's of the current or previous steps.
 java.lang.String getListenerName()
          Return the logical name of the server instance this report is running on.
 java.lang.String getOrderBySql()
          Returns the sql for the currently selected orderby choice, or null if no orderby is configured.
 int getPort()
          Return the port number of the server instance this report is running on.
 Qbe getQbe()
          Provides access to the QBE (Query By Example) configuration.
 java.lang.String getReportDefinitionId()
           
 java.lang.String getReportId()
          Returns the id of the report instance.
 ResourceHandle getResourceHandle()
           
 java.lang.String getTemporaryTableName(java.lang.String name)
          Constructs a temporary table name.
 User getUser()
           
 void registerTemporaryTableName(java.lang.String name)
          Registers a temporary table name for automatic cleanup.
 

Method Detail

getListenerName

public java.lang.String getListenerName()
Return the logical name of the server instance this report is running on.


getHostName

public java.lang.String getHostName()
Return the host name of the server instance this report is running on.


getPort

public int getPort()
Return the port number of the server instance this report is running on.


getInputField

public InputField getInputField(java.lang.String name)
If the ExecutionContext is a Step, then this will only provide access to InputField's of the current or previous steps.


getTemporaryTableName

public java.lang.String getTemporaryTableName(java.lang.String name)
Constructs a temporary table name. You should also call registerTemporaryTableName(java.lang.String) if this table should be cleaned up automatically by XReporter.


registerTemporaryTableName

public void registerTemporaryTableName(java.lang.String name)
Registers a temporary table name for automatic cleanup. This will only work when the ExecutionContext is a Step. Temporary tables will be cleaned up either if the report instance expires, or if the user goes back to a previous step.


getDataSource

public DataSource getDataSource()
Gets the data source of the report instance.


getDataSourceManager

public DataSourceManager getDataSourceManager()
Gets the data source manager. This allows to access other data sources then the one against which the report instance works.


getOrderBySql

public java.lang.String getOrderBySql()
Returns the sql for the currently selected orderby choice, or null if no orderby is configured.


getQbe

public Qbe getQbe()
Provides access to the QBE (Query By Example) configuration.


getColumns

public Columns getColumns()
Provides access to the Columns configuration.


getExpressionContext

public ExpressionContext getExpressionContext()
Gets the context for evaluating expressions. This differs between ReportImpl and Step, because in step expression variables will only be resolved against parameters from previous steps.


getReportId

public java.lang.String getReportId()
Returns the id of the report instance.


getReportDefinitionId

public java.lang.String getReportDefinitionId()

getResourceHandle

public ResourceHandle getResourceHandle()

getUser

public User getUser()