Package org.pentaho.reporting.engine.classic.core.states

Examples of org.pentaho.reporting.engine.classic.core.states.PerformanceMonitorContext


   * @throws org.pentaho.reporting.engine.classic.core.ReportProcessingException
   */
  protected MasterReport materialize(final MasterReport report,
                                            final ReportPreProcessor processor) throws ReportProcessingException
  {
    final PerformanceMonitorContext pmc = new NoOpPerformanceMonitorContext();
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report), pmc);
    final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), false);
View Full Code Here


  }

  protected MasterReport materializePreData(MasterReport report, ReportPreProcessor reportPreProcessor)
      throws ReportProcessingException
  {
    final PerformanceMonitorContext pmc = new NoOpPerformanceMonitorContext();
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report), pmc);
    return reportPreProcessor.performPreDataProcessing(report, flowController);
View Full Code Here

    else
    {
      parameterValues = new ReportParameterValues();
    }

    final PerformanceMonitorContext rawPerformanceMonitorContext =
        ClassicEngineBoot.getInstance().getObjectFactory().get(PerformanceMonitorContext.class);
    this.performanceMonitorContext = new InternalPerformanceMonitorContext(rawPerformanceMonitorContext);
    final InitialLayoutProcess layoutProcess = new InitialLayoutProcess(outputFunction, performanceMonitorContext);

    this.reportInstancesShareConnection = "true".equals(processingContext.getConfiguration().getConfigProperty
View Full Code Here

  }

  public static SubReport materialize(final SubReport report,
                                      final WizardProcessor processor) throws ReportProcessingException
  {
    final PerformanceMonitorContext performanceMonitorContext =
        ClassicEngineBoot.getInstance().getObjectFactory().get(PerformanceMonitorContext.class);
    try
    {
      final DefaultProcessingContext processingContext;
      final MasterReport masterReport = DesignTimeUtil.getMasterReport(report);
      if (masterReport != null)
      {
        processingContext = new DefaultProcessingContext(masterReport);
      }
      else
      {
        processingContext = new DefaultProcessingContext();
      }

      final DataSchemaDefinition definition = report.getDataSchemaDefinition();
      final DefaultFlowController flowController =
          new DefaultFlowController(processingContext, definition,
              StateUtilities.computeParameterValueSet(report), performanceMonitorContext);
      final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), isCacheEnabled(report));
      dataFactory.initialize(new ProcessingDataFactoryContext(processingContext, dataFactory));

      try
      {
        final DefaultFlowController postQueryFlowController = flowController.performDesignTimeQuery
            (dataFactory, report.getQuery(), report.getQueryLimit(),
                report.getQueryTimeout(), flowController.getMasterRow().getResourceBundleFactory());

        final Object originalEnable =
            report.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ENABLE);
        report.setAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ENABLE, Boolean.TRUE);
        final SubReport subReport = processor.performPreProcessing(report, postQueryFlowController);
        subReport.setAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ENABLE, originalEnable);
        return subReport;
      }
      finally
      {
        dataFactory.close();
      }
    }
    finally
    {
      performanceMonitorContext.close();
    }
  }
View Full Code Here


  public static MasterReport materialize(final MasterReport report,
                                         final WizardProcessor processor) throws ReportProcessingException
  {
    final PerformanceMonitorContext performanceMonitorContext =
        ClassicEngineBoot.getInstance().getObjectFactory().get(PerformanceMonitorContext.class);
    try
    {
      final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);
      final DataSchemaDefinition definition = report.getDataSchemaDefinition();
      final DefaultFlowController flowController = new DefaultFlowController(processingContext,
          definition, StateUtilities.computeParameterValueSet(report), performanceMonitorContext);
      final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), isCacheEnabled(report));
      dataFactory.initialize(new ProcessingDataFactoryContext(processingContext, dataFactory));

      try
      {
        final DefaultFlowController postQueryFlowController = flowController.performDesignTimeQuery
            (dataFactory, report.getQuery(), report.getQueryLimit(),
                report.getQueryTimeout(), flowController.getMasterRow().getResourceBundleFactory());

        final Object originalEnable =
            report.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ENABLE);
        report.setAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ENABLE, Boolean.TRUE);
        final MasterReport masterReport = processor.performPreProcessing(report, postQueryFlowController);
        masterReport.setAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ENABLE, originalEnable);

        masterReport.setName(null);
        DesignTimeUtil.resetDocumentMetaData(masterReport);
        return masterReport;
      }
      finally
      {
        dataFactory.close();
      }
    }
    finally
    {
      performanceMonitorContext.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.states.PerformanceMonitorContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.