dgraham     2002/10/20 12:10:45

  Modified:    src/share/org/apache/struts/action ActionErrors.java
  Log:
  Added constructors to match ActionMessages.
  
  Revision  Changes    Path
  1.9       +40 -32    
jakarta-struts/src/share/org/apache/struts/action/ActionErrors.java
  
  Index: ActionErrors.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionErrors.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ActionErrors.java 22 Sep 2002 05:46:51 -0000      1.8
  +++ ActionErrors.java 20 Oct 2002 19:10:45 -0000      1.9
  @@ -59,13 +59,10 @@
    *
    */
   
  -
   package org.apache.struts.action;
   
  -
   import java.io.Serializable;
   
  -
   /**
    * <p>A class that encapsulates the error messages being reported by
    * the <code>validate()</code> method of an <code>ActionForm</code>.
  @@ -91,33 +88,44 @@
   
   public class ActionErrors extends ActionMessages implements Serializable {
   
  +     // ----------------------------------------------------- Manifest Constants
   
  -    // ----------------------------------------------------- Manifest Constants
  -
  -
  -    /**
  -     * The "property name" marker to use for global errors, as opposed to
  -     * those related to a specific property.
  -     */
  -    public static final String GLOBAL_ERROR =
  -        "org.apache.struts.action.GLOBAL_ERROR";
  -
  -
  -
  -    // --------------------------------------------------------- Public Methods
  -    
  -    
  -    /**
  -     * Add an error message to the set of errors for the specified property.
  -     *
  -     * @param property Property name (or ActionErrors.GLOBAL_ERROR)
  -     * @param error The error message to be added
  -     */
  -    public void add(String property, ActionError error) {
  -
  -        super.add(property, error);
  +     /**
  +      * The "property name" marker to use for global errors, as opposed to
  +      * those related to a specific property.
  +      */
  +     public static final String GLOBAL_ERROR = 
"org.apache.struts.action.GLOBAL_ERROR";
  +
  +     // --------------------------------------------------------- Public Methods
  +
  +     /**
  +      * Create an empty <code>ActionErrors</code> object.
  +      */
  +     public ActionErrors() {
  +             super();
  +     }
  +
  +     /**
  +      * Create an <code>ActionErrors</code> object initialized with the given 
  +      * messages.
  +      * 
  +      * @param messages The messages to be initially added to this object.
  +      * @since Struts 1.1
  +      */
  +     public ActionErrors(ActionErrors messages) {
  +             super(messages);
  +     }
  +
  +     /**
  +      * Add an error message to the set of errors for the specified property.
  +      *
  +      * @param property Property name (or ActionErrors.GLOBAL_ERROR)
  +      * @param error The error message to be added
  +      */
  +     public void add(String property, ActionError error) {
   
  -    }
  +             super.add(property, error);
   
  +     }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to