1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.rule;
17
18 import org.kuali.rice.kim.api.group.Group;
19 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
20 import org.kuali.rice.kim.impl.group.GroupBo;
21
22
23
24
25
26
27
28 public class GroupRuleResponsibility extends RuleResponsibilityBo {
29 protected Group group;
30 private String namespaceCode;
31 private String name;
32
33 public String getNamespaceCode() {
34 return this.namespaceCode;
35 }
36
37 public void setNamespaceCode(String namespaceCode) {
38 this.namespaceCode = namespaceCode;
39 }
40
41 public String getName() {
42 return this.name;
43 }
44
45 public void setName(String name) {
46 this.name = name;
47 }
48
49 @Override
50 public Group getGroup() {
51 if (this.group == null) {
52 this.group = KimApiServiceLocator.getGroupService().getGroupByNamespaceCodeAndName(getNamespaceCode(),
53 getName());
54 }
55 return this.group;
56 }
57
58 public GroupBo getGroupBo() {
59 Group grp = null;
60 if (isUsingGroup()) {
61 grp = KimApiServiceLocator.getGroupService().getGroupByNamespaceCodeAndName(getNamespaceCode(),getName());
62 }
63 if(null != grp){
64 return GroupBo.from(grp);
65 } else {
66 return null;
67 }
68 }
69 }