1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.tklm.leave.request;
17
18
19 import java.util.ArrayList;
20 import java.util.List;
21
22 import org.kuali.rice.core.api.util.ConcreteKeyValue;
23 import org.kuali.rice.core.api.util.KeyValue;
24 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
25
26 public class LeaveRequestActionValuesFinder extends KeyValuesBase {
27 private static final String ACTION_CODE_PREFIX = "action:";
28
29 @Override
30 public List<KeyValue> getKeyValues() {
31 List<KeyValue> statuses = new ArrayList<KeyValue>();
32 addCategory(statuses, LeaveRequestActionValue.NO_ACTION);
33 addCategory(statuses, LeaveRequestActionValue.APPROVE);
34 addCategory(statuses, LeaveRequestActionValue.DISAPPROVE);
35 addCategory(statuses, LeaveRequestActionValue.DEFER);
36 return statuses;
37 }
38
39 private void addCategory(List<KeyValue> statuses, LeaveRequestActionValue action) {
40 statuses.add(new ConcreteKeyValue(action.getCode(), action.getLabel()));
41 }
42 }