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 data set for preview, searching a report, etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeLogLevel
(Level newLevel) Change the log level to newLevel.createDataExtractionTask
(IReportDocument reportDocument) Creates a task that allows data extraction from a report document.createEngineTask
(String taskName) create an engine taskcreateGetParameterDefinitionTask
(IReportRunnable reportRunnable) Creates an engine task for obtaining report parameter definitions.createGetParameterDefinitionTask
(IRunnable reportRunnable) Creates an engine task for obtaining report parameter definitions.createRenderTask
(IReportDocument reportDocument) Creates a task that renders the report to a specific output format.createRenderTask
(IReportDocument reportDocument, IReportRunnable reportRunnable) Create a task that renders the report to a specific output format.createRunAndRenderTask
(IReportRunnable reportRunnable) Creates an engine task for running and rendering report directly to output format.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.Returns the engine configuration object.Returns data extraction extension information.Return all the emitter information which BIRT Engine can load.Get the logger used by report engine.getMIMEType
(String format) The MIME type for the specific formatted supported by the extension.Get the root scope used by the engine.String[]
Returns all supported output formats through BIRT engine emitter extensions.get the version of BIRTopenDocumentWriter
(org.eclipse.birt.core.archive.compound.IArchiveFile file) creates a document writer that can write this archive fileopenReportDesign
(InputStream designStream) Opens a report design stream and creates a report design runnable.openReportDesign
(String designName) Opens a report design file and creates a report design runnable.openReportDesign
(String name, InputStream designStream) Opens a report design stream and creates a report design runnable.openReportDesign
(String name, InputStream designStream, Map options) Open the report design and return the runnable.openReportDesign
(String name, InputStream designStream, org.eclipse.birt.report.model.api.IResourceLocator locator) Opens a report design stream and creates a report design runnable.openReportDesign
(String designName, org.eclipse.birt.report.model.api.IResourceLocator locator) Opens a report design file and creates a report design runnable.openReportDesign
(org.eclipse.birt.report.model.api.ReportDesignHandle designHandle) Opens a report designHandle and creates a report design runnable.openReportDocument
(String fileName) Opens a report document and returns an IReportDocument object, from which further information can be retrieved.openReportDocument
(String systemId, String fileName) Opens a report document and returns an IReportDocument object, from which further information can be retrieved.openReportDocument
(String systemId, String fileName, Map options) Opens a report document and returns an IReportDocument object, from which further information can be retrieved.openReportDocument
(String systemId, String fileName, org.eclipse.birt.report.model.api.IResourceLocator locator) Opens a report document and returns an IReportDocument object, from which further information can be retrieved.openReportDocument
(String systemId, org.eclipse.birt.core.archive.IDocArchiveReader archiveReader, Map options) Opens a report document and returns an IReportDocument object, from which further information can be retrieved.openReportDocument
(String fileName, org.eclipse.birt.report.model.api.IResourceLocator locator) Opens a report document and returns an IReportDocument object, from which further information can be retrieved.void
Set the logger used the engine.void
shutdown()
Deprecated.Use destroy() instead.
-
Method Details
-
getRootScope
Object getRootScope()Get the root scope used by the engine.- Returns:
-
changeLogLevel
Change the log level to newLevel.- Parameters:
newLevel
- - new log level
-
setLogger
Set the logger used the engine.- Parameters:
logger
-
-
getLogger
Logger getLogger()Get the logger used by report engine.- Returns:
- the logger used by the report engine
-
getConfig
EngineConfig getConfig()Returns the engine configuration object.- Returns:
- the engine configuration object
-
openReportDesign
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
IReportRunnable openReportDesign(String designName, org.eclipse.birt.report.model.api.IResourceLocator locator) 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 filelocator
- the resource locator used to locate files referenced in the design- Returns:
- a report design runnable object
- Throws:
EngineException
- throwed when the input file does not exist, or the file is invalid
-
openReportDesign
IReportRunnable openReportDesign(org.eclipse.birt.report.model.api.ReportDesignHandle designHandle) throws EngineException Opens a report designHandle 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:
designHandle
-- Returns:
- a report design runnable object
- Throws:
EngineException
-
openReportDesign
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
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 runnable object.- Parameters:
name
- system id of the report designdesignStream
- input stream of the report design- 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
IReportRunnable openReportDesign(String name, InputStream designStream, org.eclipse.birt.report.model.api.IResourceLocator locator) 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 runnable object.- Parameters:
name
- system id of the report designdesignStream
- input stream of the report designlocator
- the resource locator used to locate files referenced in the design- 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
IReportRunnable openReportDesign(String name, InputStream designStream, Map options) throws EngineException Open the report design and return the runnable.- Parameters:
name
- system id of the report design.designStream
- stream of the report desgin.options
- options used to parse the design.- Returns:
- a report design runnable object
- Throws:
EngineException
- See Also:
-
ModelOptions
-
createRunAndRenderTask
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
Creates an engine task for obtaining report parameter definitions.- Parameters:
reportRunnable
- the runnable report design object- Returns:
- a run and render report task
-
createGetParameterDefinitionTask
Creates an engine task for obtaining report parameter definitions.- Parameters:
reportRunnable
- the runnable report design object- Returns:
- a GetParameterDefinitionTask
-
getSupportedFormats
String[] getSupportedFormats()Returns all supported output formats through BIRT engine emitter extensions.- Returns:
- all supported output formats through BIRT engine emitter extensions
-
getEmitterInfo
EmitterInfo[] getEmitterInfo()Return all the emitter information which BIRT Engine can load.- Returns:
- the emitter information
-
getDataExtractionFormatInfo
DataExtractionFormatInfo[] getDataExtractionFormatInfo()Returns data extraction extension information.- Returns:
- the data extraction extension information
-
getMIMEType
The MIME type for the specific formatted supported by the extension.- Parameters:
format
- the output formatextensionID
- the extension ID, which could be null if only one plugin supports the output format- Returns:
- the MIME type for the specific formatted supported by the extension.
-
destroy
void destroy()Shut down the engine, release all the resources. -
createEngineTask
create an engine task- Parameters:
taskName
- the extension name to identify a task- Returns:
- an engine task
- Throws:
EngineException
-
createRunTask
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
Create a task that renders the report to a specific output format.- Parameters:
reportDocument
- a handle to an IReportDocument objectreportRunnable
- the runnable report design object- Returns:
- a task that renders a report to an output format
-
createRenderTask
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
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
IReportDocument openReportDocument(String fileName, org.eclipse.birt.report.model.api.IResourceLocator locator) 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.locator
- the resource locator used to locate files referenced in the design- 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
Opens a report document and returns an IReportDocument object, from which further information can be retrieved.- Parameters:
systemId
- the system id the opend document. It is used to access the resources with relative path in the report document. If it is NULL, a saved one is used.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 valid report document
-
openReportDocument
IReportDocument openReportDocument(String systemId, String fileName, org.eclipse.birt.report.model.api.IResourceLocator locator) throws EngineException Opens a report document and returns an IReportDocument object, from which further information can be retrieved.- Parameters:
systemId
- the system id the opend document. It is used to access the resources with relative path in the report document. If it is NULL, a saved one is used.fileName
- the report document name. report document is an archive in BIRT.locator
- the resource locator used to locate files referenced in the design- 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
IReportDocument openReportDocument(String systemId, String fileName, Map options) throws EngineException Opens a report document and returns an IReportDocument object, from which further information can be retrieved.- Parameters:
systemId
- the system id the opend document. It is used to access the resources with relative path in the report document. If it is NULL, a saved one is used.fileName
- the report document name. report document is an archive in BIRT.options
- Map defins the options used to parse the design file.- 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
IReportDocument openReportDocument(String systemId, org.eclipse.birt.core.archive.IDocArchiveReader archiveReader, Map options) throws EngineException Opens a report document and returns an IReportDocument object, from which further information can be retrieved.- Parameters:
systemId
- the system id the opend document. It is used to access the resources with relative path in the report document. If it is NULL, a saved one is used.archiveReader
- a report archive for readingoptions
- Map defins the options used to parse the design file.- 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
-
createDataExtractionTask
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
-
createDatasetPreviewTask
- Throws:
EngineException
-
shutdown
Deprecated.Use destroy() instead.Shut down the engine, release all the resources. -
openDocumentWriter
IDocumentWriter openDocumentWriter(org.eclipse.birt.core.archive.compound.IArchiveFile file) throws EngineException creates a document writer that can write this archive file- Parameters:
file
- the archive file- Returns:
- a document writer of this archive file
- Throws:
EngineException
-
getVersion
String getVersion()get the version of BIRT- Returns:
- the version of BIRT
-