Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ProcessDocReport |
|
| 1.0;1 |
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.postprocessor; | |
18 | ||
19 | /** | |
20 | * Returned from a {@link PostProcessor} to indicate success of failure of | |
21 | * a particular event. If success is false then this will typically trigger | |
22 | * the document to go into exception routing. | |
23 | * | |
24 | * @see PostProcessor | |
25 | * | |
26 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
27 | */ | |
28 | public class ProcessDocReport implements java.io.Serializable { | |
29 | ||
30 | static final long serialVersionUID = 376851530227478560L; | |
31 | ||
32 | 0 | private boolean success = false; |
33 | private String message; | |
34 | 0 | private Exception processException = null; |
35 | ||
36 | public ProcessDocReport(boolean success) { | |
37 | 0 | this(success, ""); |
38 | 0 | } |
39 | ||
40 | 0 | public ProcessDocReport(boolean success, String message) { |
41 | 0 | this.success = success; |
42 | 0 | this.message = message; |
43 | 0 | } |
44 | ||
45 | 0 | public ProcessDocReport(boolean success, String message, Exception e) { |
46 | 0 | this.success = success; |
47 | 0 | this.message = message; |
48 | 0 | this.processException = e; |
49 | 0 | } |
50 | ||
51 | public String getMessage() { | |
52 | 0 | return message; |
53 | } | |
54 | ||
55 | public Exception getProcessException() { | |
56 | 0 | return processException; |
57 | } | |
58 | ||
59 | public boolean isSuccess() { | |
60 | 0 | return success; |
61 | } | |
62 | } |