Coverage Report - org.kuali.rice.kew.documentoperation.web.DocumentOperationForm
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentOperationForm
0%
0/153
0%
0/16
1.094
DocumentOperationForm$1
0%
0/2
N/A
1.094
DocumentOperationForm$2
0%
0/2
N/A
1.094
 
 1  
 /*
 2  
  * Copyright 2005-2008 The Kuali Foundation
 3  
  *
 4  
  *
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  *
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 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  
  * struts form bean for {@link DocumentOperationAction}.
 34  
  *
 35  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 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  0
     private List actionRequestOps = new ArrayList();
 44  0
     private List actionTakenOps = new ArrayList();
 45  0
     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  0
     private Map docStatuses = KEWConstants.DOCUMENT_STATUSES;
 59  0
     private Map actionRequestCds = KEWConstants.ACTION_REQUEST_CD;
 60  0
     private Map actionRequestStatuses = KEWConstants.ACTION_REQUEST_STATUS;
 61  0
     private Map actionRequestRecipientTypes = KEWConstants.ACTION_REQUEST_RECIPIENT_TYPE;
 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  
     //variabes for RouteNodeInstances and branches
 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 getActionRequestRecipientTypes() {
 293  0
         return actionRequestRecipientTypes;
 294  
     }
 295  
     public Map getActionRequestStatuses() {
 296  0
         return actionRequestStatuses;
 297  
     }
 298  
 
 299  
     public String getLookupInvocationField() {
 300  0
         return lookupInvocationField;
 301  
     }
 302  
     public void setLookupInvocationField(String lookupInvocationField) {
 303  0
         this.lookupInvocationField = lookupInvocationField;
 304  0
     }
 305  
     public String getLookupInvocationIndex() {
 306  0
         return lookupInvocationIndex;
 307  
     }
 308  
     public void setLookupInvocationIndex(String lookupInvocationIndex) {
 309  0
         this.lookupInvocationIndex = lookupInvocationIndex;
 310  0
     }
 311  
     public String getLookupInvocationModule() {
 312  0
         return lookupInvocationModule;
 313  
     }
 314  
     public void setLookupInvocationModule(String lookupInvocationModule) {
 315  0
         this.lookupInvocationModule = lookupInvocationModule;
 316  0
     }
 317  
     public Map getActionTakenCds() {
 318  0
         return actionTakenCds;
 319  
     }
 320  
 
 321  
     public String getRouteHeaderId() {
 322  0
         return routeHeaderId;
 323  
     }
 324  
     public void setRouteHeaderId(String routeHeaderId) {
 325  0
         this.routeHeaderId = routeHeaderId;
 326  0
     }
 327  
 
 328  
     public List getRouteModules() {
 329  0
         return routeModules;
 330  
     }
 331  
 
 332  
     public void setRouteModules(List routeModules) {
 333  0
         this.routeModules = routeModules;
 334  0
     }
 335  
 
 336  
     public String getRouteModuleName() {
 337  0
         return routeModuleName;
 338  
     }
 339  
 
 340  
     public void setRouteModuleName(String routeModuleName) {
 341  0
         this.routeModuleName = routeModuleName;
 342  0
     }
 343  
 
 344  
     /*
 345  
      * methods for route node instances
 346  
      */
 347  
 
 348  
     public List getRouteNodeInstances(){
 349  0
             return routeNodeInstances;
 350  
     }
 351  
 
 352  
     public void setRouteNodeInstances(List routeNodeInstances){
 353  0
             this.routeNodeInstances=routeNodeInstances;
 354  0
     }
 355  
 
 356  
     public RouteNodeInstance getRouteNodeInstance(int index){
 357  0
             while (getRouteNodeInstances().size() <= index) {
 358  0
                 getRouteNodeInstances().add(new RouteNodeInstance());
 359  
             }
 360  0
             return (RouteNodeInstance) getRouteNodeInstances().get(index);
 361  
     }
 362  
 
 363  
     public List getBranches(){
 364  0
             return branches;
 365  
     }
 366  
 
 367  
     public void setBranches(List branches){
 368  0
             this.branches=branches;
 369  0
     }
 370  
 
 371  
     public Branch getBranche(int index){
 372  0
             while(getBranches().size()<=index){
 373  0
                     getBranches().add(new Branch());
 374  
             }
 375  0
             return (Branch) getBranches().get(index);
 376  
     }
 377  
 
 378  
     public void resetOps(){
 379  0
             routeNodeInstanceOps=new ArrayList();
 380  0
             branchOps=new ArrayList();
 381  0
             actionRequestOps = new ArrayList();
 382  0
         actionTakenOps = new ArrayList();
 383  0
         actionItemOps = new ArrayList();
 384  0
     }
 385  
 
 386  
         public String getActionInvocationActionCode() {
 387  0
                 return actionInvocationActionCode;
 388  
         }
 389  
 
 390  
         public void setActionInvocationActionCode(String actionInvocationActionCode) {
 391  0
                 this.actionInvocationActionCode = actionInvocationActionCode;
 392  0
         }
 393  
 
 394  
         public String getActionInvocationActionItemId() {
 395  0
                 return actionInvocationActionItemId;
 396  
         }
 397  
 
 398  
         public void setActionInvocationActionItemId(String actionInvocationActionItemId) {
 399  0
                 this.actionInvocationActionItemId = actionInvocationActionItemId;
 400  0
         }
 401  
 
 402  
         public String getActionInvocationUser() {
 403  0
                 return actionInvocationUser;
 404  
         }
 405  
 
 406  
         public void setActionInvocationUser(String actionInvocationUser) {
 407  0
                 this.actionInvocationUser = actionInvocationUser;
 408  0
         }
 409  
 
 410  
         public String getBlanketApproveActionTakenId() {
 411  0
                 return blanketApproveActionTakenId;
 412  
         }
 413  
 
 414  
         public void setBlanketApproveActionTakenId(String blanketApproveActionTakenId) {
 415  0
                 this.blanketApproveActionTakenId = blanketApproveActionTakenId;
 416  0
         }
 417  
 
 418  
         public String getBlanketApproveNodes() {
 419  0
                 return blanketApproveNodes;
 420  
         }
 421  
 
 422  
         public void setBlanketApproveNodes(String blanketApproveNodes) {
 423  0
                 this.blanketApproveNodes = blanketApproveNodes;
 424  0
         }
 425  
 
 426  
         public String getBlanketApproveUser() {
 427  0
                 return blanketApproveUser;
 428  
         }
 429  
 
 430  
         public void setBlanketApproveUser(String blanketApproveUser) {
 431  0
                 this.blanketApproveUser = blanketApproveUser;
 432  0
         }
 433  
 
 434  
 
 435  
 }