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
30 public class KRADModuleService extends ModuleServiceBase {
31
32 protected List<String> businessObjects;
33
34 @Override
35 public boolean isResponsibleFor(Class businessObjectClass) {
36 if (businessObjects != null) {
37 if (businessObjects.contains(businessObjectClass.getName())) {
38 return true;
39 }
40 }
41 if (ExternalizableBusinessObject.class.isAssignableFrom(businessObjectClass)) {
42 Class externalizableBusinessObjectInterface = ExternalizableBusinessObjectUtils.determineExternalizableBusinessObjectSubInterface(businessObjectClass);
43 if (externalizableBusinessObjectInterface != null) {
44 Map<Class, Class> validEBOs = getModuleConfiguration().getExternalizableBusinessObjectImplementations();
45 if (validEBOs != null) {
46 if (validEBOs.get(externalizableBusinessObjectInterface) != null) {
47 return true;
48 }
49 }
50 }
51 }
52 return false;
53 }
54
55 public List<String> getBusinessObjects() {
56 return this.businessObjects;
57 }
58
59 public void setBusinessObjects(List<String> businessObjects) {
60 this.businessObjects = businessObjects;
61 }
62 }