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.maintenance; 017 018import org.kuali.rice.krad.document.DocumentControllerService; 019import org.kuali.rice.krad.web.form.MaintenanceDocumentForm; 020import org.springframework.web.servlet.ModelAndView; 021 022import javax.servlet.http.HttpServletResponse; 023 024/** 025 * Controller service that extends {@link org.kuali.rice.krad.document.DocumentControllerService} and adds 026 * methods specific to maintenance documents. 027 * 028 * @author Kuali Rice Team (rice.collab@kuali.org) 029 */ 030public interface MaintenanceDocumentControllerService extends DocumentControllerService { 031 032 /** 033 * Sets up a new maintenance document for an edit action on the data object identified by the form 034 * parameters. 035 * 036 * @param form form instance containing the maintenance data 037 * @return ModelAndView instance for rendering the edit maintenance view 038 */ 039 ModelAndView setupMaintenanceEdit(MaintenanceDocumentForm form); 040 041 /** 042 * Sets up a new maintenance document for a copy action on the data object identified by the form 043 * parameters. 044 * 045 * @param form form instance containing the maintenance data 046 * @return ModelAndView instance for rendering the copy maintenance view 047 */ 048 ModelAndView setupMaintenanceCopy(MaintenanceDocumentForm form); 049 050 /** 051 * Sets up a new maintenance document for a new with existing action on the data object identified by the form 052 * parameters. 053 * 054 * @param form form instance containing the maintenance data 055 * @return ModelAndView instance for rendering the new maintenance view 056 */ 057 ModelAndView setupMaintenanceNewWithExisting(MaintenanceDocumentForm form); 058 059 /** 060 * Sets up a new maintenance document for a delete action on the data object identified by the form 061 * parameters. 062 * 063 * @param form form instance containing the maintenance data 064 * @return ModelAndView instance for rendering the delete maintenance view 065 */ 066 ModelAndView setupMaintenanceDelete(MaintenanceDocumentForm form); 067 068 /** 069 * Invoked to setup a new maintenance document for the maintenance data contained on the form 070 * and the given maintenance action. 071 * 072 * @param form form instance containing the maintenance data 073 * @param maintenanceAction type of maintenance action being requested (new, edit, copy, delete) 074 */ 075 void setupMaintenanceDocument(MaintenanceDocumentForm form, String maintenanceAction); 076 077 /** 078 * When the maintenance data object is a {@link org.kuali.rice.krad.bo.PersistableAttachment} or 079 * {@link org.kuali.rice.krad.bo.PersistableAttachmentList}, streams the selected attachment back to the 080 * response. 081 * 082 * @param form form instance containing the maintenance data 083 * @param response Http response for returning the attachment contents 084 */ 085 void downloadDataObjectAttachment(MaintenanceDocumentForm form, HttpServletResponse response); 086}