1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.pm.util;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.apache.commons.collections.CollectionUtils;
22 import org.kuali.kpme.pm.positionResponsibilityOption.PositionResponsibilityOption;
23 import org.kuali.kpme.pm.service.base.PmServiceLocator;
24 import org.kuali.rice.core.api.util.ConcreteKeyValue;
25 import org.kuali.rice.core.api.util.KeyValue;
26 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
27
28 public class PstnRspOptionKeyValueFinder extends KeyValuesBase{
29
30
31
32
33
34
35 private static final long serialVersionUID = -6768131853656090086L;
36
37 @Override
38 public List<KeyValue> getKeyValues() {
39 List<KeyValue> keyValues = new ArrayList<KeyValue>();
40 List<PositionResponsibilityOption> typeList = PmServiceLocator.getPositionResponsibilityOptionService().getAllActivePstnRspOptions();
41 keyValues.add(new ConcreteKeyValue("", ""));
42 if(CollectionUtils.isNotEmpty(typeList)) {
43 for(PositionResponsibilityOption aType : typeList) {
44 keyValues.add(new ConcreteKeyValue((String) aType.getPrOptionId(), (String) aType.getPrOptionName()));
45 }
46 }
47 return keyValues;
48 }
49
50 }