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.form.UifFormBase;
22 import org.kuali.rice.krad.web.service.ControllerService;
23 import org.springframework.beans.factory.annotation.Autowired;
24 import org.springframework.beans.factory.annotation.Qualifier;
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.HttpServletResponse;
30
31
32
33
34
35
36
37
38
39 public abstract class DocumentControllerBase extends UifControllerBase {
40
41
42
43
44 @Override
45 protected abstract DocumentFormBase createInitialForm();
46
47
48
49
50 @RequestMapping(params = "methodToCall=docHandler")
51 public ModelAndView docHandler(DocumentFormBase form) throws Exception {
52 return getControllerService().docHandler(form);
53 }
54
55
56
57
58 @RequestMapping(params = "methodToCall=reload")
59 public ModelAndView reload(DocumentFormBase form) throws Exception {
60 return getControllerService().reload(form);
61 }
62
63
64
65
66 @RequestMapping(params = "methodToCall=recall")
67 public ModelAndView recall(DocumentFormBase form) {
68 return getControllerService().recall(form);
69 }
70
71
72
73
74 @Override
75 @RequestMapping(params = "methodToCall=save")
76 public ModelAndView save(UifFormBase form) {
77 return getControllerService().save((DocumentFormBase) form);
78 }
79
80
81
82
83
84 protected ModelAndView save(DocumentFormBase form, SaveDocumentEvent saveDocumentEvent) {
85 return getControllerService().save(form, saveDocumentEvent);
86 }
87
88
89
90
91 @RequestMapping(params = "methodToCall=complete")
92 public ModelAndView complete(DocumentFormBase form) {
93 return getControllerService().complete(form);
94 }
95
96
97
98
99 @RequestMapping(params = "methodToCall=route")
100 public ModelAndView route(DocumentFormBase form) {
101 return getControllerService().route(form);
102 }
103
104
105
106
107 @RequestMapping(params = "methodToCall=blanketApprove")
108 public ModelAndView blanketApprove(DocumentFormBase form) {
109 return getControllerService().blanketApprove(form);
110 }
111
112
113
114
115 @RequestMapping(params = "methodToCall=approve")
116 public ModelAndView approve(DocumentFormBase form) {
117 return getControllerService().approve(form);
118 }
119
120
121
122
123 @RequestMapping(params = "methodToCall=disapprove")
124 public ModelAndView disapprove(DocumentFormBase form) {
125 return getControllerService().disapprove(form);
126 }
127
128
129
130
131 @RequestMapping(params = "methodToCall=fyi")
132 public ModelAndView fyi(DocumentFormBase form) {
133 return getControllerService().fyi(form);
134 }
135
136
137
138
139 @RequestMapping(params = "methodToCall=acknowledge")
140 public ModelAndView acknowledge(DocumentFormBase form) {
141 return getControllerService().acknowledge(form);
142 }
143
144
145
146
147 @RequestMapping(params = "methodToCall=sendAdHocRequests")
148 public ModelAndView sendAdHocRequests(DocumentFormBase form) {
149 return getControllerService().sendAdHocRequests(form);
150 }
151
152
153
154
155 @RequestMapping(params = "methodToCall=supervisorFunctions")
156 public ModelAndView supervisorFunctions(DocumentFormBase form) {
157 return getControllerService().supervisorFunctions(form);
158 }
159
160
161
162
163
164
165 @RequestMapping(params = "methodToCall=close")
166 public ModelAndView close(DocumentFormBase form) {
167 return getControllerService().close(form);
168 }
169
170
171
172
173 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=insertNote")
174 public ModelAndView insertNote(DocumentFormBase form) {
175 return getControllerService().insertNote(form);
176 }
177
178
179
180
181 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=deleteNote")
182 public ModelAndView deleteNote(DocumentFormBase form) {
183 return getControllerService().deleteNote(form);
184 }
185
186
187
188
189
190
191 @RequestMapping(params = "methodToCall=superUserTakeActions")
192 public ModelAndView superUserTakeActions(DocumentFormBase form) {
193 return getControllerService().superUserTakeActions(form);
194 }
195
196
197
198
199
200
201 @RequestMapping(params = "methodToCall=superUserApprove")
202 public ModelAndView superUserApprove(DocumentFormBase form) {
203 return getControllerService().superUserApprove(form);
204 }
205
206
207
208
209
210
211 @RequestMapping(params = "methodToCall=superUserDisapprove")
212 public ModelAndView superUserDisapprove(DocumentFormBase form) {
213 return getControllerService().superUserDisapprove(form);
214 }
215
216
217
218
219
220 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=downloadAttachment")
221 public ModelAndView downloadAttachment(DocumentFormBase form, HttpServletResponse response) {
222 return getControllerService().downloadAttachment(form, response);
223 }
224
225
226
227
228 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=cancelAttachment")
229 public ModelAndView cancelAttachment(DocumentFormBase form) {
230 return getControllerService().cancelAttachment(form);
231 }
232
233 @Override
234 protected DocumentControllerService getControllerService() {
235 return (DocumentControllerService) super.getControllerService();
236 }
237
238 @Override
239 @Autowired
240 @Qualifier("documentControllerService")
241 public void setControllerService(ControllerService controllerService) {
242 super.setControllerService(controllerService);
243 }
244
245 }