dgraham 2004/04/08 16:05:39
Modified: validator/src/share/org/apache/commons/validator Arg.java
ValidatorResources.java ValidatorResults.java
ValidatorResult.java Validator.java
Log:
Removed items deprecated in 1.1.x series.
Revision Changes Path
1.18 +3 -12
jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java
Index: Arg.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Arg.java 21 Feb 2004 17:10:29 -0000 1.17
+++ Arg.java 8 Apr 2004 23:05:39 -0000 1.18
@@ -117,15 +117,6 @@
}
/**
- * Gets whether or not the key is a resource.
- * @return Returns true if key is a resource.
- * @deprecated Use isResource() instead.
- */
- public boolean getResource() {
- return this.isResource();
- }
-
- /**
* Tests whether or not the key is a resource key or literal value.
* @return <code>true</code> if key is a resource key.
*/
1.32 +8 -96
jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java
Index: ValidatorResources.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ValidatorResources.java 4 Apr 2004 13:53:25 -0000 1.31
+++ ValidatorResources.java 8 Apr 2004 23:05:39 -0000 1.32
@@ -71,9 +71,8 @@
/**
* Logger.
- * @deprecated Subclasses should use their own logging instance.
- */
- protected static Log log = LogFactory.getLog(ValidatorResources.class);
+ */
+ private static final Log log = LogFactory.getLog(ValidatorResources.class);
/**
* <code>FastHashMap</code> of <code>FormSet</code>s stored under
@@ -161,16 +160,6 @@
* Add a <code>FormSet</code> to this <code>ValidatorResources</code>
* object. It will be associated with the <code>Locale</code> of the
* <code>FormSet</code>.
- * @deprecated Use addFormSet() instead.
- */
- public void put(FormSet fs) {
- this.addFormSet(fs);
- }
-
- /**
- * Add a <code>FormSet</code> to this <code>ValidatorResources</code>
- * object. It will be associated with the <code>Locale</code> of the
- * <code>FormSet</code>.
* @since Validator 1.1
*/
public void addFormSet(FormSet fs) {
@@ -192,32 +181,6 @@
/**
* Add a global constant to the resource.
- * @deprecated Use addConstant(String, String) instead.
- */
- public void addConstant(Constant c) {
- this.addConstantParam(c.getName(), c.getValue());
- }
-
- /**
- * Add a global constant to the resource.
- * @deprecated Use addConstant(String, String) instead.
- */
- public void addConstantParam(String name, String value) {
- if (name != null
- && name.length() > 0
- && value != null
- && value.length() > 0) {
-
- if (log.isDebugEnabled()) {
- log.debug("Adding Global Constant: " + name + "," + value);
- }
-
- this.hConstants.put(name, value);
- }
- }
-
- /**
- * Add a global constant to the resource.
*/
public void addConstant(String name, String value) {
if (log.isDebugEnabled()) {
@@ -283,23 +246,6 @@
}
/**
- * <p>Gets a <code>Form</code> based on the name of the form and the
<code>Locale</code> that
- * most closely matches the <code>Locale</code> passed in. The order of
<code>Locale</code>
- * matching is:</p>
- * <ol>
- * <li>language + country + variant</li>
- * <li>language + country</li>
- * <li>language</li>
- * <li>default locale</li>
- * </ol>
- * @deprecated Use getForm() instead.
- */
- public Form get(Locale locale, Object formKey) {
- String key = (formKey == null) ? null : formKey.toString();
- return this.getForm(locale, key);
- }
-
- /**
* <p>Gets a <code>Form</code> based on the name of the form and the
* <code>Locale</code> that most closely matches the <code>Locale</code>
* passed in. The order of <code>Locale</code> matching is:</p>
@@ -329,28 +275,6 @@
* <li>language</li>
* <li>default locale</li>
* </ol>
- * @deprecated Use getForm() instead.
- */
- public Form get(
- String language,
- String country,
- String variant,
- Object formKey) {
-
- String key = (formKey == null) ? null : formKey.toString();
- return this.getForm(language, country, variant, key);
- }
-
- /**
- * <p>Gets a <code>Form</code> based on the name of the form and the
- * <code>Locale</code> that most closely matches the <code>Locale</code>
- * passed in. The order of <code>Locale</code> matching is:</p>
- * <ol>
- * <li>language + country + variant</li>
- * <li>language + country</li>
- * <li>language</li>
- * <li>default locale</li>
- * </ol>
* @since Validator 1.1
*/
public Form getForm(
@@ -407,27 +331,15 @@
hConstants.setFast(true);
hActions.setFast(true);
- this.internalProcessForms();
- }
-
- /**
- * <p>Process the <code>Form</code> objects. This clones the
<code>Field</code>s
- * that don't exist in a <code>FormSet</code> compared to the default
- * <code>FormSet</code>.</p>
- * @deprecated This is an internal method that client classes need not call
directly.
- */
- public void processForms() {
- this.internalProcessForms();
+ this.processForms();
}
/**
* <p>Process the <code>Form</code> objects. This clones the
<code>Field</code>s
* that don't exist in a <code>FormSet</code> compared to the default
* <code>FormSet</code>.</p>
- * TODO When processForms() is removed from the public interface, rename this
- * private method back to "processForms".
*/
- private void internalProcessForms() {
+ private void processForms() {
//hFormSets.put(buildKey(fs), fs);
String defaultKey = defaultLocale.toString();
@@ -454,7 +366,7 @@
// Loop through the default locale form's fields
// If they don't exist in the current locale's form, then clone
them.
- Form defaultForm = get(defaultLocale, formKey);
+ Form defaultForm = this.getForm(defaultLocale, formKey);
Iterator defaultFields = defaultForm.getFields().iterator();
while (defaultFields.hasNext()) {
1.11 +3 -38
jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResults.java
Index: ValidatorResults.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResults.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ValidatorResults.java 21 Feb 2004 17:10:29 -0000 1.10
+++ ValidatorResults.java 8 Apr 2004 23:05:39 -0000 1.11
@@ -82,15 +82,6 @@
/**
* Return <code>true</code> if there are no messages recorded
* in this collection, or <code>false</code> otherwise.
- * @deprecated Use isEmpty() instead.
- */
- public boolean empty() {
- return this.isEmpty();
- }
-
- /**
- * Return <code>true</code> if there are no messages recorded
- * in this collection, or <code>false</code> otherwise.
*/
public boolean isEmpty() {
return this.hResults.isEmpty();
@@ -106,32 +97,6 @@
*/
public ValidatorResult getValidatorResult(String key) {
return (ValidatorResult) this.hResults.get(key);
- }
-
- /**
- * Return the set of all recorded messages, without distinction
- * by which property the messages are associated with. If there are
- * no messages recorded, an empty enumeration is returned.
- * @deprecated Use getPropertyNames() instead.
- */
- public Iterator get() {
- if (hResults.isEmpty()) {
- return Collections.EMPTY_LIST.iterator();
- }
-
- return hResults.keySet().iterator();
- }
-
- /**
- * Return the set of property names for which at least one message has
- * been recorded. If there are no messages, an empty Iterator is returned.
- * If you have recorded global messages, the String value of
- * <code>ActionMessages.GLOBAL_MESSAGE</code> will be one of the returned
- * property names.
- * @deprecated Use getPropertyNames() instead.
- */
- public Iterator properties() {
- return hResults.keySet().iterator();
}
/**
1.12 +3 -11
jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResult.java
Index: ValidatorResult.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResult.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ValidatorResult.java 21 Feb 2004 17:10:29 -0000 1.11
+++ ValidatorResult.java 8 Apr 2004 23:05:39 -0000 1.12
@@ -99,14 +99,6 @@
}
/**
- * Gets whether or not the validation passed.
- * @deprecated Use isValid() instead.
- */
- public boolean getValid() {
- return valid;
- }
-
- /**
* Tests whether or not the validation passed.
*/
public boolean isValid() {
1.35 +3 -86
jakarta-commons/validator/src/share/org/apache/commons/validator/Validator.java
Index: Validator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Validator.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- Validator.java 21 Feb 2004 17:10:29 -0000 1.34
+++ Validator.java 8 Apr 2004 23:05:39 -0000 1.35
@@ -26,9 +26,6 @@
import java.util.Locale;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
/**
* Validations are processed by the validate method. An instance of
* <code>ValidatorResources</code> is used to define the validators
@@ -37,23 +34,11 @@
public class Validator implements Serializable {
/**
- * Logger.
- * @deprecated Subclasses should use their own logging instance.
- */
- protected static Log log = LogFactory.getLog(Validator.class);
-
- /**
* Resources key the JavaBean is stored to perform validation on.
*/
public static final String BEAN_PARAM = "java.lang.Object";
/**
- * Resources key the JavaBean is stored to perform validation on.
- * @deprecated Use BEAN_PARAM instead.
- */
- public static final String BEAN_KEY = BEAN_PARAM;
-
- /**
* Resources key the <code>ValidatorAction</code> is stored under.
* This will be automatically passed into a validation method
* with the current <code>ValidatorAction</code> if it is
@@ -63,15 +48,6 @@
"org.apache.commons.validator.ValidatorAction";
/**
- * Resources key the <code>ValidatorAction</code> is stored under.
- * This will be automatically passed into a validation method
- * with the current <code>ValidatorAction</code> if it is
- * specified in the method signature.
- * @deprecated Use VALIDATOR_ACTION_PARAM instead.
- */
- public static final String VALIDATOR_ACTION_KEY = VALIDATOR_ACTION_PARAM;
-
- /**
* Resources key the <code>Field</code> is stored under.
* This will be automatically passed into a validation method
* with the current <code>Field</code> if it is
@@ -80,15 +56,6 @@
public static final String FIELD_PARAM = "org.apache.commons.validator.Field";
/**
- * Resources key the <code>Field</code> is stored under.
- * This will be automatically passed into a validation method
- * with the current <code>Field</code> if it is
- * specified in the method signature.
- * @deprecated Use FIELD_PARAM instead.
- */
- public static final String FIELD_KEY = FIELD_PARAM;
-
- /**
* Resources key the <code>Validator</code> is stored under.
* This will be automatically passed into a validation method
* with the current <code>Validator</code> if it is
@@ -98,15 +65,6 @@
"org.apache.commons.validator.Validator";
/**
- * Resources key the <code>Validator</code> is stored under.
- * This will be automatically passed into a validation method
- * with the current <code>Validator</code> if it is
- * specified in the method signature.
- * @deprecated Use VALIDATOR_PARAM instead.
- */
- public static final String VALIDATOR_KEY = VALIDATOR_PARAM;
-
- /**
* Resources key the <code>Locale</code> is stored.
* This will be used to retrieve the appropriate
* <code>FormSet</code> and <code>Form</code> to be
@@ -114,15 +72,6 @@
*/
public static final String LOCALE_PARAM = "java.util.Locale";
- /**
- * Resources key the <code>Locale</code> is stored.
- * This will be used to retrieve the appropriate
- * <code>FormSet</code> and <code>Form</code> to be
- * processed.
- * @deprecated Use LOCALE_PARAM instead.
- */
- public static final String LOCALE_KEY = LOCALE_PARAM;
-
protected ValidatorResources resources = null;
protected String formName = null;
@@ -134,11 +83,6 @@
protected Map parameters = new HashMap();
/**
- * @deprecated Use parameters instead.
- */
- protected HashMap hResources = (HashMap) this.parameters;
-
- /**
* The current page number to validate.
*/
protected int page = 0;
@@ -193,21 +137,6 @@
}
/**
- * Add a resource to be used during the processing
- * of validations.
- *
- * @param parameterClassName The full class name of the parameter of the
- * validation method that corresponds to the value/instance passed in with it.
- *
- * @param parameterValue The instance that will be passed into the
- * validation method.
- * @deprecated Use setParameter(String, Object) instead.
- */
- public void addResource(String parameterClassName, Object parameterValue) {
- this.setParameter(parameterClassName, parameterValue);
- }
-
- /**
* Set a parameter of a pluggable validation method.
*
* @param parameterClassName The full class name of the parameter of the
@@ -221,17 +150,6 @@
}
/**
- * Get a resource to be used during the processing of validations.
- *
- * @param parameterClassName The full class name of the parameter of the
- * validation method that corresponds to the value/instance passed in with it.
- * @deprecated Use getParameterValue(String) instead.
- */
- public Object getResource(String parameterClassName) {
- return this.getParameterValue(parameterClassName);
- }
-
- /**
* Returns the value of the specified parameter that will be used during the
* processing of validations.
*
@@ -286,7 +204,6 @@
public void clear() {
this.formName = null;
this.parameters = new HashMap();
- this.hResources = (HashMap) this.parameters;
this.page = 0;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]