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

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


  private boolean ensureEditorAvailable()
  {
    if (editorClass == null)
    {
      final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
      final String className = configuration.getConfigProperty
          ("org.pentaho.reporting.engine.classic.metadata.datafactory-editor." + getName());
      if (className != null)
      {
        try
        {
View Full Code Here


   *
   * @return the mapping from environment names to data-row column names.
   */
  public static LinkedMap createEnvironmentMapping()
  {
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final Iterator propertyKeys = configuration.findPropertyKeys(ENV_MAPPING_KEY_PREFIX);
    final LinkedMap names = new LinkedMap();
    while (propertyKeys.hasNext())
    {
      final String key = (String) propertyKeys.next();
      final String value = configuration.getConfigProperty(key);
      final String shortKey = key.substring(ENV_MAPPING_KEY_PREFIX.length());
      names.put(shortKey, value);
    }
    return names;
  }
View Full Code Here

    {
      return null;
    }


    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((Component) o);
    return cd;
  }
View Full Code Here

   *
   * @return true, if the system is headless, false otherwise.
   */
  protected static boolean isHeadless()
  {
    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    return "true".equals(config.getConfigProperty("java.awt.headless", "false"));
  }
View Full Code Here

  {
    if (manager == null)
    {
      throw new NullPointerException();
    }
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final Iterator sources = configuration.findPropertyKeys
        ("org.pentaho.reporting.engine.classic.core.DataSchemaDefinition");

    final DefaultDataSchemaDefinition definition = new DefaultDataSchemaDefinition();

    while (sources.hasNext())
    {

      final Object sourceKey = configuration.getConfigProperty((String) sources.next());
      try
      {
        logger.debug ("Loading data-schema " + sourceKey);
        final Resource resource = manager.createDirectly(sourceKey, DataSchemaDefinition.class);
        final DataSchemaDefinition fromResource = (DataSchemaDefinition) resource.getResource();
View Full Code Here

    {
      return null;
    }
    try
    {
      final Configuration p = cs.load(configPath, null);
      final String property = p.getConfigProperty("repository-path");
      if (property == null)
      {
        return null;
      }
      return new URL(property);
View Full Code Here

  public static void initializeElementMetaData() throws ModuleInitializeException
  {

    final String namespaceRegistryPrefix = "org.pentaho.reporting.engine.classic.core.metadata.namespaces.";
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final Iterator keys = configuration.findPropertyKeys(namespaceRegistryPrefix);
    while (keys.hasNext())
    {
      final String key = (String) keys.next();
      final String prefix = key.substring(namespaceRegistryPrefix.length());
      final String namespaceUri = configuration.getConfigProperty(key);
      if (prefix.length() == 0 || namespaceUri == null || namespaceUri.length() == 0)
      {
        continue;
      }
      ElementTypeRegistry.getInstance().registerNamespacePrefix(namespaceUri, prefix);
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

   *
   * @param event the window event.
   */
  public void windowClosing(final WindowEvent event)
  {
    final Configuration configuration = ClassicEngineDemoBoot.getInstance().getGlobalConfig();
    if ("false".equals(configuration.getConfigProperty(AbstractDemoFrame.EMBEDDED_KEY, "false")))
    {
      System.exit(0);
    }
    else
    {
View Full Code Here

    markerChar = '$';
    closingBraceChar = '}';
    openingBraceChar = '{';
    escapeChar = '\\';

    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String escapeModeText = configuration.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.util.PropertyLookupParserEscapeMode", "strict");
    if ("all".equals(escapeModeText))
    {
      escapeMode = ESCAPE_MODE_ALL;
    }
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.