1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.bo.options; |
17 | |
|
18 | |
import org.kuali.rice.core.api.util.ConcreteKeyValue; |
19 | |
import org.kuali.rice.core.api.util.KeyValue; |
20 | |
import org.kuali.rice.core.framework.services.CoreFrameworkServiceLocator; |
21 | |
import org.kuali.rice.kim.bo.ui.PersonDocumentName; |
22 | |
import org.kuali.rice.kim.util.KimConstants; |
23 | |
import org.kuali.rice.krad.keyvalues.KeyValuesBase; |
24 | |
|
25 | |
import java.util.ArrayList; |
26 | |
import java.util.Collection; |
27 | |
import java.util.List; |
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | 0 | public class NameSuffixValuesFinder extends KeyValuesBase { |
36 | |
|
37 | 0 | private static final String PARAM_BO_CLASSNAME = PersonDocumentName.class.getSimpleName(); |
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
@Override |
43 | |
public List<KeyValue> getKeyValues() { |
44 | |
|
45 | 0 | Collection<String> values = CoreFrameworkServiceLocator.getParameterService().getParameterValuesAsString( |
46 | |
KimConstants.NAMESPACE_CODE, PARAM_BO_CLASSNAME, "SUFFIXES" |
47 | |
); |
48 | 0 | List<KeyValue> labels = new ArrayList<KeyValue>(); |
49 | 0 | labels.add(new ConcreteKeyValue("", "")); |
50 | 0 | for (String suffix : values) { |
51 | 0 | labels.add(new ConcreteKeyValue(suffix, suffix)); |
52 | |
} |
53 | |
|
54 | 0 | return labels; |
55 | |
} |
56 | |
|
57 | |
|
58 | |
} |