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.api.KimConstants;
22 import org.kuali.rice.kim.bo.ui.PersonDocumentName;
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 public class NameSuffixValuesFinder extends KeyValuesBase {
36
37 private static final String PARAM_BO_CLASSNAME = PersonDocumentName.class.getSimpleName();
38
39
40
41
42 @Override
43 public List<KeyValue> getKeyValues() {
44
45 Collection<String> values = CoreFrameworkServiceLocator.getParameterService().getParameterValuesAsString(
46 KimConstants.NAMESPACE_CODE, PARAM_BO_CLASSNAME, "SUFFIXES"
47 );
48 List<KeyValue> labels = new ArrayList<KeyValue>();
49 labels.add(new ConcreteKeyValue("", ""));
50 for (String suffix : values) {
51 labels.add(new ConcreteKeyValue(suffix, suffix));
52 }
53
54 return labels;
55 }
56
57
58 }