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.web.form.UifFormBase; 19 import org.springframework.web.servlet.ModelAndView; 20 21 /** 22 * Controller service that provides methods for navigating within the application and a view. 23 * 24 * @author Kuali Rice Team (rice.collab@kuali.org) 25 */ 26 public interface NavigationControllerService { 27 28 /** 29 * Returns back to a previous URL by looking at various return mechanisms in HistoryFlow and on the form. 30 * 31 * <p>Method supports the general back action component.</p> 32 * 33 * @param form form instance containing the model data 34 * @return ModelAndView instance for rendering the view 35 */ 36 ModelAndView back(UifFormBase form); 37 38 /** 39 * Invoked to navigate back one page in the user's history. 40 * 41 * @param form form instance containing the model data 42 * @return ModelAndView instance for rendering the view 43 */ 44 ModelAndView returnToPrevious(UifFormBase form); 45 46 /** 47 * Invoked to navigate back to the first page in the user's history. 48 * 49 * @param form form instance containing the model data 50 * @return ModelAndView instance for rendering the view 51 */ 52 ModelAndView returnToHub(UifFormBase form); 53 54 /** 55 * Invoked to navigate back to a point in the user's history. 56 * 57 * @param form form instance containing the model data 58 * @param returnToApplicationHome indicates whether the user should be returned to the application home URL 59 * @return ModelAndView instance for rendering the view 60 */ 61 ModelAndView returnToHistory(UifFormBase form, boolean returnToPrevious, boolean returnToApplicationHome, 62 boolean returnToFlowStart); 63 64 /** 65 * Invoked to navigate to a new page within the view. 66 * 67 * @param form form instance containing the model data 68 * @return ModelAndView instance for rendering the view 69 */ 70 ModelAndView navigate(UifFormBase form); 71 72 }