001/** 002 * Copyright 2005-2018 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.lookup; 017 018import org.kuali.rice.krad.web.service.ControllerService; 019import org.springframework.web.servlet.ModelAndView; 020import org.springframework.web.servlet.mvc.support.RedirectAttributes; 021 022/** 023 * Controller service that provides methods for supporting a lookup view. 024 * 025 * @author Kuali Rice Team (rice.collab@kuali.org) 026 */ 027public interface LookupControllerService extends ControllerService { 028 029 /** 030 * Executes a search using the provided criteria and builds a list of results to return 031 * to the user. 032 * 033 * @param lookupForm form instance containing the lookup data 034 * @return ModelAndView instance for rendering the view 035 */ 036 ModelAndView search(LookupForm lookupForm); 037 038 /** 039 * Performs a reset (or clear) on the lookup criteria values. 040 * 041 * @param lookupForm form instance containing the lookup data 042 * @return ModelAndView instance for rendering the view 043 */ 044 ModelAndView clearValues(LookupForm lookupForm); 045 046 /** 047 * Handles the select all pages action on the lookup results. 048 * 049 * @param lookupForm form instance containing the lookup data 050 * @return ModelAndView instance for rendering the view 051 */ 052 ModelAndView selectAllPages(LookupForm lookupForm); 053 054 /** 055 * Handles the deselect all pages action on the lookup results. 056 * 057 * @param lookupForm form instance containing the lookup data 058 * @return ModelAndView instance for rendering the view 059 */ 060 ModelAndView deselectAllPages(LookupForm lookupForm); 061 062 /** 063 * Invoked from the UI to return the selected lookup results lines back to the calling view. 064 * 065 * @param lookupForm form instance containing the lookup data 066 * @param redirectAttributes spring provided redirect attributes 067 * @return String url for redirecting back to the lookup caller 068 */ 069 String returnSelected(LookupForm lookupForm, RedirectAttributes redirectAttributes); 070}