use of org.whole.lang.properties.model.Property in project whole by wholeplatform.
the class PropertiesUtils method getProperty.
public static String getProperty(Properties props, String name, String defaultValue) {
if (EntityUtils.isResolver(props))
return defaultValue;
PropertiesEntityFactory lf = PropertiesEntityFactory.instance;
Property pattern = lf.createProperty(lf.createPropertyName(name), createVariable(PropertiesEntityDescriptorEnum.PropertyValue, "value"));
Property property = Matcher.findChild(pattern, props.getEntries());
if (property == null)
return getProperty(props.getDefaults(), name, defaultValue);
else
return property.getValue().wStringValue();
}
Aggregations