use of org.kuali.kfs.kim.impl.common.attribute.KimAttribute in project cu-kfs by CU-CommunityApps.
the class AttributeValidationHelper method convertErrorsForMappedFields.
public List<AttributeError> convertErrorsForMappedFields(String errorPath, List<AttributeError> localErrors) {
List<AttributeError> errors = new ArrayList<>();
if (errorPath == null) {
errorPath = KFSConstants.EMPTY_STRING;
} else if (StringUtils.isNotEmpty(errorPath)) {
errorPath = errorPath + ".";
}
for (AttributeError error : localErrors) {
KimAttribute attribute = getAttributeDefinitionByName(error.getAttributeName());
String attributeDefnId = attribute == null ? "" : attribute.getId();
errors.add(AttributeError.Builder.create(errorPath + "qualifier(" + attributeDefnId + ").attrVal", error.getErrors()).build());
}
return errors;
}
Aggregations