1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.service.impl;
17
18 import java.util.List;
19 import java.util.Map;
20
21 import org.kuali.rice.krad.bo.ExternalizableBusinessObject;
22 import org.kuali.rice.krad.util.ExternalizableBusinessObjectUtils;
23
24
25
26
27
28
29 public class KRADModuleService extends ModuleServiceBase {
30 protected List<String> businessObjects;
31
32 @Override
33 public boolean isResponsibleFor(Class businessObjectClass) {
34 if (businessObjects != null) {
35 if (businessObjects.contains(businessObjectClass.getName())) {
36 return true;
37 }
38 }
39
40 if (ExternalizableBusinessObject.class.isAssignableFrom(businessObjectClass)) {
41 Class externalizableBusinessObjectInterface =
42 ExternalizableBusinessObjectUtils.determineExternalizableBusinessObjectSubInterface(
43 businessObjectClass);
44 if (externalizableBusinessObjectInterface != null) {
45 Map<Class, Class> validEBOs = getModuleConfiguration().getExternalizableBusinessObjectImplementations();
46 if (validEBOs != null) {
47 if (validEBOs.get(externalizableBusinessObjectInterface) != null) {
48 return true;
49 }
50 }
51 }
52 }
53
54 return false;
55 }
56
57 public List<String> getBusinessObjects() {
58 return this.businessObjects;
59 }
60
61 public void setBusinessObjects(List<String> businessObjects) {
62 this.businessObjects = businessObjects;
63 }
64 }