org.eclipse.birt.report.engine.api
Interface IReportEngine

All Known Implementing Classes:
ReportEngine

public interface IReportEngine

A report engine provides an entry point for reporting functionalities. It is where the report generation and rendering process are globally customized. It is also the place where engine statistics are collected. Through report engine, reports can be generated and rendered to different output formats. Queries can also be executed for preview purpose without involving a full report generation.

Engine supports running different types of tasks. Example tasks include running a report design to generate a report instance file, rendering a report instance to output format, running a report directly to output, running a dataset for preview, seaching a report, etc.


Method Summary
 void changeLogLevel(java.util.logging.Level newLevel)
          Change the log level to newLevel
 IDataExtractionTask createDataExtractionTask(IReportDocument reportDocument)
          creates a task that allows data extraction from a report document
 IGetParameterDefinitionTask createGetParameterDefinitionTask(IReportRunnable reportRunnable)
          creates an engine task for obtaining report parameter definitions
 IRenderTask createRenderTask(IReportDocument reportDocument)
          creates a task that renders the report to a specific output format.
 IRunAndRenderTask createRunAndRenderTask(IReportRunnable reportRunnable)
          creates an engine task for running and rendering report directly to output format
 IRunTask createRunTask(IReportRunnable reportRunnable)
          creates a task to run a report to generate a report document
 void destroy()
          shut down the engine, release all the resources.
 EngineConfig getConfig()
          returns the engine configuration object
 EmitterInfo[] getEmitterInfo()
          Return all the emitter information which BIRT Engine can load.
 java.util.logging.Logger getLogger()
          get the logger used by report engine
 java.lang.String getMIMEType(java.lang.String format)
          the MIME type for the specific formatted supported by the extension.
 java.lang.Object getRootScope()
          get the root scope used by the engine
 java.lang.String[] getSupportedFormats()
          returns all supported output formats through BIRT engine emitter extensions
 IReportRunnable openReportDesign(java.io.InputStream designStream)
          opens a report design stream and creates a report design runnable.
 IReportRunnable openReportDesign(java.lang.String designName)
          opens a report design file and creates a report design runnable.
 IReportRunnable openReportDesign(java.lang.String name, java.io.InputStream designStream, IResourceLocator locator)
           
 IReportRunnable openReportDesign(java.lang.String designName, IResourceLocator locator)
           
 IReportDocument openReportDocument(java.lang.String fileName)
          opens a report document and returns an IReportDocument object, from which further information can be retrieved.
 IReportDocument openReportDocument(java.lang.String fileName, IResourceLocator locator)
           
 IReportDocument openReportDocument(java.lang.String systemId, java.lang.String fileName, IResourceLocator locator)
           
 void setLogger(java.util.logging.Logger logger)
          set the logger used the engine.
 void shutdown()
          Deprecated.  
 

Method Detail

getRootScope

public java.lang.Object getRootScope()
get the root scope used by the engine

Returns:

changeLogLevel

public void changeLogLevel(java.util.logging.Level newLevel)
Change the log level to newLevel

Parameters:
newLevel - - new log level

setLogger

public void setLogger(java.util.logging.Logger logger)
set the logger used the engine.

Parameters:
logger -

getLogger

public java.util.logging.Logger getLogger()
get the logger used by report engine

Returns:
the logger used by the report engine

getConfig

public EngineConfig getConfig()
returns the engine configuration object

Returns:
the engine configuration object

openReportDesign

public IReportRunnable openReportDesign(java.lang.String designName)
                                 throws EngineException
opens a report design file and creates a report design runnable. From the ReportRunnable object, embedded images and parameter definitions can be retrieved. Constructing an engine task requires a report design runnable object.

Parameters:
designName - the full path of the report design file
Returns:
a report design runnable object
Throws:
EngineException - throwed when the input file does not exist, or the file is invalid

openReportDesign

public IReportRunnable openReportDesign(java.lang.String designName,
                                        IResourceLocator locator)
                                 throws EngineException
Throws:
EngineException

openReportDesign

public IReportRunnable openReportDesign(java.io.InputStream designStream)
                                 throws EngineException
opens a report design stream and creates a report design runnable. From the ReportRunnable object, embedded images and parameter definitions can be retrieved. Constructing an engine task requires a report design runnableobject.

Parameters:
designStream - the report design input stream
Returns:
a report design runnable object
Throws:
EngineException - throwed when the input stream is null, or the stream does not yield a valid report design

openReportDesign

public IReportRunnable openReportDesign(java.lang.String name,
                                        java.io.InputStream designStream,
                                        IResourceLocator locator)
                                 throws EngineException
Throws:
EngineException

createRunAndRenderTask

public IRunAndRenderTask createRunAndRenderTask(IReportRunnable reportRunnable)
creates an engine task for running and rendering report directly to output format

Parameters:
reportRunnable - the runnable report design object
Returns:
a run and render report task

createGetParameterDefinitionTask

public IGetParameterDefinitionTask createGetParameterDefinitionTask(IReportRunnable reportRunnable)
creates an engine task for obtaining report parameter definitions

Parameters:
reportRunnable - the runnable report design object
Returns:
a run and render report task

getSupportedFormats

public java.lang.String[] getSupportedFormats()
returns all supported output formats through BIRT engine emitter extensions

Returns:
all supported output formats through BIRT engine emitter extensions

getEmitterInfo

public EmitterInfo[] getEmitterInfo()
Return all the emitter information which BIRT Engine can load.

Returns:
the emitter information

getMIMEType

public java.lang.String getMIMEType(java.lang.String format)
the MIME type for the specific formatted supported by the extension.

Parameters:
format - the output format
Returns:
the MIME type for the specific formatted supported by the extension.

destroy

public void destroy()
shut down the engine, release all the resources.


createRunTask

public IRunTask createRunTask(IReportRunnable reportRunnable)
creates a task to run a report to generate a report document

Parameters:
reportRunnable - the runnable report design object
Returns:
a task that runs the report

createRenderTask

public IRenderTask createRenderTask(IReportDocument reportDocument)
creates a task that renders the report to a specific output format.

Parameters:
reportDocument - a handle to an IReportDocument object
Returns:
a task that renders a report to an output format

openReportDocument

public IReportDocument openReportDocument(java.lang.String fileName)
                                   throws EngineException
opens a report document and returns an IReportDocument object, from which further information can be retrieved.

Parameters:
fileName - the report document name. report document is an archive in BIRT.
Returns:
A handle to the report document
Throws:
EngineException - throwed when the report document archive does not exist, or the file is not a valud report document

openReportDocument

public IReportDocument openReportDocument(java.lang.String fileName,
                                          IResourceLocator locator)
                                   throws EngineException
Throws:
EngineException

openReportDocument

public IReportDocument openReportDocument(java.lang.String systemId,
                                          java.lang.String fileName,
                                          IResourceLocator locator)
                                   throws EngineException
Throws:
EngineException

createDataExtractionTask

public IDataExtractionTask createDataExtractionTask(IReportDocument reportDocument)
creates a task that allows data extraction from a report document

Parameters:
reportDocument - a handle to an IReportDocument object
Returns:
a task that renders a report to an output format

shutdown

public void shutdown()
Deprecated.  

shut down the engine, release all the resources.



Copyright © 2005 Actuate Corp. All rights reserved.