Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RoutePathDTO |
|
| 2.0;2 |
1 | /* | |
2 | * Copyright 2005-2009 The Kuali Foundation | |
3 | * | |
4 | * * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | ||
6 | * you may not use this file except in compliance with the License. | |
7 | * You may obtain a copy of the License at | |
8 | * * http://www.opensource.org/licenses/ecl2.php | |
9 | ||
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.io.Serializable; | |
20 | ||
21 | /** | |
22 | * Transport object responsible for holding the process a document has been through. | |
23 | * | |
24 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
25 | */ | |
26 | 0 | public class RoutePathDTO implements Serializable { |
27 | ||
28 | private static final long serialVersionUID = 2883128962971335387L; | |
29 | ||
30 | 0 | private ProcessDTO[] processes = new ProcessDTO[0]; |
31 | ||
32 | public ProcessDTO[] getProcesses() { | |
33 | 0 | return processes; |
34 | } | |
35 | ||
36 | public void setProcesses(ProcessDTO[] processes) { | |
37 | 0 | this.processes = processes; |
38 | 0 | } |
39 | ||
40 | public ProcessDTO getPrimaryProcess() { | |
41 | 0 | for (int index = 0; index < processes.length; index++) { |
42 | 0 | ProcessDTO process = processes[index]; |
43 | 0 | if (process.isInitial()) { |
44 | 0 | return process; |
45 | } | |
46 | } | |
47 | 0 | return null; |
48 | } | |
49 | ||
50 | ||
51 | } |