1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.enrollment.class2.courseoffering.keyvalue;
18
19 import org.kuali.rice.core.api.util.ConcreteKeyValue;
20 import org.kuali.rice.core.api.util.KeyValue;
21 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
22 import org.kuali.student.enrollment.courseoffering.dto.WaitlistLevel;
23
24 import java.io.Serializable;
25 import java.util.ArrayList;
26 import java.util.List;
27
28
29
30
31
32
33 public class WaitlistLevelOptionsKeyValues extends KeyValuesBase implements Serializable {
34
35 private static final long serialVersionUID = 1L;
36
37 @Override
38 public List<KeyValue> getKeyValues() {
39
40 List<KeyValue> keyValues = new ArrayList<KeyValue>();
41
42 for (WaitlistLevel waitlistLevel : WaitlistLevel.values()) {
43 if (waitlistLevel.equals(WaitlistLevel.COURSE_OFFERING)) {
44 keyValues.add(new ConcreteKeyValue(waitlistLevel.toString(), "Course Offering"));
45 } else if (waitlistLevel.equals(WaitlistLevel.ACTIVITY_OFFERING)) {
46 keyValues.add(new ConcreteKeyValue(waitlistLevel.toString(), "Activity Offering"));
47 }
48 }
49
50 return keyValues;
51 }
52
53 }