Applies the properties from the named source to the main configuration @param config the main configuration to apply to @param source the name of the source to apply properties from
(ConfigArgP config, String source)
| 205 | * @param source the name of the source to apply properties from |
| 206 | */ |
| 207 | protected static void loadConfigSource(ConfigArgP config, String source) { |
| 208 | Properties p = loadConfig(source); |
| 209 | Config c = config.getConfig(); |
| 210 | for(String key: p.stringPropertyNames()) { |
| 211 | String value = p.getProperty(key); |
| 212 | ConfigurationItem ci = config.getConfigurationItem(key); |
| 213 | if(ci!=null) { // if we recognize the key, validate it |
| 214 | ci.setValue(value); |
| 215 | } |
| 216 | c.overrideConfig(key, value); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Loads properties from a file or url with the passed name |
no test coverage detected