Package org.jfree.base.config

Examples of org.jfree.base.config.PropertyFileConfiguration


    {
        final HierarchicalConfiguration globalConfig
            = new HierarchicalConfiguration();

        if (staticConfig != null) {
          final PropertyFileConfiguration rootProperty
              = new PropertyFileConfiguration();
          rootProperty.load(staticConfig);
          globalConfig.insertConfiguration(rootProperty);
          globalConfig.insertConfiguration(
                  getPackageManager().getPackageConfiguration());
        }
        if (userConfig != null)
        {
          final PropertyFileConfiguration baseProperty
              = new PropertyFileConfiguration();
          baseProperty.load(userConfig);
          globalConfig.insertConfiguration(baseProperty);
        }
        final SystemPropertyConfiguration systemConfig
            = new SystemPropertyConfiguration();
        globalConfig.insertConfiguration(systemConfig);
View Full Code Here


    {
        final HierarchicalConfiguration globalConfig
            = new HierarchicalConfiguration();

        if (staticConfig != null) {
          final PropertyFileConfiguration rootProperty
              = new PropertyFileConfiguration();
          rootProperty.load(staticConfig, getClass());
          globalConfig.insertConfiguration(rootProperty);
          globalConfig.insertConfiguration(
                  getPackageManager().getPackageConfiguration());
        }
        if (userConfig != null) {
          String userConfigStripped;
          if (userConfig.startsWith("/")) {
            userConfigStripped = userConfig.substring(1);
          }
          else {
            userConfigStripped = userConfig;
          }
          try {
            final Enumeration userConfigs = ObjectUtilities.getClassLoader
                            (getClass()).getResources(userConfigStripped);
            final ArrayList configs = new ArrayList();
            while (userConfigs.hasMoreElements()) {
              final URL url = (URL) userConfigs.nextElement();
              try {
                final PropertyFileConfiguration baseProperty =
                        new PropertyFileConfiguration();
                final InputStream in = url.openStream();
                baseProperty.load(in);
                in.close();
                configs.add(baseProperty);
              }
              catch(IOException ioe) {
                Log.warn ("Failed to load the user configuration at " + url, ioe);
              }
            }

            for (int i = configs.size() - 1; i >= 0; i--) {
              final PropertyFileConfiguration baseProperty =
                      (PropertyFileConfiguration) configs.get(i);
              globalConfig.insertConfiguration(baseProperty);
            }
          }
          catch (IOException e) {
View Full Code Here

   */
  protected Configuration loadConfiguration ()
  {
    final HierarchicalConfiguration globalConfig = new HierarchicalConfiguration();

    final PropertyFileConfiguration rootProperty = new PropertyFileConfiguration();
    rootProperty.load("/org/jfree/report/jfreereport.properties");
    rootProperty.load("/org/jfree/report/ext/jfreereport-ext.properties");
    globalConfig.insertConfiguration(rootProperty);
    globalConfig.insertConfiguration(JFreeReportBoot.getInstance().getPackageManager()
            .getPackageConfiguration());

    final PropertyFileConfiguration baseProperty = new PropertyFileConfiguration();
    baseProperty.load("/jfreereport.properties");
    globalConfig.insertConfiguration(baseProperty);

    globalConfig.insertConfiguration(configWrapper);

    final SystemPropertyConfiguration systemConfig = new SystemPropertyConfiguration();
View Full Code Here

   */
  protected Configuration loadConfiguration ()
  {
    final HierarchicalConfiguration globalConfig = new HierarchicalConfiguration();

    final PropertyFileConfiguration rootProperty = new PropertyFileConfiguration();
    rootProperty.load("/org/jfree/layouting/layout.properties");
    globalConfig.insertConfiguration(rootProperty);
    globalConfig.insertConfiguration(getPackageManager().getPackageConfiguration());

    final PropertyFileConfiguration baseProperty = new PropertyFileConfiguration();
    baseProperty.load("/layout.properties");
    globalConfig.insertConfiguration(baseProperty);

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

   */
  protected Configuration loadConfiguration ()
  {
    HierarchicalConfiguration globalConfig = new HierarchicalConfiguration();

    final PropertyFileConfiguration rootProperty = new PropertyFileConfiguration();
    rootProperty.load("/org/jfree/report/jfreereport.properties");
    rootProperty.load("/org/jfree/report/ext/jfreereport-ext.properties");
    globalConfig.insertConfiguration(rootProperty);
    globalConfig.insertConfiguration(JFreeReportBoot.getInstance().getPackageManager()
            .getPackageConfiguration());

    final PropertyFileConfiguration baseProperty = new PropertyFileConfiguration();
    baseProperty.load("/jfreereport.properties");
    globalConfig.insertConfiguration(baseProperty);

    globalConfig.insertConfiguration(configWrapper);

    final SystemPropertyConfiguration systemConfig = new SystemPropertyConfiguration();
View Full Code Here

   */
  protected Configuration loadConfiguration ()
  {
    HierarchicalConfiguration globalConfig = new HierarchicalConfiguration();

    final PropertyFileConfiguration rootProperty = new PropertyFileConfiguration();
    rootProperty.load("/org/jfree/layouting/layout.properties");
    globalConfig.insertConfiguration(rootProperty);
    globalConfig.insertConfiguration(getPackageManager().getPackageConfiguration());

    final PropertyFileConfiguration baseProperty = new PropertyFileConfiguration();
    baseProperty.load("/layout.properties");
    globalConfig.insertConfiguration(baseProperty);

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

    {
        final HierarchicalConfiguration globalConfig
            = new HierarchicalConfiguration();

        if (staticConfig != null) {
          final PropertyFileConfiguration rootProperty
              = new PropertyFileConfiguration();
          rootProperty.load(staticConfig);
          globalConfig.insertConfiguration(rootProperty);
          globalConfig.insertConfiguration(
                  getPackageManager().getPackageConfiguration());
        }
        if (userConfig != null) {
          String userConfigStripped;
          if (userConfig.startsWith("/")) {
            userConfigStripped = userConfig.substring(1);
          }
          else {
            userConfigStripped = userConfig;
          }
          try {
            final Enumeration userConfigs = ObjectUtilities.getClassLoader
                            (getClass()).getResources(userConfigStripped);
            final ArrayList configs = new ArrayList();
            while (userConfigs.hasMoreElements()) {
              final URL url = (URL) userConfigs.nextElement();
              try {
                final PropertyFileConfiguration baseProperty =
                        new PropertyFileConfiguration();
                final InputStream in = url.openStream();
                baseProperty.load(in);
                in.close();
                configs.add(baseProperty);
              }
              catch(IOException ioe) {
                Log.warn ("Failed to load the user configuration at " + url, ioe);
              }
            }

            for (int i = configs.size() - 1; i >= 0; i--) {
              final PropertyFileConfiguration baseProperty =
                      (PropertyFileConfiguration) configs.get(i);
              globalConfig.insertConfiguration(baseProperty);
            }
          }
          catch (IOException e) {
View Full Code Here

     * @return the global configuration.
     */
    protected synchronized Configuration loadConfiguration() {
        final HierarchicalConfiguration globalConfig = new HierarchicalConfiguration();

        final PropertyFileConfiguration rootProperty = new PropertyFileConfiguration();
        rootProperty.load("/org/jfree/base/jcommon.properties");
        globalConfig.insertConfiguration(rootProperty);
        globalConfig.insertConfiguration(getPackageManager().getPackageConfiguration());

        final PropertyFileConfiguration baseProperty = new PropertyFileConfiguration();
        baseProperty.load("/jcommon.properties");
        globalConfig.insertConfiguration(baseProperty);

        final SystemPropertyConfiguration systemConfig = new SystemPropertyConfiguration();
        globalConfig.insertConfiguration(systemConfig);
        // just in case it is not already started ...
View Full Code Here

TOP

Related Classes of org.jfree.base.config.PropertyFileConfiguration

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.