View Javadoc
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.inquiry;
17  
18  import org.kuali.rice.krad.web.form.InquiryForm;
19  import org.kuali.rice.krad.web.service.ControllerService;
20  
21  import javax.servlet.http.HttpServletRequest;
22  import javax.servlet.http.HttpServletResponse;
23  
24  /**
25   * Controller service that extends {@link org.kuali.rice.krad.web.service.ControllerService} and adds
26   * methods specific to inquiry views.
27   *
28   * @author Kuali Rice Team (rice.collab@kuali.org)
29   */
30  public interface InquiryControllerService extends ControllerService {
31  
32      /**
33       * When the data object is a {@link org.kuali.rice.krad.bo.PersistableAttachment} or
34       * {@link org.kuali.rice.krad.bo.PersistableAttachmentList}, streams the selected attachment back to the
35       * response.
36       *
37       * @param form form instance containing the inquiry data
38       * @param response Http response for returning the attachment contents
39       */
40      void downloadDataObjectAttachment(InquiryForm form, HttpServletResponse response);
41  
42      /**
43       * When the data object is a custom object, streams the requested attachment back to the
44       * response.
45       *
46       * @param form form instance containing the inquiry data
47       * @param request Http request for sending the fileName, contentType, and fileContentDataObjField
48       * @param response Http response for returning the attachment contents
49       */
50      void downloadCustomDataObjectAttachment(InquiryForm form, HttpServletRequest request,
51              HttpServletResponse response) throws Exception;
52  }