1 /** 2 * Copyright 2005-2015 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.web.service; 17 18 import org.kuali.rice.krad.uif.field.AttributeQueryResult; 19 import org.kuali.rice.krad.web.form.UifFormBase; 20 import org.springframework.web.servlet.ModelAndView; 21 22 /** 23 * Controller service that provides handling for query methods suggest as performing a lookup, field suggest, 24 * and field query. 25 * 26 * @author Kuali Rice Team (rice.collab@kuali.org) 27 */ 28 public interface QueryControllerService { 29 30 /** 31 * Handles the perform lookup action by building up a URL to the lookup view and configuring 32 * a redirect. 33 * 34 * @param form form instance containing the model data 35 * @return ModelAndView configured for redirecting to the lookup view 36 */ 37 ModelAndView performLookup(UifFormBase form); 38 39 /** 40 * Invoked to provides options (execute a query) for a field that contains a suggest widget. 41 * 42 * @param form form instance containing the model data 43 * @return AttributeQueryResult containing the results of the suggest query 44 */ 45 AttributeQueryResult performFieldSuggest(UifFormBase form); 46 47 /** 48 * Invoked to execute the attribute query associated with a field given the query parameters 49 * found in the request 50 * 51 * @param form form instance containing the model data 52 * @return AttributeQueryResult containing the results of the field query 53 */ 54 AttributeQueryResult performFieldQuery(UifFormBase form); 55 }