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.inquiry;
017
018import org.kuali.rice.krad.web.form.InquiryForm;
019import org.kuali.rice.krad.web.service.ControllerService;
020
021import javax.servlet.http.HttpServletRequest;
022import javax.servlet.http.HttpServletResponse;
023
024/**
025 * Controller service that extends {@link org.kuali.rice.krad.web.service.ControllerService} and adds
026 * methods specific to inquiry views.
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030public interface InquiryControllerService extends ControllerService {
031
032    /**
033     * When the data object is a {@link org.kuali.rice.krad.bo.PersistableAttachment} or
034     * {@link org.kuali.rice.krad.bo.PersistableAttachmentList}, streams the selected attachment back to the
035     * response.
036     *
037     * @param form form instance containing the inquiry data
038     * @param response Http response for returning the attachment contents
039     */
040    void downloadDataObjectAttachment(InquiryForm form, HttpServletResponse response);
041
042    /**
043     * When the data object is a custom object, streams the requested attachment back to the
044     * response.
045     *
046     * @param form form instance containing the inquiry data
047     * @param request Http request for sending the fileName, contentType, and fileContentDataObjField
048     * @param response Http response for returning the attachment contents
049     */
050    void downloadCustomDataObjectAttachment(InquiryForm form, HttpServletRequest request,
051            HttpServletResponse response) throws Exception;
052}