Coverage Report - org.kuali.rice.kew.dto.DocumentDetailDTO
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentDetailDTO
0%
0/22
0%
0/4
1.25
 
 1  
 /*
 2  
  * Copyright 2005-2009 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.dto;
 18  
 
 19  
 import java.util.HashMap;
 20  
 import java.util.Map;
 21  
 
 22  
 /**
 23  
  * Document plus it's requests and actions.  Primarily used by the routingReport method 
 24  
  * on WorkflowInfo
 25  
  * 
 26  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 27  
  */
 28  0
 public class DocumentDetailDTO extends RouteHeaderDTO {
 29  
 
 30  
         private static final long serialVersionUID = -6089529693944755804L;
 31  
         
 32  0
         private ActionRequestDTO[] actionRequests = new ActionRequestDTO[0];
 33  0
         private ActionTakenDTO[] actionsTaken = new ActionTakenDTO[0];
 34  0
     private RouteNodeInstanceDTO[] nodeInstances = new RouteNodeInstanceDTO[0];
 35  
 
 36  0
     private Map nodeInstanceMap = null;
 37  
     
 38  
         public ActionRequestDTO[] getActionRequests() {
 39  0
                 return actionRequests;
 40  
         }
 41  
 
 42  
         public void setActionRequests(ActionRequestDTO[] actionRequests) {
 43  0
                 this.actionRequests = actionRequests;
 44  0
         }
 45  
 
 46  
         public ActionTakenDTO[] getActionsTaken() {
 47  0
                 return actionsTaken;
 48  
         }
 49  
 
 50  
         public void setActionsTaken(ActionTakenDTO[] actionsTaken) {
 51  0
                 this.actionsTaken = actionsTaken;
 52  0
         }
 53  
     
 54  
     public RouteNodeInstanceDTO[] getNodeInstances() {
 55  0
         return nodeInstances;
 56  
     }
 57  
 
 58  
     public void setNodeInstances(RouteNodeInstanceDTO[] nodeInstances) {
 59  0
         this.nodeInstances = nodeInstances;
 60  0
     }
 61  
 
 62  
     public RouteNodeInstanceDTO getNodeInstance(Long nodeInstanceId) {
 63  0
         if (nodeInstanceMap == null) {
 64  0
             populateNodeInstanceMap();
 65  
         }
 66  0
         return (RouteNodeInstanceDTO)nodeInstanceMap.get(nodeInstanceId);
 67  
     }
 68  
     
 69  
     private void populateNodeInstanceMap() {
 70  0
         nodeInstanceMap = new HashMap();
 71  0
         for (int index = 0; index < nodeInstances.length; index++) {
 72  0
             RouteNodeInstanceDTO nodeInstance = nodeInstances[index];
 73  0
             nodeInstanceMap.put(nodeInstance.getRouteNodeInstanceId(), nodeInstance);
 74  
         }
 75  0
     }
 76  
     
 77  
     
 78  
 
 79  
 }