KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > action > ActionError


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

18
19
20 package org.apache.struts.action;
21
22 import java.io.Serializable JavaDoc;
23
24
25 /**
26  * <p>An encapsulation of an individual error message returned by the
27  * <code>validate</code> method of an <code>ActionForm</code>, consisting
28  * of a message key (to be used to look up message text in an appropriate
29  * message resources database) plus up to four placeholder objects that can
30  * be used for parametric replacement in the message text.</p>
31  *
32  * <p>The placeholder objects are referenced in the message text using the same
33  * syntax used by the JDK <code>MessageFormat</code> class. Thus, the first
34  * placeholder is '{0}', the second is '{1}', etc.</p>
35  *
36  * <p>Since Struts 1.1 <code>ActionError</code> extends <code>ActionMessage</code>.
37  *
38  * @version $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
39  * @deprecated Please use <code>ActionMessage</code> instead, deprecated since 1.2.0.
40  */

41 public class ActionError extends ActionMessage implements Serializable JavaDoc {
42
43
44     // ----------------------------------------------------------- Constructors
45

46
47     /**
48      * <p>Construct an action error with no replacement values.</p>
49      *
50      * @param key Message key for this error message
51      */

52     public ActionError(String JavaDoc key) {
53
54         super(key);
55
56     }
57
58
59     /**
60      * <p>Construct an action error with the specified replacement values.</p>
61      *
62      * @param key Message key for this error message
63      * @param value0 First replacement value
64      */

65     public ActionError(String JavaDoc key, Object JavaDoc value0) {
66
67         super(key, value0);
68
69     }
70
71
72     /**
73      * <p>Construct an action error with the specified replacement values.</p>
74      *
75      * @param key Message key for this error message
76      * @param value0 First replacement value
77      * @param value1 Second replacement value
78      */

79     public ActionError(String JavaDoc key, Object JavaDoc value0, Object JavaDoc value1) {
80
81         super(key, value0, value1);
82
83     }
84
85
86     /**
87      * <p>Construct an action error with the specified replacement values.</p>
88      *
89      * @param key Message key for this error message
90      * @param value0 First replacement value
91      * @param value1 Second replacement value
92      * @param value2 Third replacement value
93      */

94     public ActionError(String JavaDoc key, Object JavaDoc value0, Object JavaDoc value1,
95                        Object JavaDoc value2) {
96
97         super(key, value0, value1, value2);
98
99     }
100
101
102     /**
103      * <p>Construct an action error with the specified replacement values.</p>
104      *
105      * @param key Message key for this error message
106      * @param value0 First replacement value
107      * @param value1 Second replacement value
108      * @param value2 Third replacement value
109      * @param value3 Fourth replacement value
110      */

111     public ActionError(String JavaDoc key, Object JavaDoc value0, Object JavaDoc value1,
112                        Object JavaDoc value2, Object JavaDoc value3) {
113
114         super(key, value0, value1, value2, value3);
115
116     }
117
118
119     /**
120      * <p>Construct an action error with the specified replacement values.</p>
121      *
122      * @param key Message key for this message
123      * @param values Array of replacement values
124      */

125     public ActionError(String JavaDoc key, Object JavaDoc[] values) {
126
127         super(key, values);
128
129     }
130
131 }
132
Popular Tags