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