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 java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.rice.kim.api.identity.Person;
22 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
23
24 public class LeaveRequestApprovalEmployeeRow implements Comparable<LeaveRequestApprovalEmployeeRow> {
25
26 private String employeeName;
27 private String principalId;
28 private List<LeaveRequestApprovalRow> leaveRequestList = new ArrayList<LeaveRequestApprovalRow>();
29
30 public int compareTo(LeaveRequestApprovalEmployeeRow row) {
31 return employeeName.compareToIgnoreCase(row.getEmployeeName());
32 }
33
34 public String getUserTargetURLParams() {
35 StringBuffer link = new StringBuffer();
36 link.append("methodToCall=changeTargetPerson");
37 Person person = KimApiServiceLocator.getPersonService().getPerson(this.getPrincipalId());
38 link.append("&principalName=").append(person.getPrincipalName());
39
40 return link.toString();
41 }
42
43 public String getEmployeeName() {
44 return employeeName;
45 }
46
47 public void setEmployeeName(String employeeName) {
48 this.employeeName = employeeName;
49 }
50
51 public String getPrincipalId() {
52 return principalId;
53 }
54
55 public void setPrincipalId(String principalId) {
56 this.principalId = principalId;
57 }
58
59 public List<LeaveRequestApprovalRow> getLeaveRequestList() {
60 return leaveRequestList;
61 }
62
63 public void setLeaveRequestList(List<LeaveRequestApprovalRow> leaveRequestList) {
64 this.leaveRequestList = leaveRequestList;
65 }
66
67 }