1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.documentoperation.web; |
17 | |
|
18 | |
import java.util.ArrayList; |
19 | |
import java.util.HashMap; |
20 | |
import java.util.List; |
21 | |
import java.util.Map; |
22 | |
|
23 | |
import org.apache.commons.collections.Factory; |
24 | |
import org.apache.commons.collections.ListUtils; |
25 | |
import org.kuali.rice.kew.api.action.ActionRequestStatus; |
26 | |
import org.kuali.rice.kew.api.action.RecipientType; |
27 | |
import org.kuali.rice.kew.engine.node.Branch; |
28 | |
import org.kuali.rice.kew.engine.node.RouteNodeInstance; |
29 | |
import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue; |
30 | |
import org.kuali.rice.kew.api.KewApiConstants; |
31 | |
import org.kuali.rice.kns.web.struts.form.KualiForm; |
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
public class DocumentOperationForm extends KualiForm { |
39 | |
|
40 | |
private static final long serialVersionUID = 2994179393392218743L; |
41 | |
private DocumentRouteHeaderValue routeHeader; |
42 | |
private String documentId; |
43 | |
|
44 | 0 | private List actionRequestOps = new ArrayList(); |
45 | 0 | private List actionTakenOps = new ArrayList(); |
46 | 0 | private List actionItemOps = new ArrayList(); |
47 | |
|
48 | |
|
49 | |
private String routeHeaderOp; |
50 | |
|
51 | |
private String statusModDate; |
52 | |
private String createDate; |
53 | |
private String approvedDate; |
54 | |
private String finalizedDate; |
55 | |
private String routeStatusDate; |
56 | |
private String routeLevelDate; |
57 | |
private String lookupableImplServiceName; |
58 | |
private String lookupType; |
59 | 0 | private Map docStatuses = KewApiConstants.DOCUMENT_STATUSES; |
60 | 0 | private Map actionRequestCds = KewApiConstants.ACTION_REQUEST_CD; |
61 | 0 | private Map actionTakenCds = KewApiConstants.ACTION_TAKEN_CD; |
62 | |
private List routeModules; |
63 | |
private String routeModuleName; |
64 | |
|
65 | |
private String lookupInvocationModule; |
66 | |
private String lookupInvocationField; |
67 | |
private String lookupInvocationIndex; |
68 | |
|
69 | |
|
70 | 0 | private List routeNodeInstances=ListUtils.lazyList(new ArrayList(), |
71 | 0 | new Factory() { |
72 | |
public Object create() { |
73 | 0 | return new RouteNodeInstance(); |
74 | |
} |
75 | |
}); |
76 | |
|
77 | 0 | private List routeNodeInstanceOps=new ArrayList(); |
78 | 0 | private List branches=ListUtils.lazyList(new ArrayList(), |
79 | 0 | new Factory() { |
80 | |
public Object create() { |
81 | 0 | return new Branch(); |
82 | |
} |
83 | |
}); |
84 | 0 | private List branchOps=new ArrayList(); |
85 | 0 | private List nodeStateDeleteOps=new ArrayList(); |
86 | |
private String nodeStatesDelete; |
87 | |
private String branchStatesDelete; |
88 | |
private String initialNodeInstances; |
89 | |
|
90 | |
private String annotation; |
91 | |
|
92 | |
private String blanketApproveUser; |
93 | |
private String blanketApproveActionTakenId; |
94 | |
private String blanketApproveNodes; |
95 | |
private String actionInvocationUser; |
96 | |
private String actionInvocationActionItemId; |
97 | |
private String actionInvocationActionCode; |
98 | |
|
99 | |
public String getAnnotation() { |
100 | 0 | return annotation; |
101 | |
} |
102 | |
|
103 | |
public void setAnnotation(String annotation) { |
104 | 0 | this.annotation = annotation; |
105 | 0 | } |
106 | |
|
107 | |
public String getInitialNodeInstances(){ |
108 | 0 | return initialNodeInstances; |
109 | |
} |
110 | |
|
111 | |
public void setInitialNodeInstances(String initialNodeInstances){ |
112 | 0 | this.initialNodeInstances=initialNodeInstances; |
113 | 0 | } |
114 | |
|
115 | |
public String getNodeStatesDelete(){ |
116 | 0 | return nodeStatesDelete; |
117 | |
} |
118 | |
|
119 | |
public void setNodeStatesDelete(String nodeStatesDelete){ |
120 | 0 | this.nodeStatesDelete=nodeStatesDelete; |
121 | 0 | } |
122 | |
|
123 | |
public String getBranchStatesDelete(){ |
124 | 0 | return branchStatesDelete; |
125 | |
} |
126 | |
|
127 | |
public void setBranchStatesDelete(String branchStatesDelete){ |
128 | 0 | this.branchStatesDelete=branchStatesDelete; |
129 | 0 | } |
130 | |
|
131 | 0 | public DocumentOperationForm(){ |
132 | 0 | routeHeader = new DocumentRouteHeaderValue(); |
133 | 0 | } |
134 | |
|
135 | |
public DocumentRouteHeaderValue getRouteHeader() { |
136 | 0 | return routeHeader; |
137 | |
} |
138 | |
public void setRouteHeader(DocumentRouteHeaderValue routeHeader) { |
139 | 0 | this.routeHeader = routeHeader; |
140 | 0 | } |
141 | |
|
142 | |
public DocOperationIndexedParameter getActionRequestOp(int index) { |
143 | 0 | while (actionRequestOps.size() <= index) { |
144 | 0 | actionRequestOps.add(new DocOperationIndexedParameter(new Integer(index), KewApiConstants.NOOP)); |
145 | |
} |
146 | 0 | return (DocOperationIndexedParameter) getActionRequestOps().get(index); |
147 | |
} |
148 | |
|
149 | |
public DocOperationIndexedParameter getActionTakenOp(int index) { |
150 | 0 | while (actionTakenOps.size() <= index) { |
151 | 0 | actionTakenOps.add(new DocOperationIndexedParameter(new Integer(index), KewApiConstants.NOOP)); |
152 | |
} |
153 | 0 | return (DocOperationIndexedParameter) getActionTakenOps().get(index); |
154 | |
} |
155 | |
|
156 | |
public DocOperationIndexedParameter getRouteNodeInstanceOp(int index) { |
157 | 0 | while (routeNodeInstanceOps.size() <= index) { |
158 | 0 | routeNodeInstanceOps.add(new DocOperationIndexedParameter(new Integer(index), KewApiConstants.NOOP)); |
159 | |
} |
160 | 0 | return (DocOperationIndexedParameter) getRouteNodeInstanceOps().get(index); |
161 | |
} |
162 | |
|
163 | |
public DocOperationIndexedParameter getBranchOp(int index) { |
164 | 0 | while (branchOps.size() <= index) { |
165 | 0 | branchOps.add(new DocOperationIndexedParameter(new Integer(index), KewApiConstants.NOOP)); |
166 | |
} |
167 | 0 | return (DocOperationIndexedParameter) getBranchOps().get(index); |
168 | |
} |
169 | |
|
170 | |
public DocOperationIndexedParameter getActionItemOp(int index) { |
171 | 0 | while (actionItemOps.size() <= index) { |
172 | 0 | actionItemOps.add(new DocOperationIndexedParameter(new Integer(index), KewApiConstants.NOOP)); |
173 | |
} |
174 | 0 | return (DocOperationIndexedParameter) getActionItemOps().get(index); |
175 | |
} |
176 | |
|
177 | |
public DocOperationIndexedParameter getNodeStateDeleteOp(int index){ |
178 | 0 | while(nodeStateDeleteOps.size()<=index){ |
179 | 0 | nodeStateDeleteOps.add(new DocOperationIndexedParameter(new Integer(index),"")); |
180 | |
} |
181 | 0 | return(DocOperationIndexedParameter) getNodeStateDeleteOps().get(index); |
182 | |
} |
183 | |
|
184 | |
public List getActionItemOps() { |
185 | 0 | return actionItemOps; |
186 | |
} |
187 | |
public void setActionItemOps(List actionItemOps) { |
188 | 0 | this.actionItemOps = actionItemOps; |
189 | 0 | } |
190 | |
public List getActionRequestOps() { |
191 | 0 | return actionRequestOps; |
192 | |
} |
193 | |
public void setActionRequestOps(List actionRequestOps) { |
194 | 0 | this.actionRequestOps = actionRequestOps; |
195 | 0 | } |
196 | |
public List getActionTakenOps() { |
197 | 0 | return actionTakenOps; |
198 | |
} |
199 | |
public List getRouteNodeInstanceOps() { |
200 | 0 | return routeNodeInstanceOps; |
201 | |
} |
202 | |
|
203 | |
public List getBranchOps(){ |
204 | 0 | return branchOps; |
205 | |
} |
206 | |
|
207 | |
public List getNodeStateDeleteOps(){ |
208 | 0 | return nodeStateDeleteOps; |
209 | |
} |
210 | |
|
211 | |
public void setActionTakenOps(List actionTakenOps) { |
212 | 0 | this.actionTakenOps = actionTakenOps; |
213 | 0 | } |
214 | |
|
215 | |
public void setRouteNodeInstanceOps(List routeNodeInstanceOps) { |
216 | 0 | this.routeNodeInstanceOps = routeNodeInstanceOps; |
217 | 0 | } |
218 | |
|
219 | |
public void setBranchOps(List branchOps){ |
220 | 0 | this.branchOps=branchOps; |
221 | 0 | } |
222 | |
|
223 | |
public void setNodeStateDeleteOps(List nodeStateDeleteOps){ |
224 | 0 | this.nodeStateDeleteOps=nodeStateDeleteOps; |
225 | 0 | } |
226 | |
|
227 | |
public String getRouteHeaderOp() { |
228 | 0 | return routeHeaderOp; |
229 | |
} |
230 | |
public void setRouteHeaderOp(String routeHeaderOp) { |
231 | 0 | this.routeHeaderOp = routeHeaderOp; |
232 | 0 | } |
233 | |
public String getApprovedDate() { |
234 | 0 | return approvedDate; |
235 | |
} |
236 | |
public void setApprovedDate(String approvedDate) { |
237 | 0 | this.approvedDate = approvedDate; |
238 | 0 | } |
239 | |
public String getCreateDate() { |
240 | 0 | return createDate; |
241 | |
} |
242 | |
public void setCreateDate(String createDate) { |
243 | 0 | this.createDate = createDate; |
244 | 0 | } |
245 | |
public String getFinalizedDate() { |
246 | 0 | return finalizedDate; |
247 | |
} |
248 | |
public void setFinalizedDate(String finalizedDate) { |
249 | 0 | this.finalizedDate = finalizedDate; |
250 | 0 | } |
251 | |
public String getRouteLevelDate() { |
252 | 0 | return routeLevelDate; |
253 | |
} |
254 | |
public void setRouteLevelDate(String routeLevelDate) { |
255 | 0 | this.routeLevelDate = routeLevelDate; |
256 | 0 | } |
257 | |
public String getRouteStatusDate() { |
258 | 0 | return routeStatusDate; |
259 | |
} |
260 | |
public void setRouteStatusDate(String routeStatusDate) { |
261 | 0 | this.routeStatusDate = routeStatusDate; |
262 | 0 | } |
263 | |
public String getStatusModDate() { |
264 | 0 | return statusModDate; |
265 | |
} |
266 | |
public void setStatusModDate(String statusModDate) { |
267 | 0 | this.statusModDate = statusModDate; |
268 | 0 | } |
269 | |
|
270 | |
|
271 | |
public String getLookupableImplServiceName() { |
272 | 0 | return lookupableImplServiceName; |
273 | |
} |
274 | |
public void setLookupableImplServiceName(String lookupableImplServiceName) { |
275 | 0 | this.lookupableImplServiceName = lookupableImplServiceName; |
276 | 0 | } |
277 | |
public String getLookupType() { |
278 | 0 | return lookupType; |
279 | |
} |
280 | |
public void setLookupType(String lookupType) { |
281 | 0 | this.lookupType = lookupType; |
282 | 0 | } |
283 | |
|
284 | |
public Map getDocStatuses() { |
285 | 0 | return docStatuses; |
286 | |
} |
287 | |
|
288 | |
public Map getActionRequestCds() { |
289 | 0 | return actionRequestCds; |
290 | |
} |
291 | |
public Map<String, String> getActionRequestRecipientTypes() { |
292 | 0 | Map<String, String> actionRequestRecipientTypes = new HashMap<String, String>(); |
293 | 0 | for (RecipientType recipientType : RecipientType.values()) { |
294 | 0 | actionRequestRecipientTypes.put(recipientType.getCode(), recipientType.getLabel()); |
295 | |
} |
296 | 0 | return actionRequestRecipientTypes; |
297 | |
} |
298 | |
public Map<String, String> getActionRequestStatuses() { |
299 | 0 | Map<String, String> actionRequestStatuses = new HashMap<String, String>(); |
300 | 0 | for (ActionRequestStatus requestStatus : ActionRequestStatus.values()) { |
301 | 0 | actionRequestStatuses.put(requestStatus.getCode(), requestStatus.getLabel()); |
302 | |
} |
303 | 0 | return actionRequestStatuses; |
304 | |
} |
305 | |
|
306 | |
public String getLookupInvocationField() { |
307 | 0 | return lookupInvocationField; |
308 | |
} |
309 | |
public void setLookupInvocationField(String lookupInvocationField) { |
310 | 0 | this.lookupInvocationField = lookupInvocationField; |
311 | 0 | } |
312 | |
public String getLookupInvocationIndex() { |
313 | 0 | return lookupInvocationIndex; |
314 | |
} |
315 | |
public void setLookupInvocationIndex(String lookupInvocationIndex) { |
316 | 0 | this.lookupInvocationIndex = lookupInvocationIndex; |
317 | 0 | } |
318 | |
public String getLookupInvocationModule() { |
319 | 0 | return lookupInvocationModule; |
320 | |
} |
321 | |
public void setLookupInvocationModule(String lookupInvocationModule) { |
322 | 0 | this.lookupInvocationModule = lookupInvocationModule; |
323 | 0 | } |
324 | |
public Map getActionTakenCds() { |
325 | 0 | return actionTakenCds; |
326 | |
} |
327 | |
|
328 | |
public String getDocumentId() { |
329 | 0 | return documentId; |
330 | |
} |
331 | |
public void setDocumentId(String documentId) { |
332 | 0 | this.documentId = documentId; |
333 | 0 | } |
334 | |
|
335 | |
public List getRouteModules() { |
336 | 0 | return routeModules; |
337 | |
} |
338 | |
|
339 | |
public void setRouteModules(List routeModules) { |
340 | 0 | this.routeModules = routeModules; |
341 | 0 | } |
342 | |
|
343 | |
public String getRouteModuleName() { |
344 | 0 | return routeModuleName; |
345 | |
} |
346 | |
|
347 | |
public void setRouteModuleName(String routeModuleName) { |
348 | 0 | this.routeModuleName = routeModuleName; |
349 | 0 | } |
350 | |
|
351 | |
|
352 | |
|
353 | |
|
354 | |
|
355 | |
public List getRouteNodeInstances(){ |
356 | 0 | return routeNodeInstances; |
357 | |
} |
358 | |
|
359 | |
public void setRouteNodeInstances(List routeNodeInstances){ |
360 | 0 | this.routeNodeInstances=routeNodeInstances; |
361 | 0 | } |
362 | |
|
363 | |
public RouteNodeInstance getRouteNodeInstance(int index){ |
364 | 0 | while (getRouteNodeInstances().size() <= index) { |
365 | 0 | getRouteNodeInstances().add(new RouteNodeInstance()); |
366 | |
} |
367 | 0 | return (RouteNodeInstance) getRouteNodeInstances().get(index); |
368 | |
} |
369 | |
|
370 | |
public List getBranches(){ |
371 | 0 | return branches; |
372 | |
} |
373 | |
|
374 | |
public void setBranches(List branches){ |
375 | 0 | this.branches=branches; |
376 | 0 | } |
377 | |
|
378 | |
public Branch getBranche(int index){ |
379 | 0 | while(getBranches().size()<=index){ |
380 | 0 | getBranches().add(new Branch()); |
381 | |
} |
382 | 0 | return (Branch) getBranches().get(index); |
383 | |
} |
384 | |
|
385 | |
public void resetOps(){ |
386 | 0 | routeNodeInstanceOps=new ArrayList(); |
387 | 0 | branchOps=new ArrayList(); |
388 | 0 | actionRequestOps = new ArrayList(); |
389 | 0 | actionTakenOps = new ArrayList(); |
390 | 0 | actionItemOps = new ArrayList(); |
391 | 0 | } |
392 | |
|
393 | |
public String getActionInvocationActionCode() { |
394 | 0 | return actionInvocationActionCode; |
395 | |
} |
396 | |
|
397 | |
public void setActionInvocationActionCode(String actionInvocationActionCode) { |
398 | 0 | this.actionInvocationActionCode = actionInvocationActionCode; |
399 | 0 | } |
400 | |
|
401 | |
public String getActionInvocationActionItemId() { |
402 | 0 | return actionInvocationActionItemId; |
403 | |
} |
404 | |
|
405 | |
public void setActionInvocationActionItemId(String actionInvocationActionItemId) { |
406 | 0 | this.actionInvocationActionItemId = actionInvocationActionItemId; |
407 | 0 | } |
408 | |
|
409 | |
public String getActionInvocationUser() { |
410 | 0 | return actionInvocationUser; |
411 | |
} |
412 | |
|
413 | |
public void setActionInvocationUser(String actionInvocationUser) { |
414 | 0 | this.actionInvocationUser = actionInvocationUser; |
415 | 0 | } |
416 | |
|
417 | |
public String getBlanketApproveActionTakenId() { |
418 | 0 | return blanketApproveActionTakenId; |
419 | |
} |
420 | |
|
421 | |
public void setBlanketApproveActionTakenId(String blanketApproveActionTakenId) { |
422 | 0 | this.blanketApproveActionTakenId = blanketApproveActionTakenId; |
423 | 0 | } |
424 | |
|
425 | |
public String getBlanketApproveNodes() { |
426 | 0 | return blanketApproveNodes; |
427 | |
} |
428 | |
|
429 | |
public void setBlanketApproveNodes(String blanketApproveNodes) { |
430 | 0 | this.blanketApproveNodes = blanketApproveNodes; |
431 | 0 | } |
432 | |
|
433 | |
public String getBlanketApproveUser() { |
434 | 0 | return blanketApproveUser; |
435 | |
} |
436 | |
|
437 | |
public void setBlanketApproveUser(String blanketApproveUser) { |
438 | 0 | this.blanketApproveUser = blanketApproveUser; |
439 | 0 | } |
440 | |
|
441 | |
|
442 | |
} |