1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.rule;
18
19 import java.util.ArrayList;
20 import java.util.List;
21
22 import org.kuali.rice.kew.engine.RouteContext;
23 import org.kuali.rice.kew.identity.Id;
24 import org.kuali.rice.kew.routeheader.DocumentContent;
25 import org.kuali.rice.kew.rule.AbstractRoleAttribute;
26 import org.kuali.rice.kew.rule.ResolvedQualifiedRole;
27 import org.kuali.rice.kew.rule.Role;
28 import org.kuali.rice.kew.workgroup.GroupNameId;
29
30
31
32
33
34
35
36
37 public class TestBadWorkgroupRoleAttribute extends AbstractRoleAttribute {
38
39 private static final long serialVersionUID = -8319714644552979100L;
40
41
42 public List<Role> getRoleNames() {
43 List<Role> roles = new ArrayList<Role>();
44 roles.add(new Role(getClass(), "workgroup", "workgroup label"));
45 return roles;
46 }
47
48 public List<String> getQualifiedRoleNames(String roleName, DocumentContent documentContent) {
49 List<String> qualRoleNames = new ArrayList<String>();
50 qualRoleNames.add("TestWorkgroup");
51 return qualRoleNames;
52 }
53
54
55 public ResolvedQualifiedRole resolveQualifiedRole(RouteContext routeContext, String roleName, String qualifiedRole) {
56 List<Id> recipients = new ArrayList<Id>();
57 recipients.add(new GroupNameId(null));
58 recipients.add(new GroupNameId(""));
59 return new ResolvedQualifiedRole("workgroup role label", recipients);
60 }
61
62
63
64 }