1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.lm.request.approval.web;
17
18 import org.kuali.rice.kim.api.identity.principal.Principal;
19 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
20
21 import java.io.Serializable;
22 import java.util.ArrayList;
23 import java.util.List;
24
25 public class LeaveRequestApprovalEmployeeRow implements Comparable<LeaveRequestApprovalEmployeeRow>, Serializable {
26
27 private String employeeName;
28 private String principalId;
29 private List<LeaveRequestApprovalRow> leaveRequestList = new ArrayList<LeaveRequestApprovalRow>();
30
31 public int compareTo(LeaveRequestApprovalEmployeeRow row) {
32 return employeeName.compareToIgnoreCase(row.getEmployeeName());
33 }
34
35 public String getUserTargetURLParams() {
36 StringBuffer link = new StringBuffer();
37 link.append("methodToCall=changeTargetPerson");
38 Principal principal = KimApiServiceLocator.getIdentityService().getPrincipal(this.getPrincipalId());
39 link.append("&principalName=").append(principal.getPrincipalName());
40
41 return link.toString();
42 }
43
44 public String getEmployeeName() {
45 return employeeName;
46 }
47
48 public void setEmployeeName(String employeeName) {
49 this.employeeName = employeeName;
50 }
51
52 public String getPrincipalId() {
53 return principalId;
54 }
55
56 public void setPrincipalId(String principalId) {
57 this.principalId = principalId;
58 }
59
60 public List<LeaveRequestApprovalRow> getLeaveRequestList() {
61 return leaveRequestList;
62 }
63
64 public void setLeaveRequestList(List<LeaveRequestApprovalRow> leaveRequestList) {
65 this.leaveRequestList = leaveRequestList;
66 }
67
68 }