dgraham     2004/04/08 16:22:03

  Modified:    validator/src/share/org/apache/commons/validator Field.java
                        Form.java FormSet.java
  Log:
  Removed items deprecated in 1.1.x series.
  
  Revision  Changes    Path
  1.32      +5 -176    
jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Field.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Field.java        21 Feb 2004 17:10:29 -0000      1.31
  +++ Field.java        8 Apr 2004 23:22:03 -0000       1.32
  @@ -54,13 +54,6 @@
               "org.apache.commons.validator.Field.DEFAULT";
   
       /**
  -     * This is the value that will be used as a key if the <code>Arg</code>
  -     * name field has no value.
  -     * @deprecated
  -     */
  -    public static final String ARG_DEFAULT = DEFAULT_ARG;
  -
  -    /**
        * This indicates an indexed property is being referenced.
        */
       public static final String TOKEN_INDEXED = "[]";
  @@ -84,11 +77,6 @@
       protected int fieldOrder = 0;
   
       /**
  -     * @deprecated This is no longer used.
  -     */
  -    protected FastHashMap hDependencies = new FastHashMap();
  -
  -    /**
        * Internal representation of this.depends String as a List.  This List 
        * gets updated whenever setDepends() gets called.  This List is 
        * synchronized so a call to setDepends() (which clears the List) won't 
  @@ -109,26 +97,6 @@
       protected Map[] args = new Map[0];
   
       /**
  -     * @deprecated This variable is no longer used, use args instead.
  -     */
  -    protected FastHashMap hArg0 = new FastHashMap();
  -
  -    /**
  -     * @deprecated This variable is no longer used, use args instead.
  -     */
  -    protected FastHashMap hArg1 = new FastHashMap();
  -
  -    /**
  -     * @deprecated This variable is no longer used, use args instead.
  -     */
  -    protected FastHashMap hArg2 = new FastHashMap();
  -
  -    /**
  -     * @deprecated This variable is no longer used, use args instead.
  -     */
  -    protected FastHashMap hArg3 = new FastHashMap();
  -
  -    /**
        * Gets the page value that the Field is associated with for
        * validation.
        */
  @@ -339,111 +307,6 @@
       }
   
       /**
  -     * Add a <code>Arg</code> to the arg0 list.
  -     * @deprecated Use addArg(Arg) instead.
  -     */
  -    public void addArg0(Arg arg) {
  -        arg.setPosition(0);
  -        this.addArg(arg);
  -    }
  -
  -    /**
  -     * Gets the default arg0 <code>Arg</code> object.
  -     * @deprecated Use getArg(0) instead.
  -     */
  -    public Arg getArg0() {
  -        return this.getArg(0);
  -    }
  -
  -    /**
  -     * Gets the arg0 <code>Arg</code> object based on the key passed in.  If 
  -     * the key finds a <code>null</code> value then the default value will 
  -     * be retrieved.
  -     * @deprecated Use getArg(String, 0) instead.
  -     */
  -    public Arg getArg0(String key) {
  -        return this.getArg(key, 0);
  -    }
  -
  -    /**
  -     * Add a <code>Arg</code> to the arg1 list.
  -     * @deprecated Use addArg(Arg) instead.
  -     */
  -    public void addArg1(Arg arg) {
  -        arg.setPosition(1);
  -        this.addArg(arg);
  -    }
  -
  -    /**
  -     * Gets the default arg1 <code>Arg</code> object.
  -     * @deprecated Use getArg(1) instead.
  -     */
  -    public Arg getArg1() {
  -        return this.getArg(1);
  -    }
  -
  -    /**
  -     * Gets the arg1 <code>Arg</code> object based on the key passed in.  If the key
  -     * finds a <code>null</code> value then the default value will try to be 
retrieved.
  -     * @deprecated Use getArg(String, 1) instead.
  -     */
  -    public Arg getArg1(String key) {
  -        return this.getArg(key, 1);
  -    }
  -
  -    /**
  -     * Add a <code>Arg</code> to the arg2 list.
  -     * @deprecated Use addArg(Arg) instead.
  -     */
  -    public void addArg2(Arg arg) {
  -        arg.setPosition(2);
  -        this.addArg(arg);
  -    }
  -
  -    /**
  -     * Gets the default arg2 <code>Arg</code> object.
  -     * @deprecated Use getArg(2) instead.
  -     */
  -    public Arg getArg2() {
  -        return this.getArg(2);
  -    }
  -
  -    /**
  -     * Gets the arg2 <code>Arg</code> object based on the key passed in.  If the key
  -     * finds a <code>null</code> value then the default value will try to be 
retrieved.
  -     * @deprecated Use getArg(String, 2) instead.
  -     */
  -    public Arg getArg2(String key) {
  -        return this.getArg(key, 2);
  -    }
  -
  -    /**
  -     * Add a <code>Arg</code> to the arg3 list.
  -     * @deprecated Use addArg(Arg) instead.
  -     */
  -    public void addArg3(Arg arg) {
  -        arg.setPosition(3);
  -        this.addArg(arg);
  -    }
  -
  -    /**
  -     * Gets the default arg3 <code>Arg</code> object.
  -     * @deprecated Use getArg(3) instead.
  -     */
  -    public Arg getArg3() {
  -        return this.getArg(3);
  -    }
  -
  -    /**
  -     * Gets the arg3 <code>Arg</code> object based on the key passed in.  If the key
  -     * finds a <code>null</code> value then the default value will try to be 
retrieved.
  -     * @deprecated Use getArg(String, 3) instead.
  -     */
  -    public Arg getArg3(String key) {
  -        return this.getArg(key, 3);
  -    }
  -
  -    /**
        * Add a <code>Var</code> to the <code>Field</code>.
        */
       public void addVar(Var v) {
  @@ -453,15 +316,6 @@
       /**
        * Add a <code>Var</code>, based on the values passed in, to the
        * <code>Field</code>.
  -     * @deprecated Use addVar(String, String, String) instead.
  -     */
  -    public void addVarParam(String name, String value, String jsType) {
  -        this.addVar(new Var(name, value, jsType));
  -    }
  -
  -    /**
  -     * Add a <code>Var</code>, based on the values passed in, to the
  -     * <code>Field</code>.
        * @param name
        * @param value
        * @param jsType
  @@ -545,10 +399,8 @@
       /**
        * Replace constants with values in fields and process the depends field
        * to create the dependency <code>Map</code>.
  -     * @deprecated This method is called by the framework.  It will be made 
protected
  -     * in a future release.  TODO
        */
  -    public void process(Map globalConstants, Map constants) {
  +    void process(Map globalConstants, Map constants) {
           this.hMsgs.setFast(false);
           this.hVars.setFast(true);
   
  @@ -609,18 +461,8 @@
   
       /**
        * Replace the args key value with the key/value pairs passed in.
  -     * @deprecated This is an internal setup method that clients don't need to call.
        */
  -    public void processMessageComponents(String key, String replaceValue) {
  -        this.internalProcessMessageComponents(key, replaceValue);
  -    }
  -
  -    /**
  -     * Replace the args key value with the key/value pairs passed in.
  -     * TODO When processMessageComponents() is removed from the public API we
  -     * should rename this private method to "processMessageComponents".
  -     */
  -    private void internalProcessMessageComponents(String key, String replaceValue) {
  +    private void processMessageComponents(String key, String replaceValue) {
           String varKey = TOKEN_START + TOKEN_VAR;
           // Process Messages
           if (key != null && !key.startsWith(varKey)) {
  @@ -667,14 +509,6 @@
       }
   
       /**
  -     * Gets an unmodifiable <code>Set</code> of the dependencies.
  -     * @deprecated Use getDependencyList() instead.
  -     */
  -    public Collection getDependencies() {
  -        return this.getDependencyList();
  -    }
  -
  -    /**
        * Gets an unmodifiable <code>List</code> of the dependencies in the same 
        * order they were defined in parameter passed to the setDepends() method.
        */
  @@ -682,7 +516,6 @@
           return Collections.unmodifiableList(this.dependencyList);
       }
   
  -
       /**
        * Creates and returns a copy of this object.
        */
  @@ -712,10 +545,6 @@
   
           field.hVars = ValidatorUtils.copyFastHashMap(hVars);
           field.hMsgs = ValidatorUtils.copyFastHashMap(hMsgs);
  -        field.hArg0 = ValidatorUtils.copyFastHashMap(hArg0);
  -        field.hArg1 = ValidatorUtils.copyFastHashMap(hArg1);
  -        field.hArg2 = ValidatorUtils.copyFastHashMap(hArg2);
  -        field.hArg3 = ValidatorUtils.copyFastHashMap(hArg3);
   
           return field;
       }
  
  
  
  1.17      +3 -28     
jakarta-commons/validator/src/share/org/apache/commons/validator/Form.java
  
  Index: Form.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Form.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Form.java 4 Apr 2004 19:38:45 -0000       1.16
  +++ Form.java 8 Apr 2004 23:22:03 -0000       1.17
  @@ -36,7 +36,6 @@
    * contained in a list of <code>Field</code> objects.  Instances of this class are
    * configured with a &lt;form&gt; xml element.
    * </p>
  - *
    */
   public class Form implements Serializable {
   
  @@ -102,14 +101,6 @@
       }
   
       /**
  -     * The <code>Field</code>s are returned as an unmodifiable <code>Map</code>.
  -     * @deprecated Use containsField(String) and getField(String) instead.
  -     */
  -    public Map getFieldMap() {
  -        return Collections.unmodifiableMap(hFields);
  -    }
  -
  -    /**
        * Returns the Field with the given name or null if this Form has no such
        * field.
        * @since Validator 1.1
  @@ -124,22 +115,6 @@
        */
       public boolean containsField(String fieldName) {
           return this.hFields.containsKey(fieldName);
  -    }
  -
  -    /**
  -     * Processes all of the <code>Form</code>'s <code>Field</code>s.
  -     * @deprecated This method is called by the framework.  It will be made 
protected
  -     * in a future release.  TODO
  -     */
  -    public void process(Map globalConstants, Map constants) {
  -        hFields.setFast(true);
  -
  -        for (Iterator i = lFields.iterator(); i.hasNext();) {
  -            Field f = (Field) i.next();
  -            f.process(globalConstants, constants);
  -        }
  -
  -             processed = true;
       }
   
        /**
  
  
  
  1.17      +4 -38     
jakarta-commons/validator/src/share/org/apache/commons/validator/FormSet.java
  
  Index: FormSet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/FormSet.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- FormSet.java      4 Apr 2004 13:53:25 -0000       1.16
  +++ FormSet.java      8 Apr 2004 23:22:03 -0000       1.17
  @@ -118,30 +118,6 @@
       }
   
       /**
  -     * Add a <code>Constant</code> (locale level).
  -     * @deprecated Use addConstant(String, String) instead.
  -     */
  -    public void addConstant(Constant c) {
  -        if (c.getName() != null && c.getName().length() > 0 &&
  -                c.getValue() != null && c.getValue().length() > 0) {
  -
  -            constants.put(c.getName(), c.getValue());
  -        }
  -    }
  -
  -    /**
  -     * Add a <code>Constant</code> to the locale level.
  -     * @deprecated Use addConstant(String, String) instead.
  -     */
  -    public void addConstantParam(String name, String value) {
  -        if (name != null && name.length() > 0 &&
  -                value != null && value.length() > 0) {
  -
  -            constants.put(name, value);
  -        }
  -    }
  -
  -    /**
        * Add a <code>Constant</code> to the locale level.
        */
       public void addConstant(String name, String value) {
  @@ -157,14 +133,6 @@
   
       /**
        * Retrieve a <code>Form</code> based on the form name.
  -     * @deprecated Use getForm(String) instead.
  -     */
  -    public Form getForm(Object key) {
  -        return (Form) this.forms.get(key);
  -    }
  -
  -    /**
  -     * Retrieve a <code>Form</code> based on the form name.
        */
       public Form getForm(String formName) {
           return (Form) this.forms.get(formName);
  @@ -180,10 +148,8 @@
   
       /**
        * Processes all of the <code>Form</code>s.
  -     * @deprecated This method is called by the framework.  It will be made 
protected
  -     * in a future release.  TODO
        */
  -    public synchronized void process(Map globalConstants) {
  +    synchronized void process(Map globalConstants) {
           for (Iterator i = forms.values().iterator(); i.hasNext();) {
               Form f = (Form) i.next();
               f.process(globalConstants, constants, forms);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to