use of org.kuali.rice.core.api.uif.RemotableAttributeError in project cu-kfs by CU-CommunityApps.
the class FinancialSystemSearchableAttribute method validateDocumentAttributeCriteria.
@Override
public List<RemotableAttributeError> validateDocumentAttributeCriteria(ExtensionDefinition extensionDefinition, DocumentSearchCriteria documentSearchCriteria) {
if (LOG.isDebugEnabled()) {
LOG.debug("validateDocumentAttributeCriteria( " + extensionDefinition + ", " + documentSearchCriteria + " )");
}
// this list is irrelevant. the validation errors are put on the stack in the validationService.
List<RemotableAttributeError> errors = super.validateDocumentAttributeCriteria(extensionDefinition, documentSearchCriteria);
DictionaryValidationService validationService = SpringContext.getBean(DictionaryValidationService.class);
Map<String, List<String>> paramMap = documentSearchCriteria.getDocumentAttributeValues();
for (String key : paramMap.keySet()) {
List<String> values = paramMap.get(key);
if (values != null && !values.isEmpty()) {
for (String value : values) {
if (!StringUtils.isEmpty(value)) {
if (magicFields.containsKey(key)) {
validationService.validateAttributeFormat(magicFields.get(key), key, value, key);
}
}
}
}
}
retrieveValidationErrorsFromGlobalVariables(errors);
return errors;
}
Aggregations