List of usage examples for org.apache.commons.configuration MapConfiguration append
public void append(Configuration c)
From source file:org.seedstack.seed.core.internal.CorePlugin.java
private Configuration loadBootstrapConfiguration() { MapConfiguration globalConfiguration = new MapConfiguration(new HashMap<String, Object>()); ClassLoader classLoader = SeedReflectionUtils.findMostCompleteClassLoader(); if (classLoader == null) { throw SeedException.createNew(CoreErrorCode.UNABLE_TO_FIND_CLASSLOADER); }/*from w ww .j a v a2 s . c o m*/ try { Enumeration<URL> urls = classLoader.getResources(SEED_BOOTSTRAP_PATH); while (urls.hasMoreElements()) { URL url = urls.nextElement(); globalConfiguration.append(new PropertiesConfiguration(url)); } } catch (Exception e) { throw SeedException.wrap(e, CoreErrorCode.UNEXPECTED_EXCEPTION); } return new MapConfiguration( new ImmutableMap.Builder<String, Object>().putAll(globalConfiguration.getMap()).build()); }