// see if the module supports this type
Set types = module.getSupportedDesignatorTypes();
if ((types == null) || (types.
contains(new Integer(designatorType)))) {
// see if the module can find an attribute value
EvaluationResult result =
module.findAttribute(attributeType, attributeId, issuer,
subjectCategory, context,
designatorType);
//If a module returned null
if(result == null)
{
if (logger.isLoggable(Level.WARNING))
logger.log(Level.WARNING, "Module returned null:" + module.getClass().getCanonicalName() +
" for attributeID:" + attributeId);
result = new EvaluationResult(BagAttribute.createEmptyBag(attributeType));
}
// if there was an error, we stop right away
if (result == null || result.indeterminate()) {
if (logger.isLoggable(Level.INFO))
logger.info("Error while trying to resolve values: " +
result.getStatus().getMessage());
return result;
}
// if the result wasn't empty, then return the result
BagAttribute bag = (BagAttribute)(result.getAttributeValue());
if (! bag.isEmpty())
return result;
}
}
// if we got here then there were no errors but there were also no
// matches, so we have to return an empty bag
if (logger.isLoggable(Level.INFO))
logger.info("Failed to resolve any values for " +
attributeId.toString());
return new EvaluationResult(BagAttribute.
createEmptyBag(attributeType));
}