| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
package org.kuali.rice.kew.dto; |
| 18 | |
|
| 19 | |
import java.util.HashMap; |
| 20 | |
import java.util.Map; |
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 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 | |
} |