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

Examples of org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController


  }

  public ProcessState advance(final ProcessState state) throws ReportProcessingException
  {
    final ProcessState next = state.deriveForAdvance();
    final DefaultFlowController flowController = next.getFlowController().endCrosstabMode();
    next.setFlowController(flowController);
    return next;
  }
View Full Code Here


  }

  public ProcessState commit(final ProcessState next) throws ReportProcessingException
  {
    next.leaveGroup();
    final DefaultFlowController fc = next.getFlowController();
    final boolean advanceRequested = fc.isAdvanceRequested();
    final boolean advanceable = fc.getMasterRow().isAdvanceable();
    if (isRootGroup(next))
    {
      // there is no parent group. So if there is more data, print the next header for this group,
      // else print the report-footer and finish the report processing.
      if (advanceRequested && advanceable)
      {
        final DefaultFlowController cfc = fc.performCommit();
        next.setFlowController(cfc);
        next.setAdvanceHandler(BeginCrosstabHandler.HANDLER);
        return next;
      }
      else
      {
        next.setAdvanceHandler(ReportFooterHandler.HANDLER);
        return next;
      }
    }

    if (advanceRequested == false || advanceable == false)
    {
      // This happens for empty - reports. Empty-Reports are never advanceable, therefore we can
      // reach an non-advance state where inner group-footers are printed.
      next.setAdvanceHandler(EndGroupBodyHandler.HANDLER);
      return next;
    }

    // This group is not the outer-most group ..
    final Group group = next.getReport().getGroup(next.getCurrentGroupIndex());
    final DefaultFlowController cfc = fc.performCommit();
    if (ProcessState.isLastItemInGroup(group, fc.getMasterRow(), cfc.getMasterRow()))
    {
      // continue with an other EndGroup-State ...
      next.setAdvanceHandler(EndGroupBodyHandler.HANDLER);
      return next;
    }
View Full Code Here

      {
        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);
View Full Code Here

        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);
View Full Code Here

    final MasterReport report = new MasterReport();
    report.setAttribute(AttributeNames.Wizard.NAMESPACE, "wizard-spec", wizardSpecification);

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DefaultFlowController flowController = new DefaultFlowController
        (processingContext, report.getDataSchemaDefinition(), new ReportParameterValues(),
            new NoOpPerformanceMonitorContext());

    final WizardProcessor processor = new WizardProcessor();
    final MasterReport masterReport = processor.performPreProcessing(report, flowController);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController

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.