if (argument == null && ((Verify) a).nullable()) {
continue;
}
else if (argument == null) {
log.info("null argument is not allowed");
throw new NotFoundException(i18n.tr(
"{0} with id {1} could not be found.",
Util.getClassName(verifyType), null));
}
if (argument instanceof String) {
String verifyParam = (String) argument;
log.debug("Verifying " + requiredAccess +
" access to " + verifyType + ": " + verifyParam);
Object entity = storeMap.get(verifyType).lookup(verifyParam);
// If the request is just for a single item, throw an exception
// if it is not found.
if (entity == null) {
// This is bad, we're verifying a parameter with an ID which
// doesn't seem to exist in the DB. Error will be thrown in
// invoke though.
String typeName = Util.getClassName(verifyType);
if (typeName.equals("Owner")) {
typeName = i18n.tr("Organization");
}
log.info("No such entity: " + typeName + " id: " +
verifyParam);
throw new NotFoundException(i18n.tr(
"{0} with id {1} could not be found.",
typeName, verifyParam));
}
entities.add(entity);