1 /**
2 * Copyright 2005-2014 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krad.lookup;
17
18 import org.kuali.rice.krad.web.service.ControllerService;
19 import org.springframework.web.servlet.ModelAndView;
20 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
21
22 /**
23 * Controller service that provides methods for supporting a lookup view.
24 *
25 * @author Kuali Rice Team (rice.collab@kuali.org)
26 */
27 public interface LookupControllerService extends ControllerService {
28
29 /**
30 * Executes a search using the provided criteria and builds a list of results to return
31 * to the user.
32 *
33 * @param lookupForm form instance containing the lookup data
34 * @return ModelAndView instance for rendering the view
35 */
36 ModelAndView search(LookupForm lookupForm);
37
38 /**
39 * Performs a reset (or clear) on the lookup criteria values.
40 *
41 * @param lookupForm form instance containing the lookup data
42 * @return ModelAndView instance for rendering the view
43 */
44 ModelAndView clearValues(LookupForm lookupForm);
45
46 /**
47 * Handles the select all pages action on the lookup results.
48 *
49 * @param lookupForm form instance containing the lookup data
50 * @return ModelAndView instance for rendering the view
51 */
52 ModelAndView selectAllPages(LookupForm lookupForm);
53
54 /**
55 * Handles the deselect all pages action on the lookup results.
56 *
57 * @param lookupForm form instance containing the lookup data
58 * @return ModelAndView instance for rendering the view
59 */
60 ModelAndView deselectAllPages(LookupForm lookupForm);
61
62 /**
63 * Invoked from the UI to return the selected lookup results lines back to the calling view.
64 *
65 * @param lookupForm form instance containing the lookup data
66 * @param redirectAttributes spring provided redirect attributes
67 * @return String url for redirecting back to the lookup caller
68 */
69 String returnSelected(LookupForm lookupForm, RedirectAttributes redirectAttributes);
70 }