1 package org.kuali.ole.deliver.lookup;
2
3 import org.kuali.rice.kim.api.identity.Person;
4 import org.kuali.rice.kim.api.identity.PersonService;
5 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
6 import org.kuali.rice.kim.impl.KIMPropertyConstants;
7 import org.kuali.rice.krad.lookup.LookupableImpl;
8 import org.kuali.rice.krad.web.form.LookupForm;
9
10 import java.util.Collection;
11 import java.util.List;
12 import java.util.Map;
13
14
15
16
17
18
19
20
21 public class OleCirculationDeskMappingLookupableImpl extends LookupableImpl {
22 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(OleCirculationDeskMappingLookupableImpl.class);
23 @Override
24 public Collection<?> performSearch(LookupForm form, Map<String, String> searchCriteria, boolean bounded) {
25
26 if (searchCriteria != null && org.apache.commons.lang.StringUtils.isNotEmpty(searchCriteria.get(
27 KIMPropertyConstants.Person.PRINCIPAL_NAME))) {
28 searchCriteria.put(KIMPropertyConstants.Person.PRINCIPAL_NAME, searchCriteria.get(
29 KIMPropertyConstants.Person.PRINCIPAL_NAME).toLowerCase());
30 }
31 bounded = false;
32 List<Person> persons = getPersonService().findPeople(searchCriteria, bounded);
33 sortSearchResults(form, persons);
34
35 return persons;
36 }
37
38 public PersonService getPersonService() {
39 return KimApiServiceLocator.getPersonService();
40 }
41
42 }