1 package org.kuali.ole.select.keyvalue;
2
3 import org.kuali.ole.select.bo.OleLicenseRequestStatus;
4 import org.kuali.rice.core.api.util.ConcreteKeyValue;
5 import org.kuali.rice.core.api.util.KeyValue;
6 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
7 import org.kuali.rice.krad.service.KRADServiceLocator;
8 import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
9 import org.kuali.rice.krad.service.LookupService;
10
11 import java.util.ArrayList;
12 import java.util.Collection;
13 import java.util.List;
14
15
16
17
18 public class OleLicenseRequestStatusKeyValues extends KeyValuesBase {
19 private boolean blankOption;
20
21
22
23
24
25
26 public boolean isBlankOption() {
27 return this.blankOption;
28 }
29
30
31
32
33
34
35 public void setBlankOption(boolean blankOption) {
36 this.blankOption = blankOption;
37 }
38
39
40
41
42
43
44 @Override
45 public List getKeyValues() {
46 List<KeyValue> keyValues = new ArrayList<KeyValue>();
47 Collection<OleLicenseRequestStatus> licenseRequestStatus = KRADServiceLocator.getBusinessObjectService().findAll(OleLicenseRequestStatus.class);
48 keyValues.add(new ConcreteKeyValue("", ""));
49 for (OleLicenseRequestStatus licenseRequestStatusObj : licenseRequestStatus) {
50 keyValues.add(new ConcreteKeyValue(licenseRequestStatusObj.getName(), licenseRequestStatusObj.getName()));
51 }
52 return keyValues;
53 }
54
55 private LookupService getLookupService() {
56 return KRADServiceLocatorWeb.getLookupService();
57 }
58 }
59