Java Code Examples for org.apache.deltaspike.core.spi.config.ConfigSource#getPropertyValue()
The following examples show how to use
org.apache.deltaspike.core.spi.config.ConfigSource#getPropertyValue() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DeltaSpikeConfigInfo.java From deltaspike with Apache License 2.0 | 5 votes |
private String getFromConfigSource(ConfigSource[] configSources, String key) { for (ConfigSource configSource : configSources) { if (configSource.getPropertyValue(key) != null) { return configSource.getConfigName(); } } return null; }
Example 2
Source File: TypedResolverImpl.java From deltaspike with Apache License 2.0 | 5 votes |
private String getPropertyValue(String key) { String value; for (ConfigSource configSource : config.getConfigSources()) { value = configSource.getPropertyValue(key); if (value != null) { if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "found value {0} for key {1} in ConfigSource {2}.", new Object[]{config.filterConfigValue(key, value, true), key, configSource.getConfigName()}); } if (this.evaluateVariables) { value = resolveVariables(value); } return config.filterConfigValue(key, value, false); } if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINER, "NO value found for key {0} in ConfigSource {1}.", new Object[]{key, configSource.getConfigName()}); } } return null; }