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

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


    this.handleInterruptedState = true;
    this.outputProcessor = outputProcessor;
    this.paranoidChecks = "true".equals(outputProcessor.getMetaData().getConfiguration().getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.layout.ParanoidChecks"));
    this.pagebreaksSupported = outputProcessor.getMetaData().isFeatureSupported(OutputProcessorFeature.PAGEBREAKS);
    final Configuration configuration = report.getReportConfiguration();
    final String yieldRateText = configuration.getConfigProperty("org.pentaho.reporting.engine.classic.core.YieldRate");
    final int yieldRate = StringUtil.parseInt(yieldRateText, 0);
    if (yieldRate > 0)
    {
      addReportProgressListener(new YieldReportListener(yieldRate));
    }
    final String profile = configuration.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.ProfileReportProcessing");
    if ("true".equals(profile))
    {
      final boolean logLevelProgress = "true".equals
          (configuration.getConfigProperty("org.pentaho.reporting.engine.classic.core.performance.LogLevelProgress"));
      final boolean logPageProgress = "true".equals
          (configuration.getConfigProperty("org.pentaho.reporting.engine.classic.core.performance.LogPageProgress"));
      final boolean logRowProgress = "true".equals
          (configuration.getConfigProperty("org.pentaho.reporting.engine.classic.core.performance.LogRowProgress"));
      addReportProgressListener(new PerformanceProgressLogger(logLevelProgress, logPageProgress, logRowProgress));
    }
  }
View Full Code Here


    return null;
  }

  protected final ComponentDrawable createComponentDrawable(final ExpressionRuntime runtime, final Component c)
  {
    final Configuration config = runtime.getConfiguration();
    final ComponentDrawable cd;
    final String drawMode = config.getConfigProperty("org.pentaho.reporting.engine.classic.core.ComponentDrawableMode",
        "shared");
    if ("private".equals(drawMode))
    {
      cd = new ComponentDrawable();
    }
    else if ("synchronized".equals(drawMode))
    {
      cd = new ComponentDrawable();
      cd.setPaintSynchronized(true);
    }
    else
    {
      if (frame == null)
      {
        frame = new JFrame();
      }
      cd = new ComponentDrawable(frame);
      cd.setPaintSynchronized(true);
    }

    final String allowOwnPeer = config.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.AllowOwnPeerForComponentDrawable");
    cd.setAllowOwnPeer("true".equals(allowOwnPeer));
    cd.setComponent(c);
    return cd;
  }
View Full Code Here

   * @param width the stroke's width.
   * @return the stroke, never null.
   */
  public static Stroke createStroke(final int type, final float width)
  {
    final Configuration repoConf = ClassicEngineBoot.getInstance().getGlobalConfig();
    final boolean useWidthForStrokes = "true".equals
        (repoConf.getConfigProperty("org.pentaho.reporting.engine.classic.core.DynamicStrokeDashes"));

    final float effectiveWidth;
    if (useWidthForStrokes)
    {
      effectiveWidth = width;
View Full Code Here

    catch (Exception e)
    {
      formulaError = e;
      if (FormulaExpression.logger.isDebugEnabled())
      {
        final Configuration config = getReportConfiguration();
        if ("true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.function.LogFormulaFailureCause")))
        {
          FormulaExpression.logger.debug("Failed to compute the regular value [" + formulaExpression + ']', e);
        }
        else
View Full Code Here

    }
    catch (Exception e)
    {
      if (FormulaFunction.logger.isDebugEnabled())
      {
        final Configuration config = getReportConfiguration();
        if ("true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.function.LogFormulaFailureCause")))
        {
          FormulaFunction.logger.debug("Failed to compute the initial value [" + formulaExpression + ']', e);
        }
        else
View Full Code Here

    catch (Exception e)
    {
      formulaError = true;
      if (FormulaFunction.logger.isDebugEnabled())
      {
        final Configuration config = getReportConfiguration();
        if ("true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.function.LogFormulaFailureCause")))
        {
          FormulaFunction.logger.debug("Failed to compute the regular value [" + formulaExpression + ']', e);
        }
        else
View Full Code Here

  }

  protected TableModel handleFallThrough(final String query)
      throws ReportDataFactoryException
  {
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    if ("warn".equals(configuration.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.states.NullDataSourceHandling")))
    {
      logger.warn("Deprecated behavior: None of the data-factories was able to handle the query '" + query + "'. " +
          "Returning empty tablemodel instead of failing hard.");
      logger.warn("Be aware that the default for this setting will change in version 0.8.11. " +
View Full Code Here

    super.startParsing(attrs);

    final ResourceManager resourceManager = getRootHandler().getResourceManager();
    final ResourceKey context = getRootHandler().getContext();

    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final Iterator keys = configuration.findPropertyKeys(ElementMetaDataParser.GLOBAL_INCLUDES_PREFIX);
    while (keys.hasNext())
    {
      final String key = (String) keys.next();
      final String href = configuration.getConfigProperty(key);
      if (StringUtils.isEmpty(href, true))
      {
        continue;
      }
      try
View Full Code Here

  }

  private ReportPreProcessor[] getAllPreProcessors(final AbstractReportDefinition reportDefinition)
  {
    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);
      }
    }

    final Iterator keys = configuration.findPropertyKeys
        ("org.pentaho.reporting.engine.classic.core.auto-report-preprocessors.");
    while (keys.hasNext())
    {
      final String key = (String) keys.next();
      final String value = configuration.getConfigProperty(key);
      final Object o = ObjectUtilities.loadAndInstantiate(value, ProcessState.class, ReportPreProcessor.class);
      if (o != null)
      {
        preProcessors.add(o);
      }
View Full Code Here

    else
    {
      this.backend = CompoundDataFactory.normalize(backend, true);
    }

    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    this.queryCache = new HashMap<String, HashMap<StaticDataRow, Object>>();

    if (dataCacheEnabled)
    {
      this.dataCache = DataCacheFactory.getCache();
    }
    else
    {
      this.dataCache = null;
    }

    this.debugDataSources = "true".equals(configuration.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.DebugDataSources"));
    this.profileDataSources = "true".equals(configuration.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.ProfileDataSources"));

  }
View Full Code Here

TOP

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

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.