KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > pageflow > internal > BindingUpdateError


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18 package org.apache.beehive.netui.pageflow.internal;
19
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 JavaDoc
25 {
26     private String JavaDoc _expression;
27     private String JavaDoc _message;
28     private Throwable JavaDoc _cause;
29
30     /**
31      * Constructor to initialize all values.
32      *
33      * @param expression the expression associated with this error.
34      * @param message the error message.
35      * @param cause the Throwable that caused the error.
36      */

37     public BindingUpdateError( String JavaDoc expression, String JavaDoc message, Throwable JavaDoc cause )
38     {
39         _expression = expression;
40         _message = message;
41         _cause = cause;
42     }
43
44     /**
45      * Get the expression associated with this error.
46      * @return a String containing the expression associated with this error.
47      */

48     public String JavaDoc getExpression()
49     {
50         return _expression;
51     }
52
53     /**
54      * Set the expression associated with this error.
55      * @param expression a String containing the expression associated with this error.
56      */

57     public void setExpression( String JavaDoc expression )
58     {
59         _expression = expression;
60     }
61
62     /**
63      * Get the error message.
64      * @return a String containing the error message.
65      */

66     public String JavaDoc getMessage()
67     {
68         return _message;
69     }
70
71     /**
72      * Set the error message.
73      * @param message a String containing the error message.
74      */

75     public void setMessage( String JavaDoc message )
76     {
77         _message = message;
78     }
79
80     /**
81      * Get the cause of the error.
82      * @return the Throwable that caused the error.
83      */

84     public Throwable JavaDoc getCause()
85     {
86         return _cause;
87     }
88
89     /**
90      * Set the cause of the error.
91      * @param cause the Throwable that caused the error.
92      */

93     public void setCause( Throwable JavaDoc cause )
94     {
95         _cause = cause;
96     }
97 }
98
Popular Tags