1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.select.businessobject.options;
17
18 import org.kuali.ole.sys.OLEConstants;
19 import org.kuali.rice.core.api.util.ConcreteKeyValue;
20 import org.kuali.rice.kew.doctype.ApplicationDocumentStatus;
21 import org.kuali.rice.kew.doctype.bo.DocumentType;
22 import org.kuali.rice.kew.service.KEWServiceLocator;
23 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
24
25 import java.util.ArrayList;
26 import java.util.List;
27
28 public class OleOrderQueueRequisitionStatusValuesFinder extends KeyValuesBase {
29
30 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
31 .getLogger(OleOrderQueueRequisitionStatusValuesFinder.class);
32
33 @Override
34 public List getKeyValues() {
35 LOG.debug("Inside getKeyValues of OleOrderQueueRequisitionStatusValuesFinder");
36 DocumentType documentType = KEWServiceLocator.getDocumentTypeService().findByNameCaseInsensitive(
37 OLEConstants.OHQ_REQUISITION_STATUS);
38 List<ApplicationDocumentStatus> applicationDocumentStatus = documentType.getValidApplicationStatuses();
39 List labels = new ArrayList();
40 labels.add(new ConcreteKeyValue("", ""));
41 for (ApplicationDocumentStatus status : applicationDocumentStatus) {
42 labels.add(new ConcreteKeyValue(status.getStatusName(), status.getStatusName()));
43 }
44 return labels;
45 }
46
47 }