1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.impl.identity;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.rice.kim.api.identity.PersonService;
20 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
21 import org.kuali.rice.kim.impl.KIMPropertyConstants;
22 import org.kuali.rice.krad.lookup.LookupableImpl;
23 import org.kuali.rice.krad.lookup.LookupForm;
24
25 import java.util.Collection;
26 import java.util.List;
27 import java.util.Map;
28
29
30
31
32
33
34 public class PersonLookupableImpl extends LookupableImpl {
35 private static final long serialVersionUID = -3149952849854425077L;
36
37
38
39
40
41
42 @Override
43 protected Collection<?> executeSearch(Map<String, String> adjustedSearchCriteria,
44 List<String> wildcardAsLiteralSearchCriteria, boolean bounded, Integer searchResultsLimit) {
45
46 if (adjustedSearchCriteria != null && StringUtils.isNotEmpty(adjustedSearchCriteria.get(
47 KIMPropertyConstants.Person.PRINCIPAL_NAME))) {
48 adjustedSearchCriteria.put(KIMPropertyConstants.Person.PRINCIPAL_NAME, adjustedSearchCriteria.get(
49 KIMPropertyConstants.Person.PRINCIPAL_NAME).toLowerCase());
50 }
51
52 return getPersonService().findPeople(adjustedSearchCriteria, !bounded);
53 }
54
55 public PersonService getPersonService() {
56 return KimApiServiceLocator.getPersonService();
57 }
58 }