Class DefaultProcessingContext

    • Constructor Detail

      • DefaultProcessingContext

        public DefaultProcessingContext()
        This constructor exists for test-case use only. If you use this to process a real report, most of the settings of the report will be ignored and your export will not work as expected.
      • DefaultProcessingContext

        public DefaultProcessingContext​(OutputProcessorMetaData outputProcessorMetaData,
                                        ResourceBundleFactory resourceBundleFactory,
                                        org.pentaho.reporting.libraries.base.config.Configuration configuration,
                                        org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager,
                                        org.pentaho.reporting.libraries.resourceloader.ResourceKey contentBase,
                                        org.pentaho.reporting.libraries.docbundle.DocumentMetaData metaData,
                                        ReportEnvironment environment,
                                        int compatibilityLevel)
                                 throws ReportProcessingException
        Parameters:
        outputProcessorMetaData -
        resourceBundleFactory -
        configuration -
        resourceManager -
        contentBase - the content base, from where to load additional resources. (Can be null).
        metaData -
        Throws:
        ReportProcessingException
    • Method Detail

      • getResourceManager

        public org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
        Description copied from interface: ProcessingContext
        Returns the initial master-report's resource manager. The resource manager can be used to load external resources in a system-independent way.
        Specified by:
        getResourceManager in interface ProcessingContext
        Returns:
        the master-report's resourcemanager.
      • getContentBase

        public org.pentaho.reporting.libraries.resourceloader.ResourceKey getContentBase()
        Description copied from interface: ProcessingContext
        Returns the content base of the initial master-report. The content-base resource-key can be used to resolve relative paths.
        Specified by:
        getContentBase in interface ProcessingContext
        Returns:
        the initial content base or null, if there is no content-base.
      • getProgressLevel

        public int getProgressLevel()
        Description copied from interface: ProcessingContext
        Returns the current progress level. The number itself has no meaning and is only used to measure the progress of the report processing.
        Specified by:
        getProgressLevel in interface ProcessingContext
        Returns:
        the progress level.
      • setProgressLevel

        public void setProgressLevel​(int progressLevel)
      • getProgressLevelCount

        public int getProgressLevelCount()
        Description copied from interface: ProcessingContext
        Returns the total number of different activities the report will process.
        Specified by:
        getProgressLevelCount in interface ProcessingContext
        Returns:
        the number of different progress levels.
      • setProgressLevelCount

        public void setProgressLevelCount​(int progressLevelCount)
      • setProcessingLevel

        public void setProcessingLevel​(int processingLevel)
      • getFormulaContext

        public org.pentaho.reporting.libraries.formula.FormulaContext getFormulaContext()
        Description copied from interface: ProcessingContext
        Returns the formula context of this report process. The formula context is required to evaluate inline expression with LibFormula.
        Specified by:
        getFormulaContext in interface ProcessingContext
        Returns:
        the current formula context.
      • setPrepareRun

        public void setPrepareRun​(boolean prepareRun)
      • isPrepareRun

        public boolean isPrepareRun()
        Description copied from interface: ProcessingContext
        Returns true, if the current processing run is a prepare-run. A prepare run does not generate content, but will be needed to compute the layout. This flag can be used to possibly optimize the content computation. If in doubt on how to interpret the flag, then please ignore this flag. The process may be slightly slower, but at least it will work all the time.
        Specified by:
        isPrepareRun in interface ProcessingContext
        Returns:
        true, if this is a prepare-run, false if this is a content processing run.
      • setOutputProcessorMetaData

        protected void setOutputProcessorMetaData​(OutputProcessorMetaData outputProcessorMetaData)
      • getResourceBundleFactory

        public ResourceBundleFactory getResourceBundleFactory()
        Description copied from interface: ProcessingContext
        The resource-bundle factory encapsulates all locale specific resources and provides a system-independent way to create Resource-Bundles. This returns the initial master-report's resource-bundle factory.
        Specified by:
        getResourceBundleFactory in interface ProcessingContext
        Returns:
        the report's resource-bundle factory.
      • getConfiguration

        public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
        Description copied from interface: ProcessingContext
        Returns the initial master-report's configuration. The initial configuration is used for all subreports.
        Specified by:
        getConfiguration in interface ProcessingContext
        Returns:
        the global report configuration.
      • getDocumentMetaData

        public org.pentaho.reporting.libraries.docbundle.DocumentMetaData getDocumentMetaData()
        Returns the outermost master-report's document meta-data.
        Specified by:
        getDocumentMetaData in interface ProcessingContext
        Returns:
        the document meta-data.