1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kns.lookup.keyvalues; |
17 | |
|
18 | |
import java.util.ArrayList; |
19 | |
import java.util.List; |
20 | |
|
21 | |
import org.kuali.rice.core.util.KeyValue; |
22 | |
import org.kuali.rice.core.util.ConcreteKeyValue; |
23 | |
import org.kuali.rice.kns.service.KNSServiceLocatorWeb; |
24 | |
import org.kuali.rice.kns.service.ModuleService; |
25 | |
|
26 | 0 | public class ModuleValuesFinder extends KeyValuesBase { |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
@Override |
32 | |
public List<KeyValue> getKeyValues() { |
33 | 0 | List<KeyValue> keyValues = new ArrayList<KeyValue>(); |
34 | 0 | keyValues.add(new ConcreteKeyValue("", "")); |
35 | |
|
36 | 0 | for (ModuleService moduleService : KNSServiceLocatorWeb.getKualiModuleService().getInstalledModuleServices()) { |
37 | 0 | keyValues.add(getKeyValue(moduleService.getModuleConfiguration().getNamespaceCode(), |
38 | |
KNSServiceLocatorWeb.getKualiModuleService().getNamespaceName(moduleService.getModuleConfiguration().getNamespaceCode()))); |
39 | |
} |
40 | 0 | return keyValues; |
41 | |
} |
42 | |
|
43 | |
private KeyValue getKeyValue(String moduleCode, String moduleName) { |
44 | 0 | return new ConcreteKeyValue(moduleCode, moduleCode + " - " + moduleName); |
45 | |
} |
46 | |
} |