1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.inquiry;
17
18 import org.kuali.rice.krad.util.KRADConstants;
19 import org.kuali.rice.krad.web.controller.UifControllerBase;
20 import org.kuali.rice.krad.web.form.InquiryForm;
21 import org.kuali.rice.krad.web.service.ControllerService;
22 import org.springframework.beans.factory.annotation.Autowired;
23 import org.springframework.beans.factory.annotation.Qualifier;
24 import org.springframework.stereotype.Controller;
25 import org.springframework.web.bind.annotation.RequestMapping;
26 import org.springframework.web.bind.annotation.RequestMethod;
27 import org.springframework.web.servlet.ModelAndView;
28
29 import javax.servlet.http.HttpServletRequest;
30 import javax.servlet.http.HttpServletResponse;
31
32
33
34
35
36
37
38 @Controller
39 @RequestMapping(value = KRADConstants.ControllerMappings.INQUIRY)
40 public class InquiryController extends UifControllerBase {
41
42
43
44
45 @Override
46 protected InquiryForm createInitialForm() {
47 return new InquiryForm();
48 }
49
50
51
52
53
54 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=downloadDataObjectAttachment")
55 public ModelAndView downloadDataObjectAttachment(InquiryForm form, HttpServletResponse response) {
56 getControllerService().downloadDataObjectAttachment(form, response);
57
58 return null;
59 }
60
61
62
63
64
65 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=downloadCustomDataObjectAttachment")
66 public ModelAndView downloadCustomDataObjectAttachment(InquiryForm form, HttpServletRequest request,
67 HttpServletResponse response) throws Exception {
68 getControllerService().downloadCustomDataObjectAttachment(form, request, response);
69
70 return null;
71 }
72
73 @Override
74 protected InquiryControllerService getControllerService() {
75 return (InquiryControllerService) super.getControllerService();
76 }
77
78 @Override
79 @Autowired
80 @Qualifier("inquiryControllerService")
81 public void setControllerService(ControllerService controllerService) {
82 super.setControllerService(controllerService);
83 }
84 }