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