use of org.openksavi.sponge.config.PropertyEntry in project sponge by softelnet.
the class DefaultConfigurationManager method setupXmlProperties.
private void setupXmlProperties() {
for (Configuration configuration : rootConfig.getChildConfigurationsOf(ConfigurationConstants.TAG_PROPERTIES)) {
String name = configuration.getAttribute(ConfigurationConstants.PROP_ATTRIBUTE_NAME, null);
Object value = configuration.getValue();
String systemProperty = System.getProperty(name);
PropertyEntry entry = properties.get(name);
if (systemProperty != null) {
value = systemProperty;
} else if (entry == null) {
properties.put(name, new GenericPropertyEntry(value, isPropertyVariable(configuration), isPropertySystem(configuration)));
} else {
value = entry.getValue();
}
rootConfig.setVariable(name, value);
}
}
use of org.openksavi.sponge.config.PropertyEntry in project sponge by softelnet.
the class DefaultConfigurationManager method getProperty.
@Override
public String getProperty(String name) {
String systemProperty = System.getProperty(name);
if (systemProperty != null) {
return systemProperty;
}
PropertyEntry entry = properties.get(name);
if (entry == null) {
return null;
}
Object value = entry.getValue();
return value != null ? String.valueOf(value) : null;
}
Aggregations