Search in sources :

Example 6 with KimAttribute

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;
}
Also used : AttributeError(org.kuali.kfs.core.api.uif.AttributeError) ArrayList(java.util.ArrayList) KimAttribute(org.kuali.kfs.kim.impl.common.attribute.KimAttribute)

Aggregations

KimAttribute (org.kuali.kfs.kim.impl.common.attribute.KimAttribute)6 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Cache (org.springframework.cache.Cache)2 ValueWrapper (org.springframework.cache.Cache.ValueWrapper)2 CacheManager (org.springframework.cache.CacheManager)2 List (java.util.List)1 KfsKimDocumentAttributeData (org.kuali.kfs.coa.identity.KfsKimDocumentAttributeData)1 AttributeError (org.kuali.kfs.core.api.uif.AttributeError)1 KimDocumentAttributeDataBusinessObjectBase (org.kuali.kfs.kim.bo.ui.KimDocumentAttributeDataBusinessObjectBase)1 KimType (org.kuali.kfs.kim.impl.type.KimType)1 KimTypeAttribute (org.kuali.kfs.kim.impl.type.KimTypeAttribute)1