/** * @see org.springframework.extensions.config.ConfigService#getConfig(java.lang.Object) */ public Config getConfig(Object object) { return getConfig(object, new ConfigLookupContext()); }
/** * @see org.springframework.extensions.config.ConfigService#getConfig(java.lang.Object) */ public Config getConfig(Object object) { return getConfig(object, new ConfigLookupContext()); }
/** * @see org.springframework.extensions.config.ConfigService#getConfig(java.lang.Object) */ public Config getConfig(Object object) { return getConfig(object, new ConfigLookupContext()); }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
ConfigLookupContext clContext = new ConfigLookupContext(CONFIG_AREA);
ConfigLookupContext clContext = new ConfigLookupContext(CONFIG_AREA);
ConfigLookupContext lookupContext = new ConfigLookupContext(); lookupContext.addArea("test-area"); config = svc.getConfig("Area Specific Config", lookupContext); Config notThere = svc.getConfig("Unit Test", new ConfigLookupContext("not-there")); fail("Retrieving a non existent area should have thrown an exception!");