1 package org.kuali.ole.select.keyvalue;
2
3 import org.kuali.ole.select.bo.OLEMobileAccess;
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
10 import java.util.ArrayList;
11 import java.util.Collection;
12 import java.util.List;
13
14
15
16
17 public class OLEMobileAccessKeyValues extends KeyValuesBase {
18
19 @Override
20 public List<KeyValue> getKeyValues() {
21 List<KeyValue> keyValues = new ArrayList<KeyValue>();
22 Collection<OLEMobileAccess> oleMobileAccesses = KRADServiceLocator.getBusinessObjectService().findAll(OLEMobileAccess.class);
23 for (OLEMobileAccess oleMobileAccess : oleMobileAccesses) {
24 if (oleMobileAccess.isActive()) {
25 keyValues.add(new ConcreteKeyValue(oleMobileAccess.getMobileAccessId(), oleMobileAccess.getMobileAccessName()));
26 }
27 }
28 return keyValues;
29 }
30 }