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 Detail

      • getRootScope

        java.lang.Object getRootScope()
        Get the root scope used by the engine.
        Returns:
      • changeLogLevel

        void changeLogLevel​(java.util.logging.Level newLevel)
        Change the log level to newLevel.
        Parameters:
        newLevel - - new log level
      • setLogger

        void setLogger​(java.util.logging.Logger logger)
        Set the logger used the engine.
        Parameters:
        logger -
      • getLogger

        java.util.logging.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

        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

        IReportRunnable openReportDesign​(java.lang.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 file
        locator - 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

        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

        IReportRunnable openReportDesign​(java.lang.String name,
                                         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 runnable object.
        Parameters:
        name - system id of the report design
        designStream - 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​(java.lang.String name,
                                         java.io.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 design
        designStream - input stream of the report design
        locator - 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​(java.lang.String name,
                                         java.io.InputStream designStream,
                                         java.util.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

        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

        IGetParameterDefinitionTask createGetParameterDefinitionTask​(IRunnable reportRunnable)
        Creates an engine task for obtaining report parameter definitions.
        Parameters:
        reportRunnable - the runnable report design object
        Returns:
        a run and render report task
      • createGetParameterDefinitionTask

        IGetParameterDefinitionTask createGetParameterDefinitionTask​(IReportRunnable reportRunnable)
        Creates an engine task for obtaining report parameter definitions.
        Parameters:
        reportRunnable - the runnable report design object
        Returns:
        a GetParameterDefinitionTask
      • getSupportedFormats

        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

        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

        java.lang.String getMIMEType​(java.lang.String format)
        The MIME type for the specific formatted supported by the extension.
        Parameters:
        format - the output format
        extensionID - 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

        IEngineTask createEngineTask​(java.lang.String taskName)
                              throws EngineException
        create an engine task
        Parameters:
        taskName - the extension name to identify a task
        Returns:
        an engine task
        Throws:
        EngineException
      • createRunTask

        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

        IRenderTask createRenderTask​(IReportDocument reportDocument,
                                     IReportRunnable reportRunnable)
        Create a task that renders the report to a specific output format.
        Parameters:
        reportDocument - a handle to an IReportDocument object
        reportRunnable - the runnable report design object
        Returns:
        a task that renders a report to an output format
      • createRenderTask

        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

        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

        IReportDocument openReportDocument​(java.lang.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

        IReportDocument openReportDocument​(java.lang.String systemId,
                                           java.lang.String fileName)
                                    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.
        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​(java.lang.String systemId,
                                           java.lang.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​(java.lang.String systemId,
                                           java.lang.String fileName,
                                           java.util.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​(java.lang.String systemId,
                                           org.eclipse.birt.core.archive.IDocArchiveReader archiveReader,
                                           java.util.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 reading
        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
      • createDataExtractionTask

        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

        @Deprecated
        void 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

        java.lang.String getVersion()
        get the version of BIRT
        Returns:
        the version of BIRT