1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.impl.type; |
17 | |
|
18 | |
import org.kuali.rice.core.api.util.ConcreteKeyValue; |
19 | |
import org.kuali.rice.core.api.util.KeyValue; |
20 | |
import org.kuali.rice.krad.keyvalues.KeyValuesBase; |
21 | |
import org.kuali.rice.krad.service.KRADServiceLocator; |
22 | |
import org.kuali.rice.krad.uif.control.UifKeyValuesFinderBase; |
23 | |
import org.kuali.rice.krad.uif.view.View; |
24 | |
import org.kuali.rice.krad.uif.view.ViewModel; |
25 | |
|
26 | |
import java.util.ArrayList; |
27 | |
import java.util.Collection; |
28 | |
import java.util.List; |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | 0 | public class KewTypeOptionsFinder extends UifKeyValuesFinderBase { |
36 | |
|
37 | |
@Override |
38 | |
public List<KeyValue> getKeyValues(ViewModel model) { |
39 | 0 | List<KeyValue> kewTypes = new ArrayList<KeyValue>(); |
40 | |
|
41 | 0 | Collection<KewTypeBo> kewTypeBos = KRADServiceLocator.getBusinessObjectService().findAllOrderBy(KewTypeBo.class, |
42 | |
"namespace", true); |
43 | 0 | for (KewTypeBo typeBo : kewTypeBos) { |
44 | 0 | if (typeBo.isActive()) { |
45 | 0 | kewTypes.add(new ConcreteKeyValue(typeBo.getId(), typeBo.getNamespace() + " - " + typeBo.getName())); |
46 | |
} |
47 | |
} |
48 | |
|
49 | 0 | return kewTypes; |
50 | |
} |
51 | |
} |