use of org.kuali.kfs.coa.identity.KfsKimDocumentAttributeData in project cu-kfs by CU-CommunityApps.
the class OrgReviewRoleServiceImpl method getAttributes.
protected Map<String, String> getAttributes(OrgReviewRole orr, String kimTypeId) {
if (StringUtils.isBlank(kimTypeId)) {
return Collections.emptyMap();
}
List<KfsKimDocumentAttributeData> attributeDataList = new ArrayList<>();
KfsKimDocumentAttributeData attributeData = getAttribute(kimTypeId, KfsKimAttributes.CHART_OF_ACCOUNTS_CODE, orr.getChartOfAccountsCode());
if (attributeData != null) {
attributeDataList.add(attributeData);
}
attributeData = getAttribute(kimTypeId, KfsKimAttributes.ORGANIZATION_CODE, orr.getOrganizationCode());
if (attributeData != null) {
attributeDataList.add(attributeData);
}
attributeData = getAttribute(kimTypeId, KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, orr.getFinancialSystemDocumentTypeCode());
if (attributeData != null) {
attributeDataList.add(attributeData);
}
attributeData = getAttribute(kimTypeId, KfsKimAttributes.ACCOUNTING_LINE_OVERRIDE_CODE, orr.getOverrideCode());
if (attributeData != null) {
attributeDataList.add(attributeData);
}
attributeData = getAttribute(kimTypeId, KfsKimAttributes.FROM_AMOUNT, orr.getFromAmountStr());
if (attributeData != null) {
attributeDataList.add(attributeData);
}
attributeData = getAttribute(kimTypeId, KfsKimAttributes.TO_AMOUNT, orr.getToAmountStr());
if (attributeData != null) {
attributeDataList.add(attributeData);
}
return orr.getQualifierAsAttributeSet(attributeDataList);
}
use of org.kuali.kfs.coa.identity.KfsKimDocumentAttributeData in project cu-kfs by CU-CommunityApps.
the class OrgReviewRoleServiceImpl method getAttribute.
protected KfsKimDocumentAttributeData getAttribute(String kimTypeId, String attributeName, String attributeValue) {
if (StringUtils.isNotBlank(attributeValue)) {
KimAttribute attribute = getAttributeDefinition(kimTypeId, attributeName);
if (attribute != null) {
KfsKimDocumentAttributeData attributeData = new KfsKimDocumentAttributeData();
attributeData.setKimTypId(kimTypeId);
attributeData.setAttrVal(attributeValue);
attributeData.setKimAttrDefnId(attribute.getId());
attributeData.setKimAttribute(attribute);
return attributeData;
}
}
return null;
}
Aggregations