Package org.pentaho.reporting.libraries.base.config

Examples of org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration


  }

  private ReportWriter createWriter()
  {
    final MasterReport report = new MasterReport();
    final ModifiableConfiguration repConf = new HierarchicalConfiguration(report.getReportConfiguration());
    repConf.setConfigProperty
        (AbstractXmlResourceFactory.CONTENTBASE_KEY, "file://tmp/");

    final ReportWriter writer = new ReportWriter(report, "UTF-16", repConf);
    writer.addClassFactoryFactory(new URLClassFactory());
    writer.addClassFactoryFactory(new DefaultClassFactory());
View Full Code Here


    final Resource resource = resourceManager.createDirectly(url, ValidationSequence.class);
    final ValidationSequence sequence = (ValidationSequence) resource.getResource();

    final TableLayoutTest runtime = new TableLayoutTest();

    final HierarchicalConfiguration config = new HierarchicalConfiguration(
        ClassicEngineBoot.getInstance().getGlobalConfig());
    config.setConfigProperty("org.pentaho.reporting.engine.classic.core.modules.output.table.base.StrictLayout",
        String.valueOf(sequence.isStrict()));
    config.setConfigProperty("org.pentaho.reporting.engine.classic.core.modules.output.table.base.VerboseCellMarkers",
        "true");
    final HtmlOutputProcessorMetaData metaData =
        new HtmlOutputProcessorMetaData(HtmlOutputProcessorMetaData.PAGINATION_NONE);
    metaData.initialize(config);
View Full Code Here

    processingContext.getOutputProcessorMetaData().initialize(mapStaticMetaData(configuration, report));
  }

  private Configuration mapStaticMetaData(final Configuration configuration, final MasterReport report)
  {
    HierarchicalConfiguration hc = new HierarchicalConfiguration(configuration);

    setConfigurationIfDefined(hc,
        "org.pentaho.reporting.engine.classic.core.layout.fontrenderer.ComplexTextLayout",
        report.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.COMPLEX_TEXT));
View Full Code Here

    }

    if (compatibilityLevel < ClassicEngineBoot.computeVersionId(3, 999, 999))
    {
      // enable strict compatibility mode for reports older than 4.0.
      final HierarchicalConfiguration config = new HierarchicalConfiguration(processingContext.getConfiguration());
      config.setConfigProperty("org.pentaho.reporting.engine.classic.core.legacy.WrapProgressMarkerInSection", "true");
      config.setConfigProperty("org.pentaho.reporting.engine.classic.core.legacy.StrictCompatibility", "true");
      return config;
    }

    // this is a trunk or 4.0 or newer report.
    return processingContext.getConfiguration();
View Full Code Here

    }

    if (compatibilityLevel < ClassicEngineBoot.computeVersionId(3, 999, 999))
    {
      // enable strict compatibility mode for reports older than 4.0.
      final HierarchicalConfiguration config = new HierarchicalConfiguration(processingContext.getConfiguration());
      config.setConfigProperty("org.pentaho.reporting.engine.classic.core.legacy.WrapProgressMarkerInSection", "true");
      config.setConfigProperty("org.pentaho.reporting.engine.classic.core.legacy.StrictCompatibility", "true");
      return config;
    }

    // this is a trunk or 4.0 or newer report.
    return processingContext.getConfiguration();
View Full Code Here

  public MasterReport()
  {
    setElementType(new MasterReportType());
    setResourceBundleFactory(new LibLoaderResourceBundleFactory());

    this.reportConfiguration = new HierarchicalConfiguration
        (ClassicEngineBoot.getInstance().getGlobalConfig());
    this.parameterValues = new ReportParameterValues();

    setPageDefinition(null);
View Full Code Here

      finally
      {
        in.close();
      }

      final ModifiableConfiguration config = new HierarchicalConfiguration(defaults);
      final Iterator keys = properties.keySet().iterator();
      while (keys.hasNext())
      {
        final String key = (String) keys.next();
        config.setConfigProperty(key, properties.getProperty(key));
      }
      return config;
    }
    catch (Exception e)
    {
View Full Code Here

   *
   * @return The configuration.
   */
  protected Configuration loadConfiguration()
  {
    final HierarchicalConfiguration globalConfig = createDefaultHierarchicalConfiguration
        ("/org/pentaho/reporting/engine/classic/core/classic-engine.properties",
            "/classic-engine.properties", false, ClassicEngineBoot.class);

    globalConfig.insertConfiguration(ClassicEngineBoot.configWrapper);

    final SystemPropertyConfiguration systemConfig = new SystemPropertyConfiguration();
    globalConfig.insertConfiguration(systemConfig);
    return globalConfig;
  }
View Full Code Here

    {
      dialog = new ConfigurationEditorDialog();
    }

    dialog.pack();
    final HierarchicalConfiguration config =
        (HierarchicalConfiguration) activeContext.getMasterReportElement().getReportConfiguration();
    final HashMap oldConfig = copyConfig(config);

    if (dialog.performEdit(config))
    {
View Full Code Here

    this.newConfig = newConfig;
  }

  public void undo(final ReportRenderContext renderContext)
  {
    final HierarchicalConfiguration configuration =
        (HierarchicalConfiguration) renderContext.getMasterReportElement().getConfiguration();

    final Iterator newEntries = newConfig.entrySet().iterator();
    while (newEntries.hasNext())
    {
      final Map.Entry entry = (Map.Entry) newEntries.next();
      final String o = (String) entry.getKey();
      configuration.setConfigProperty(o, null);
    }

    final Iterator oldEntries = oldConfig.entrySet().iterator();
    while (oldEntries.hasNext())
    {
      final Map.Entry entry = (Map.Entry) oldEntries.next();
      final String o = (String) entry.getKey();
      configuration.setConfigProperty(o, (String) entry.getValue());
    }
    renderContext.getMasterReportElement().notifyNodePropertiesChanged();
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration

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.