commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r367437 - in /jakarta/commons/proper/validator/trunk: src/share/org/apache/commons/validator/ValidatorResult.java xdocs/changes.xml
Date Tue, 10 Jan 2006 00:40:08 GMT
Author: niallp
Date: Mon Jan  9 16:39:58 2006
New Revision: 367437

URL: http://svn.apache.org/viewcvs?rev=367437&view=rev
Log:
Fix for Bug 37704 Deprecate ValidatorResult's getActionMap() and add a new getActions() method
- reported by Philippe Mouawad

Modified:
    jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ValidatorResult.java
    jakarta/commons/proper/validator/trunk/xdocs/changes.xml

Modified: jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ValidatorResult.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ValidatorResult.java?rev=367437&r1=367436&r2=367437&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ValidatorResult.java
(original)
+++ jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/ValidatorResult.java
Mon Jan  9 16:39:58 2006
@@ -4,7 +4,7 @@
  * $Date$
  *
  * ====================================================================
- * Copyright 2001-2005 The Apache Software Foundation
+ * Copyright 2001-2006 The Apache Software Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Iterator;
 
 /**
  * This contains the results of a set of validation rules processed 
@@ -102,8 +103,20 @@
     }
 
     /**
+     * Return an Iterator of the action names contained in this Result.
+     * @return The set of action names.
+     */
+    public Iterator getActions() {
+        return Collections.unmodifiableMap(hAction).keySet().iterator();
+    }
+
+    /**
      * Return a Map of the validator actions in this Result.
      * @return Map of validator actions.
+     * @deprecated Use getActions() to return the set of actions
+     *             the isValid(name) and getResult(name) methods
+     *             to determine the contents of ResultStatus.
+     *
      */
     public Map getActionMap() {
         return Collections.unmodifiableMap(hAction);

Modified: jakarta/commons/proper/validator/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/xdocs/changes.xml?rev=367437&r1=367436&r2=367437&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/validator/trunk/xdocs/changes.xml Mon Jan  9 16:39:58 2006
@@ -39,6 +39,10 @@
   <body>
 
     <release version="1.2.1 (alpha)" date="in SVN">
+      <action dev="niallp" type="add" issue="37704">
+         Deprecate ValidatorResult's getActionMap() and add getActions()
+         method to provide an Iterator of the set of action names.
+      </action>
       <action dev="niallp" type="add" issue="37580" due-to="Michael Rush">
          Use the Dojo/Rhino JavaScript compressor to created compressed
          versions of the static JavaScript files. Additionally create single



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message