org.pentaho.reporting.engine.classic.core.layout.output
Class DefaultProcessingContext

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.layout.output.DefaultProcessingContext
All Implemented Interfaces:
ProcessingContext

public class DefaultProcessingContext
extends Object
implements ProcessingContext

Creation-Date: 08.04.2007, 15:46:44

Author:
Thomas Morgner

Constructor Summary
DefaultProcessingContext()
          This constructor exists for test-case use only.
DefaultProcessingContext(org.pentaho.reporting.libraries.base.config.Configuration configuration, ReportEnvironment reportEnvironment)
          Deprecated. 
DefaultProcessingContext(MasterReport report)
           
DefaultProcessingContext(OutputProcessorMetaData outputProcessorMetaData, LayoutSupport layoutSupport, 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)
           
DefaultProcessingContext(ResourceBundleFactory resourceBundleFactory, org.pentaho.reporting.libraries.base.config.Configuration configuration)
          Deprecated. 
DefaultProcessingContext(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)
          Deprecated. 
DefaultProcessingContext(org.pentaho.reporting.libraries.resourceloader.ResourceKey contentBase)
          Deprecated. 
 
Method Summary
 int getCompatibilityLevel()
           
 org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
          Returns the initial master-report's configuration.
 org.pentaho.reporting.libraries.resourceloader.ResourceKey getContentBase()
          Returns the content base of the initial master-report.
 org.pentaho.reporting.libraries.docbundle.DocumentMetaData getDocumentMetaData()
          Returns the outermost master-report's document meta-data.
 ReportEnvironment getEnvironment()
           
 String getExportDescriptor()
          Returns the export descriptor from the output-target.
 org.pentaho.reporting.libraries.formula.FormulaContext getFormulaContext()
          Returns the formula context of this report process.
 LayoutSupport getLayoutSupport()
          Returns the layout support.
 OutputProcessorMetaData getOutputProcessorMetaData()
           
 int getProcessingLevel()
          The processing-level is used for dependency tracking.
 int getProgressLevel()
          Returns the current progress level.
 int getProgressLevelCount()
          Returns the total number of different activities the report will process.
 ResourceBundleFactory getResourceBundleFactory()
          The resource-bundle factory encapsulates all locale specific resources and provides a system-independent way to create Resource-Bundles.
 org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
          Returns the initial master-report's resource manager.
 boolean isPrepareRun()
          Returns true, if the current processing run is a prepare-run.
 void setPrepareRun(boolean prepareRun)
           
 void setProcessingLevel(int processingLevel)
           
 void setProgressLevel(int progressLevel)
           
 void setProgressLevelCount(int progressLevelCount)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

@Deprecated
public DefaultProcessingContext(org.pentaho.reporting.libraries.resourceloader.ResourceKey contentBase)
Deprecated. 


DefaultProcessingContext

@Deprecated
public DefaultProcessingContext(org.pentaho.reporting.libraries.base.config.Configuration configuration,
                                           ReportEnvironment reportEnvironment)
Deprecated. 


DefaultProcessingContext

@Deprecated
public DefaultProcessingContext(ResourceBundleFactory resourceBundleFactory,
                                           org.pentaho.reporting.libraries.base.config.Configuration configuration)
Deprecated. 


DefaultProcessingContext

public DefaultProcessingContext(MasterReport report)
                         throws ReportProcessingException
Throws:
ReportProcessingException

DefaultProcessingContext

@Deprecated
public DefaultProcessingContext(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)
                         throws ReportProcessingException
Deprecated. 

Throws:
ReportProcessingException

DefaultProcessingContext

public DefaultProcessingContext(OutputProcessorMetaData outputProcessorMetaData,
                                LayoutSupport layoutSupport,
                                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 -
layoutSupport -
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)

getProcessingLevel

public int getProcessingLevel()
Description copied from interface: ProcessingContext
The processing-level is used for dependency tracking. A function that precomputes values should use this level value to determine its current activity.

Specified by:
getProcessingLevel in interface ProcessingContext
Returns:
the processing level.
See Also:
Expression.getDependencyLevel()

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.

getExportDescriptor

public String getExportDescriptor()
Description copied from interface: ProcessingContext
Returns the export descriptor from the output-target.

Specified by:
getExportDescriptor in interface ProcessingContext
Returns:
the export descriptor string.
See Also:
OutputProcessorMetaData.getExportDescriptor()

getOutputProcessorMetaData

public OutputProcessorMetaData getOutputProcessorMetaData()
Specified by:
getOutputProcessorMetaData in interface ProcessingContext

getLayoutSupport

public LayoutSupport getLayoutSupport()
Description copied from interface: ProcessingContext
Returns the layout support. The layout support allows functions to do basic layouting.

Specified by:
getLayoutSupport in interface ProcessingContext
Returns:
the layout support.

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.

getEnvironment

public ReportEnvironment getEnvironment()
Specified by:
getEnvironment in interface ProcessingContext

getCompatibilityLevel

public int getCompatibilityLevel()
Specified by:
getCompatibilityLevel in interface ProcessingContext