1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.lum.lu.ui.course.keyvalues;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.rice.core.api.util.ConcreteKeyValue;
22 import org.kuali.rice.core.api.util.KeyValue;
23 import org.kuali.rice.krad.uif.control.UifKeyValuesFinderBase;
24 import org.kuali.rice.krad.uif.view.ViewModel;
25
26
27
28
29
30
31
32
33 public class CourseJointKeyValuesFinder extends UifKeyValuesFinderBase {
34
35 private static final long serialVersionUID = 1394806282459489941L;
36
37 public enum SearchByKeys {
38 COURSES_AND_PROPOSALS("Courses and Proposals"), COURSES_ONLY("Courses Only"), PROPOSALS_ONLY("Proposals Only");
39
40 private String display;
41
42 SearchByKeys(String display) {
43 this.display = display;
44 }
45
46 public String getDisplay() {
47 return display;
48 }
49 }
50
51 @Override
52 public List<KeyValue> getKeyValues(ViewModel model) {
53 final List<KeyValue> keyValues = new ArrayList<KeyValue>();
54 keyValues.add(new ConcreteKeyValue(SearchByKeys.COURSES_AND_PROPOSALS.toString(), SearchByKeys.COURSES_AND_PROPOSALS.getDisplay()));
55 keyValues.add(new ConcreteKeyValue(SearchByKeys.COURSES_ONLY.toString(), SearchByKeys.COURSES_ONLY.getDisplay()));
56 keyValues.add(new ConcreteKeyValue(SearchByKeys.PROPOSALS_ONLY.toString(), SearchByKeys.PROPOSALS_ONLY.getDisplay()));
57 return keyValues;
58 }
59
60 }