| 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.KeyLabelPair; |
| 22 | |
import org.kuali.rice.kns.service.KNSServiceLocator; |
| 23 | |
import org.kuali.rice.kns.service.ModuleService; |
| 24 | |
|
| 25 | 0 | public class ModuleValuesFinder extends KeyValuesBase { |
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
public List getKeyValues() { |
| 31 | 0 | List keyValues = new ArrayList(); |
| 32 | 0 | keyValues.add(new KeyLabelPair("", "")); |
| 33 | |
|
| 34 | 0 | for (ModuleService moduleService : KNSServiceLocator.getKualiModuleService().getInstalledModuleServices()) { |
| 35 | 0 | keyValues.add(getKeyLabelPair(moduleService.getModuleConfiguration().getNamespaceCode(), |
| 36 | |
KNSServiceLocator.getKualiModuleService().getNamespaceName(moduleService.getModuleConfiguration().getNamespaceCode()))); |
| 37 | |
} |
| 38 | 0 | return keyValues; |
| 39 | |
} |
| 40 | |
|
| 41 | |
private KeyLabelPair getKeyLabelPair(String moduleCode, String moduleName) { |
| 42 | 0 | return new KeyLabelPair(moduleCode, moduleCode + " - " + moduleName); |
| 43 | |
} |
| 44 | |
} |