throws UnableToCompleteException {
PropertyOracle propertyOracle = query.getPropertyOracle();
String testValue;
try {
try {
SelectionProperty prop = propertyOracle.getSelectionProperty(logger,
propName);
testValue = prop.getCurrentValue();
} catch (BadPropertyValueException e) {
ConfigurationProperty prop = propertyOracle.getConfigurationProperty(propName);
testValue = prop.getValues().get(0);
}
if (logger.isLoggable(TreeLogger.DEBUG)) {
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) {
if (logger.isLoggable(TreeLogger.DEBUG)) {
logger.log(TreeLogger.DEBUG, "Property value '" + value + "'" +
" is the fallback of '" + fallbackValues.toString() + "'", null);
}