String v = StringUtils.stripToEmpty(value.toString());
logger.trace("v: " + v);
try {
logger.debug("calling validator for object data: " + obj + "; value: " + v);
ObjectPropertyValidationResult result = validationHelper.validate(objectInstance,
(ObjectData)obj, v);
logger.trace("result: " + result);
if(result.isValid()) {
logger.debug("value is valid; set in object data");
((ObjectData)obj).setValue(v);
objectInstance.save();
}
dataNotes.put((ObjectData)obj, result.getCode() + ":" + result.getMessage());
}
catch(Exception e) {
logger.error("Exception caught while executing validator: " + e.getLocalizedMessage(), e);
dataNotes.put((ObjectData)obj, e.getLocalizedMessage());