1 package org.kuali.ole.select.keyvalue;
2
3 import org.kuali.ole.select.bo.OLEAccessActivationConfiguration;
4 import org.kuali.ole.select.bo.OLEAccessType;
5 import org.kuali.rice.core.api.util.ConcreteKeyValue;
6 import org.kuali.rice.core.api.util.KeyValue;
7 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
8 import org.kuali.rice.krad.service.KRADServiceLocator;
9
10 import java.util.ArrayList;
11 import java.util.Collection;
12 import java.util.List;
13
14
15
16
17 public class OLEEResourceWorkflowConfigKeyValue extends KeyValuesBase {
18 @Override
19 public List getKeyValues() {
20 List<KeyValue> keyValues = new ArrayList<KeyValue>();
21 Collection<OLEAccessActivationConfiguration> oleAccessActivationConfigurations = KRADServiceLocator.getBusinessObjectService().findAll(OLEAccessActivationConfiguration.class);
22 keyValues.add(new ConcreteKeyValue("",""));
23 for (OLEAccessActivationConfiguration oleAccessActivationConfiguration : oleAccessActivationConfigurations) {
24 if (oleAccessActivationConfiguration.isActive() && oleAccessActivationConfiguration.getWorkflowType().equals("accessActivation")) {
25 keyValues.add(new ConcreteKeyValue(oleAccessActivationConfiguration.getAccessActivationConfigurationId(), oleAccessActivationConfiguration.getWorkflowName()));
26 }
27 }
28 return keyValues;
29 }
30
31 }