Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.MapConfiguration


        URL jarUrl = cls.getProtectionDomain().getCodeSource().getLocation();
        Configuration cfg = jarURLs.get(jarUrl.toString());
        if(cfg != null) {
            return new ModuleConfiguration(cfg);
        } else {
            return new ModuleConfiguration(new MapConfiguration(new HashMap<String, Object>()));
        }
    }
View Full Code Here


        Configuration cfg = configurationMap.get(moduleName);
        if(cfg != null) {
            return new ModuleConfiguration(cfg);
        } else {
            return new ModuleConfiguration(new MapConfiguration(new HashMap<String, Object>()));
        }
    }
View Full Code Here

                    f.createNewFile();
                }
                userConfig = new PropertiesConfiguration(f);
            } catch (Exception ex) {
                log.error("could not create user configuration in file #0: #1", userConfigFile, ex.getMessage());
                userConfig = new MapConfiguration(new HashMap<String, Object>());
            }
            userConfigurations.put(user.getLogin(), userConfig);
        }
        return userConfig;
    }
View Full Code Here

        // create temporary LMF home directory
        home = Files.createTempDir();

        // create a temporary configuration with an in-memory database URL for h2
        override = new MapConfiguration(new HashMap<String,Object>());
        override.setProperty("database.h2.url","jdbc:h2:mem;MVCC=true;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=10");
        override.setProperty("logging.template", "/logback-testing.xml");

        // initialise LMF using a temporary directory
        startupService = getService(MarmottaStartupService.class);
View Full Code Here

    private PluginManager _pluginManager;


    public NullApplicationRegistry()
    {
        super(new MapConfiguration(new HashMap()));
    }
View Full Code Here

*/
public class TestMapConfigurationEvents extends AbstractTestConfigurationEvents
{
    protected AbstractConfiguration createConfiguration()
    {
        return new MapConfiguration(new HashMap());
    }
View Full Code Here

            return new AppletConfiguration(applet);
        }
        else
        {
            return new MapConfiguration(parameters);
        }
    }
View Full Code Here

  /**
   * Loads configuration from system defined arguments, i.e. -Dapi.x.y.z=abc.
   */
  public Configuration fromSystem() {
    return new MapConfiguration((Properties) System.getProperties().clone());
  }
View Full Code Here

    return instance.getConnector(user, new PasswordToken(passwd));
  }

  @Override
  public ClientConfiguration getClientConfig() {
    return new ClientConfiguration(Arrays.asList(new MapConfiguration(config.getSiteConfig()))).withInstance(this.getInstanceName()).withZkHosts(
        this.getZooKeepers());
  }
View Full Code Here

            return new AppletConfiguration(applet);
        }
        else
        {
            return new MapConfiguration(parameters);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.MapConfiguration

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.