1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.document;
17
18 import org.kuali.rice.krad.rules.rule.event.SaveDocumentEvent;
19 import org.kuali.rice.krad.web.controller.UifControllerBase;
20 import org.kuali.rice.krad.web.form.DocumentFormBase;
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.web.bind.annotation.RequestMapping;
25 import org.springframework.web.bind.annotation.RequestMethod;
26 import org.springframework.web.servlet.ModelAndView;
27
28 import javax.servlet.http.HttpServletResponse;
29
30
31
32
33
34
35
36
37
38 public abstract class DocumentControllerBase extends UifControllerBase {
39
40
41
42
43 @Override
44 protected abstract DocumentFormBase createInitialForm();
45
46
47
48
49 @RequestMapping(params = "methodToCall=docHandler")
50 public ModelAndView docHandler(DocumentFormBase form) throws Exception {
51 return getControllerService().docHandler(form);
52 }
53
54
55
56
57 @RequestMapping(params = "methodToCall=reload")
58 public ModelAndView reload(DocumentFormBase form) throws Exception {
59 return getControllerService().reload(form);
60 }
61
62
63
64
65 @RequestMapping(params = "methodToCall=recall")
66 public ModelAndView recall(DocumentFormBase form) {
67 return getControllerService().recall(form);
68 }
69
70
71
72
73 @RequestMapping(params = "methodToCall=save")
74 public ModelAndView save(DocumentFormBase form) {
75 return getControllerService().save(form);
76 }
77
78
79
80
81
82 protected ModelAndView save(DocumentFormBase form, SaveDocumentEvent saveDocumentEvent) {
83 return getControllerService().save(form, saveDocumentEvent);
84 }
85
86
87
88
89 @RequestMapping(params = "methodToCall=complete")
90 public ModelAndView complete(DocumentFormBase form) {
91 return getControllerService().complete(form);
92 }
93
94
95
96
97 @RequestMapping(params = "methodToCall=route")
98 public ModelAndView route(DocumentFormBase form) {
99 return getControllerService().route(form);
100 }
101
102
103
104
105 @RequestMapping(params = "methodToCall=blanketApprove")
106 public ModelAndView blanketApprove(DocumentFormBase form) {
107 return getControllerService().blanketApprove(form);
108 }
109
110
111
112
113 @RequestMapping(params = "methodToCall=approve")
114 public ModelAndView approve(DocumentFormBase form) {
115 return getControllerService().approve(form);
116 }
117
118
119
120
121 @RequestMapping(params = "methodToCall=disapprove")
122 public ModelAndView disapprove(DocumentFormBase form) {
123 return getControllerService().disapprove(form);
124 }
125
126
127
128
129 @RequestMapping(params = "methodToCall=fyi")
130 public ModelAndView fyi(DocumentFormBase form) {
131 return getControllerService().fyi(form);
132 }
133
134
135
136
137 @RequestMapping(params = "methodToCall=acknowledge")
138 public ModelAndView acknowledge(DocumentFormBase form) {
139 return getControllerService().acknowledge(form);
140 }
141
142
143
144
145 @RequestMapping(params = "methodToCall=sendAdHocRequests")
146 public ModelAndView sendAdHocRequests(DocumentFormBase form) {
147 return getControllerService().sendAdHocRequests(form);
148 }
149
150
151
152
153 @RequestMapping(params = "methodToCall=supervisorFunctions")
154 public ModelAndView supervisorFunctions(DocumentFormBase form) {
155 return getControllerService().supervisorFunctions(form);
156 }
157
158
159
160
161 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=insertNote")
162 public ModelAndView insertNote(DocumentFormBase form) {
163 return getControllerService().insertNote(form);
164 }
165
166
167
168
169 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=deleteNote")
170 public ModelAndView deleteNote(DocumentFormBase form) {
171 return getControllerService().deleteNote(form);
172 }
173
174
175
176
177
178 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=downloadAttachment")
179 public ModelAndView downloadAttachment(DocumentFormBase form, HttpServletResponse response) {
180 return getControllerService().downloadAttachment(form, response);
181 }
182
183
184
185
186 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=cancelAttachment")
187 public ModelAndView cancelAttachment(DocumentFormBase form) {
188 return getControllerService().cancelAttachment(form);
189 }
190
191 @Override
192 protected DocumentControllerService getControllerService() {
193 return (DocumentControllerService) super.getControllerService();
194 }
195
196 @Override
197 @Autowired
198 @Qualifier("documentControllerService")
199 public void setControllerService(ControllerService controllerService) {
200 super.setControllerService(controllerService);
201 }
202
203 }