View Javadoc

1   /*
2    * $Id: ActionErrors.java 421119 2006-07-12 04:49:11Z wsmoak $
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  package org.apache.struts.action;
19  
20  import java.io.Serializable;
21  
22  /***
23   * <p>A class that encapsulates the error messages being reported by the
24   * <code>validate()</code> method of an <code>ActionForm</code>. Validation
25   * errors are either global to the entire <code>ActionForm</code> bean they
26   * are associated with, or they are specific to a particular bean property
27   * (and, therefore, a particular input field on the corresponding form).</p>
28   *
29   * <p>Each individual error is described by an <code>ActionMessage</code>
30   * object, which contains a message key (to be looked up in an appropriate
31   * message resources database), and up to four placeholder arguments used for
32   * parametric substitution in the resulting message.</p>
33   *
34   * <p><strong>IMPLEMENTATION NOTE</strong> - It is assumed that these objects
35   * are created and manipulated only within the context of a single thread.
36   * Therefore, no synchronization is required for access to internal
37   * collections.</p>
38   *
39   * @version $Rev: 421119 $ $Date: 2005-08-06 18:03:30 -0400 (Sat, 06 Aug 2005)
40   *          $
41   */
42  public class ActionErrors extends ActionMessages implements Serializable {
43      // --------------------------------------------------------- Public Methods
44  
45      /***
46       * <p>Create an empty <code>ActionErrors</code> object.</p>
47       */
48      public ActionErrors() {
49          super();
50      }
51  
52      /***
53       * <p>Create an <code>ActionErrors</code> object initialized with the
54       * given messages.</p>
55       *
56       * @param messages The messages to be initially added to this object. This
57       *                 parameter can be <code>null</code>.
58       * @since Struts 1.1
59       */
60      public ActionErrors(ActionErrors messages) {
61          super(messages);
62      }
63  }