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.core.api.criteria.Predicate; |
20 | |
import org.kuali.rice.core.api.criteria.PredicateUtils; |
21 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
22 | |
import org.kuali.rice.kim.api.KimConstants; |
23 | |
import org.kuali.rice.kim.api.group.Group; |
24 | |
import org.kuali.rice.kim.api.group.GroupQueryResults; |
25 | |
import org.kuali.rice.kim.api.group.GroupService; |
26 | |
import org.kuali.rice.kim.api.identity.PersonService; |
27 | |
import org.kuali.rice.kim.api.services.KimApiServiceLocator; |
28 | |
import org.kuali.rice.kim.impl.KIMPropertyConstants; |
29 | |
import org.kuali.rice.kim.impl.group.GroupBo; |
30 | |
import org.kuali.rice.krad.lookup.LookupableImpl; |
31 | |
import org.kuali.rice.krad.web.form.LookupForm; |
32 | |
|
33 | |
import java.sql.Timestamp; |
34 | |
import java.util.ArrayList; |
35 | |
import java.util.Calendar; |
36 | |
import java.util.HashMap; |
37 | |
import java.util.List; |
38 | |
import java.util.Map; |
39 | |
|
40 | |
import static org.kuali.rice.core.api.criteria.PredicateFactory.*; |
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | 0 | public class PersonLookupableImpl extends LookupableImpl { |
48 | |
private static final long serialVersionUID = -3149952849854425077L; |
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
@Override |
56 | |
protected List<?> getSearchResults(LookupForm form, Map<String, String> searchCriteria, boolean unbounded) { |
57 | |
|
58 | 0 | if (searchCriteria != null && StringUtils.isNotEmpty(searchCriteria.get( |
59 | |
KIMPropertyConstants.Person.PRINCIPAL_NAME))) { |
60 | 0 | searchCriteria.put(KIMPropertyConstants.Person.PRINCIPAL_NAME, searchCriteria.get( |
61 | |
KIMPropertyConstants.Person.PRINCIPAL_NAME).toLowerCase()); |
62 | |
} |
63 | |
|
64 | 0 | return getPersonService().findPeople(searchCriteria, unbounded); |
65 | |
} |
66 | |
|
67 | |
public PersonService getPersonService() { |
68 | 0 | return KimApiServiceLocator.getPersonService(); |
69 | |
} |
70 | |
} |