01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
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: * $Header:$
18: */
19: package org.apache.beehive.netui.pageflow.internal;
20:
21: /**
22: * Encapsulation of an error that happens when a databinding expression is applied on POST.
23: */
24: public class BindingUpdateError implements java.io.Serializable {
25: private String _expression;
26: private String _message;
27: private Throwable _cause;
28:
29: /**
30: * Constructor to initialize all values.
31: *
32: * @param expression the expression associated with this error.
33: * @param message the error message.
34: * @param cause the Throwable that caused the error.
35: */
36: public BindingUpdateError(String expression, String message,
37: Throwable cause) {
38: _expression = expression;
39: _message = message;
40: _cause = cause;
41: }
42:
43: /**
44: * Get the expression associated with this error.
45: * @return a String containing the expression associated with this error.
46: */
47: public String getExpression() {
48: return _expression;
49: }
50:
51: /**
52: * Set the expression associated with this error.
53: * @param expression a String containing the expression associated with this error.
54: */
55: public void setExpression(String expression) {
56: _expression = expression;
57: }
58:
59: /**
60: * Get the error message.
61: * @return a String containing the error message.
62: */
63: public String getMessage() {
64: return _message;
65: }
66:
67: /**
68: * Set the error message.
69: * @param message a String containing the error message.
70: */
71: public void setMessage(String message) {
72: _message = message;
73: }
74:
75: /**
76: * Get the cause of the error.
77: * @return the Throwable that caused the error.
78: */
79: public Throwable getCause() {
80: return _cause;
81: }
82:
83: /**
84: * Set the cause of the error.
85: * @param cause the Throwable that caused the error.
86: */
87: public void setCause(Throwable cause) {
88: _cause = cause;
89: }
90: }
|