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

Examples of org.pentaho.reporting.engine.classic.core.ReportPreProcessor


    final AbstractReportDefinition report = (AbstractReportDefinition) element;
    final ReportPreProcessor[] processors = report.getPreProcessors();
    for (int i = 0; i < processors.length; i++)
    {
      final ReportPreProcessor processor = processors[i];
      // write the preprocessor ...
      try
      {
        xmlWriter.writeTag(BundleNamespaces.LAYOUT, "preprocessor",
            "class", processor.getClass().getName(), XmlWriterSupport.OPEN);
        writePreProcessor(xmlWriter, processor);
        xmlWriter.writeCloseTag();
      }
      catch (IntrospectionException e)
      {
View Full Code Here


  {
    final ReportPreProcessor[] processors = element.getPreProcessors();
    boolean hasWizardProcessor = false;
    for (int i = 0; i < processors.length; i++)
    {
      final ReportPreProcessor preProcessor = processors[i];
      if (preProcessor instanceof WizardProcessor)
      {
        hasWizardProcessor = true;
      }
    }
View Full Code Here

    final ReportPreProcessor[] processors = getAllPreProcessors(report);
    MasterReport fullReport = report;
    DataSchemaDefinition fullDefinition = definition;
    for (int i = 0; i < processors.length; i++)
    {
      final ReportPreProcessor processor = processors[i];
      fullReport = processor.performPreProcessing(fullReport, postQueryFlowController);
      if (fullReport.getDataSchemaDefinition() != fullDefinition)
      {
        fullDefinition = fullReport.getDataSchemaDefinition();
        postQueryFlowController = postQueryFlowController.updateDataSchema(fullDefinition);
      }
View Full Code Here

      if (needPreProcessing)
      {
        final ReportPreProcessor[] processors = getAllPreProcessors(report);
        for (int i = 0; i < processors.length; i++)
        {
          final ReportPreProcessor processor = processors[i];
          fullReport = processor.performPreProcessing(fullReport, postQueryFlowController);
          if (fullReport.getDataSchemaDefinition() != fullDefinition)
          {
            fullDefinition = fullReport.getDataSchemaDefinition();
            postQueryFlowController = postQueryFlowController.updateDataSchema(fullDefinition);
          }
View Full Code Here

    final ReportPreProcessor[] processors = reportDefinition.getPreProcessors();
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final ArrayList preProcessors = new ArrayList();
    for (int i = 0; i < processors.length; i++)
    {
      final ReportPreProcessor o = processors[i];
      if (o != null)
      {
        preProcessors.add(o);
      }
    }
View Full Code Here

                                               final Object value,
                                               final boolean isSelected,
                                               final int row,
                                               final int column)
  {
    final ReportPreProcessor value1;
    if (value instanceof ReportPreProcessor)
    {
      value1 = (ReportPreProcessor) value;
    }
    else
View Full Code Here

        }
        else
        {
          optionPane = new ReportPreProcessorPropertiesDialog();
        }
        final ReportPreProcessor expression = optionPane.editExpression((ReportPreProcessor) selectedItem);
        if (expression != selectedItem)
        {
          expressionEditor.setSelectedItem(expression);
        }
        stopCellEditing();
      }
      else if (selectedItem instanceof ReportPreProcessorMetaData)
      {
        try
        {
          final ReportPreProcessorMetaData emd = (ReportPreProcessorMetaData) selectedItem;
          final ReportPreProcessor expression = (ReportPreProcessor) emd.getPreProcessorType().newInstance();

          final ReportPreProcessorPropertiesDialog optionPane;
          if (window instanceof JFrame)
          {
            optionPane = new ReportPreProcessorPropertiesDialog((JFrame) window);
          }
          else if (window instanceof JDialog)
          {
            optionPane = new ReportPreProcessorPropertiesDialog((JDialog) window);
          }
          else
          {
            optionPane = new ReportPreProcessorPropertiesDialog();
          }

          final ReportPreProcessor resultexpression = optionPane.editExpression(expression);
          if (resultexpression != expression)
          {
            expressionEditor.setSelectedItem(resultexpression);
          }
          stopCellEditing();
View Full Code Here

    final AbstractReportDefinition report = (AbstractReportDefinition) element;
    final ReportPreProcessor[] processors = report.getPreProcessors();
    for (int i = 0; i < processors.length; i++)
    {
      final ReportPreProcessor processor = processors[i];
      // write the preprocessor ...
      try
      {
        xmlWriter.writeTag(BundleNamespaces.LAYOUT, "preprocessor",
            "class", processor.getClass().getName(), XmlWriterSupport.OPEN);
        writePreProcessor(xmlWriter, processor);
        xmlWriter.writeCloseTag();
      }
      catch (IntrospectionException e)
      {
View Full Code Here

  }

  @Test
  public void testReportIsConfigured() throws ReportProcessingException
  {
    ReportPreProcessor p = create();
    MasterReport preData = materializePreData(new MasterReport(), p);
    MasterReport postData = materialize(new MasterReport(), p);

    Assert.assertEquals("pre-data-script", preData.getAttribute("test", "test"));
    Assert.assertEquals("script", postData.getAttribute("test", "test"));
View Full Code Here

  }

  @Test
  public void testMetaData() throws Exception
  {
    ReportPreProcessor prc = create();
    PreProcessorTestHelper.validateElementMetaData(prc.getClass());
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.ReportPreProcessor

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.