Search in sources :

Example 1 with CampusEbo

use of org.kuali.rice.location.framework.campus.CampusEbo in project cu-kfs by CU-CommunityApps.

the class DisbursementVoucherBatchDefault method getCampus.

/**
 * Gets the campus attribute.
 *
 * @return Returns the campus.
 */
public CampusEbo getCampus() {
    if (StringUtils.isBlank(campusCode)) {
        campus = null;
    } else {
        if (campus == null || !StringUtils.equals(campus.getCode(), campusCode)) {
            ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);
            if (moduleService != null) {
                Map<String, Object> keys = new HashMap<String, Object>(1);
                keys.put(LocationConstants.PrimaryKeyConstants.CODE, campusCode);
                campus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);
            } else {
                throw new RuntimeException("CONFIGURATION ERROR: No responsible module found for EBO class.  Unable to proceed.");
            }
        }
    }
    return campus;
}
Also used : KualiModuleService(org.kuali.kfs.krad.service.KualiModuleService) KualiModuleService(org.kuali.kfs.krad.service.KualiModuleService) ModuleService(org.kuali.kfs.krad.service.ModuleService) CampusEbo(org.kuali.rice.location.framework.campus.CampusEbo) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap)

Example 2 with CampusEbo

use of org.kuali.rice.location.framework.campus.CampusEbo in project cu-kfs by CU-CommunityApps.

the class Account method getAccountPhysicalCampus.

/**
 * Gets the accountPhysicalCampus attribute.
 *
 * @return Returns the accountPhysicalCampus
 */
@Override
public CampusEbo getAccountPhysicalCampus() {
    if (StringUtils.isBlank(accountPhysicalCampusCode)) {
        accountPhysicalCampus = null;
    } else {
        if (accountPhysicalCampus == null || !StringUtils.equals(accountPhysicalCampus.getCode(), accountPhysicalCampusCode)) {
            ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);
            if (moduleService != null) {
                Map<String, Object> keys = new HashMap<String, Object>(1);
                keys.put(LocationConstants.PrimaryKeyConstants.CODE, accountPhysicalCampusCode);
                accountPhysicalCampus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);
            } else {
                throw new RuntimeException("CONFIGURATION ERROR: No responsible module found for EBO class.  Unable to proceed.");
            }
        }
    }
    return accountPhysicalCampus;
}
Also used : KualiModuleService(org.kuali.kfs.krad.service.KualiModuleService) ContractsAndGrantsModuleService(org.kuali.kfs.integration.cg.ContractsAndGrantsModuleService) KualiModuleService(org.kuali.kfs.krad.service.KualiModuleService) ModuleService(org.kuali.kfs.krad.service.ModuleService) CampusEbo(org.kuali.rice.location.framework.campus.CampusEbo) HashMap(java.util.HashMap) PersistableBusinessObject(org.kuali.kfs.krad.bo.PersistableBusinessObject)

Aggregations

HashMap (java.util.HashMap)2 KualiModuleService (org.kuali.kfs.krad.service.KualiModuleService)2 ModuleService (org.kuali.kfs.krad.service.ModuleService)2 CampusEbo (org.kuali.rice.location.framework.campus.CampusEbo)2 LinkedHashMap (java.util.LinkedHashMap)1 ContractsAndGrantsModuleService (org.kuali.kfs.integration.cg.ContractsAndGrantsModuleService)1 PersistableBusinessObject (org.kuali.kfs.krad.bo.PersistableBusinessObject)1