try {
SelectionProperty prop = propertyOracle.getSelectionProperty(logger,
propName);
testValue = prop.getCurrentValue();
} catch (BadPropertyValueException e) {
ConfigurationProperty prop = propertyOracle.getConfigurationProperty(propName);
testValue = prop.getValues().get(0);
}
logger.log(TreeLogger.DEBUG, "Property value is '" + testValue + "'",
null);
if (testValue.equals(value)) {
return true;
} else {
// no exact match was found, see if any fall back
// value would satisfy the condition
try {
SelectionProperty prop = propertyOracle.getSelectionProperty(logger,
propName);
List<? extends Set<String>> fallbackValues = prop.getFallbackValues(value);
if (fallbackValues != null && fallbackValues.size() > 0) {
logger.log(TreeLogger.DEBUG, "Property value '" + value + "'" +
" is the fallback of '" + fallbackValues.toString() + "'", null);
int cost = -1;
for (Set<String> values : fallbackValues) {