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.web.service; 17 18 import org.kuali.rice.krad.web.form.UifFormBase; 19 import org.springframework.web.servlet.ModelAndView; 20 21 import javax.servlet.http.HttpServletResponse; 22 23 /** 24 * Controller service that provides methods for working with the multi-file upload component. 25 * 26 * @author Kuali Rice Team (rice.collab@kuali.org) 27 */ 28 public interface FileControllerService { 29 30 /** 31 * Invoked by the multiFile upload element to add a file object to the collection it controls. 32 * 33 * @param form form instance containing the file data 34 * @return ModelAndView instance for rendering the view 35 */ 36 ModelAndView addFileUploadLine(UifFormBase form); 37 38 /** 39 * Invoked by the multiFile upload widget to delete a file; Inform the model of file to delete. 40 * 41 * @param form form instance containing the file data 42 * @return ModelAndView instance for rendering the view 43 */ 44 ModelAndView deleteFileUploadLine(UifFormBase form); 45 46 /** 47 * Invoked by the multiFile upload widget to get the file contents for a file upload line. 48 * 49 * @param form form instance containing the file request data 50 * @param response Http response for streaming back the file contents 51 */ 52 void getFileFromLine(UifFormBase form, HttpServletResponse response); 53 }