01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.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 edu.iu.uis.eden.clientapp.vo;
18:
19: import java.io.Serializable;
20:
21: /**
22: * Transport object responsble for holding the process a document has been through.
23: *
24: * @author ewestfal
25: *
26: * @workflow.webservice-object
27: */
28: public class RoutePathVO implements Serializable {
29:
30: private static final long serialVersionUID = 2883128962971335387L;
31:
32: private ProcessVO[] processes = new ProcessVO[0];
33:
34: public ProcessVO[] getProcesses() {
35: return processes;
36: }
37:
38: public void setProcesses(ProcessVO[] processes) {
39: this .processes = processes;
40: }
41:
42: public ProcessVO getPrimaryProcess() {
43: for (int index = 0; index < processes.length; index++) {
44: ProcessVO process = processes[index];
45: if (process.isInitial()) {
46: return process;
47: }
48: }
49: return null;
50: }
51:
52: public RouteNodeVO getRouteNode(Long routeNodeId) {
53: for (int index = 0; index < processes.length; index++) {
54: ProcessVO process = processes[index];
55: RouteNodeVO node = process.getRouteNode(routeNodeId);
56: if (node != null) {
57: return node;
58: }
59: }
60: return null;
61: }
62:
63: }
|