1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.document.rule;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.apache.log4j.Logger;
22 import org.kuali.rice.kim.bo.ui.KimDocumentRoleMember;
23 import org.kuali.rice.kim.bo.ui.RoleDocumentDelegationMember;
24
25
26
27
28
29
30
31 public class ActiveRoleMemberHelper {
32 private static final Logger LOG = Logger.getLogger(ActiveRoleMemberHelper.class);
33
34 public List<KimDocumentRoleMember> getActiveRoleMembers (List<KimDocumentRoleMember> roleMembers){
35 List<KimDocumentRoleMember> activeRoleMembers = new ArrayList<KimDocumentRoleMember>();
36 for (KimDocumentRoleMember roleMember : roleMembers)
37 {
38 if (roleMember.isActive())
39 {
40 activeRoleMembers.add(roleMember);
41 }
42 }
43 return activeRoleMembers;
44 }
45
46 public List<RoleDocumentDelegationMember> getActiveDelegationRoleMembers(List<RoleDocumentDelegationMember> roleMembers) {
47 List<RoleDocumentDelegationMember> activeRoleMembers = new ArrayList<RoleDocumentDelegationMember>();
48 for (RoleDocumentDelegationMember roleMember : roleMembers) {
49 if (roleMember.isActive()) {
50 activeRoleMembers.add(roleMember);
51 }
52 }
53 return activeRoleMembers;
54 }
55 }