You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hr...@apache.org on 2005/08/07 00:03:40 UTC

svn commit: r230602 - in /struts/core/trunk/src/share/org/apache/struts: action/ config/ util/ validator/

Author: hrabago
Date: Sat Aug  6 15:03:30 2005
New Revision: 230602

URL: http://svn.apache.org/viewcvs?rev=230602&view=rev
Log:
Remove deprecated items that were scheduled to be removed after 1.2.
Remove references to ActionError in javadoc comments.

Removed:
    struts/core/trunk/src/share/org/apache/struts/action/ActionError.java
Modified:
    struts/core/trunk/src/share/org/apache/struts/action/Action.java
    struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java
    struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java
    struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java
    struts/core/trunk/src/share/org/apache/struts/config/ExceptionConfig.java
    struts/core/trunk/src/share/org/apache/struts/config/FormBeanConfig.java
    struts/core/trunk/src/share/org/apache/struts/util/ModuleException.java
    struts/core/trunk/src/share/org/apache/struts/util/RequestUtils.java
    struts/core/trunk/src/share/org/apache/struts/validator/Resources.java

Modified: struts/core/trunk/src/share/org/apache/struts/action/Action.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/Action.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/Action.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/Action.java Sat Aug  6 15:03:30 2005
@@ -81,16 +81,6 @@
 
 
     /**
-     * <p>The system default Locale.</p>
-     *
-     * @deprecated Use Locale.getDefault directly.  This will be removed after
-     * Struts 1.2.
-     */
-    protected static Locale defaultLocale = Locale.getDefault();
-    // :TODO: Remove after Struts 1.2
-
-
-    /**
      * <p>The servlet to which we are attached.</p>
      */
     protected transient ActionServlet servlet = null;
@@ -477,25 +467,6 @@
     protected void resetToken(HttpServletRequest request) {
 
         token.resetToken(request);
-
-    }
-
-
-    /**
-     * <p>Save the specified error messages keys into the appropriate request
-     * attribute for use by the &lt;html:errors&gt; tag, if any messages
-     * are required. Otherwise, ensure that the request attribute is not
-     * created.</p>
-     *
-     * @param request The servlet request we are processing
-     * @param errors Error messages object
-     * @deprecated Use saveErrors(HttpServletRequest, ActionMessages) instead.
-     * This will be removed after Struts 1.2.
-     */
-    protected void saveErrors(HttpServletRequest request, ActionErrors errors) {
-
-        this.saveErrors(request, (ActionMessages) errors);
-        // :TODO: Remove after Struts 1.2.
 
     }
 

Modified: struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ActionErrors.java Sat Aug  6 15:03:30 2005
@@ -42,16 +42,6 @@
  */
 public class ActionErrors extends ActionMessages implements Serializable {
 
-    // ----------------------------------------------------- Manifest Constants
-
-    /**
-     * The "property name" marker to use for global errors, as opposed to
-     * those related to a specific property.
-     * @deprecated Use ActionMessages.GLOBAL_MESSAGE instead.  This will be
-     * removed after Struts 1.2.
-     */
-    public static final String GLOBAL_ERROR =
-            "org.apache.struts.action.GLOBAL_ERROR";
 
     // --------------------------------------------------------- Public Methods
 
@@ -74,18 +64,5 @@
         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
-     * @deprecated Use add(String, ActionMessage) instead.  This will be
-     * removed after Struts 1.2.
-     */
-    public void add(String property, ActionError error) {
-
-        super.add(property, error);
-
-    }
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/ExceptionHandler.java Sat Aug  6 15:03:30 2005
@@ -259,38 +259,6 @@
 
 
     /**
-     * <p>Default implementation for handling an <code>ActionError</code>
-     * generated from an <code>Exception</code> during <code>Action</code>
-     * delegation. The default implementation is to set an attribute of the
-     * request or session, as defined by the scope provided (the scope from
-     * the exception mapping). An <code>ActionErrors</code> instance is created,
-     * the error is added to the collection and the collection is set under the
-     * <code>Globals.ERROR_KEY</code>.</p>
-     *
-     * @param request The request we are handling
-     * @param property The property name to use for this error
-     * @param error The error generated from the exception mapping
-     * @param forward The forward generated from the input path (from the form
-     *                or exception mapping)
-     * @param scope The scope of the exception mapping.
-     * @deprecated Use storeException(HttpServletRequest, String, ActionMessage,
-     * ActionForward, String) instead. This will be removed after Struts 1.2.
-     */
-    protected void storeException(
-        HttpServletRequest request,
-        String property,
-        ActionError error,
-        ActionForward forward,
-        String scope) {
-
-        this.storeException(request, property, (ActionMessage) error, forward,
-                scope);
-        // :TODO: Remove after Struts 1.2
-
-    }
-
-
-    /**
      * <p>Default implementation for handling an <code>ActionMessage</code>
      * generated from an <code>Exception</code> during <code>Action</code>
      * delegation. The default implementation is to set an attribute of the

Modified: struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/action/RequestProcessor.java Sat Aug  6 15:03:30 2005
@@ -1168,38 +1168,4 @@
     }
 
 
-    /**
-     * <p>Log the specified message to the servlet context log for this
-     * web application.</p>
-     *
-     * @param message The message to be logged
-     * @deprecated Use commons-logging instead. This will be removed in a
-     * release after Struts 1.2.
-     */
-    protected void log(String message) {
-        // :TODO: Remove after Struts 1.2
-
-        servlet.log(message);
-
-    }
-
-
-    /**
-     * <p>Log the specified message and exception to the servlet context log
-     * for this web application.</p>
-     *
-     * @param message The message to be logged
-     * @param exception The exception to be logged
-
-     * @deprecated Use commons-logging instead.  This will be removed in a
-     * release after Struts 1.2.
-     */
-    protected void log(String message, Throwable exception) {
-        // :TODO: Remove after Sruts 1.2
-
-        servlet.log(message, exception);
-
-    }
-
-
 }

Modified: struts/core/trunk/src/share/org/apache/struts/config/ExceptionConfig.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/config/ExceptionConfig.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/config/ExceptionConfig.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/config/ExceptionConfig.java Sat Aug  6 15:03:30 2005
@@ -137,7 +137,7 @@
 
 
     /**
-     * The scope in which we should expose the ActionError for this exception
+     * The scope in which we should expose the ActionMessage for this exception
      * handler.
      */
     protected String scope = "request";

Modified: struts/core/trunk/src/share/org/apache/struts/config/FormBeanConfig.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/config/FormBeanConfig.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/config/FormBeanConfig.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/config/FormBeanConfig.java Sat Aug  6 15:03:30 2005
@@ -105,15 +105,6 @@
         return (this.dynamic);
     }
 
-    /**
-     * @deprecated The value to be returned by <code>getDynamic()</code>
-     * is now computed automatically in <code>setType()</code>
-     */
-    public void setDynamic(boolean dynamic) {
-        throwIfConfigured();
-        ; // No action required
-    }
-
 
     /**
      * The name of the FormBeanConfig that this config inherits configuration

Modified: struts/core/trunk/src/share/org/apache/struts/util/ModuleException.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/util/ModuleException.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/util/ModuleException.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/util/ModuleException.java Sat Aug  6 15:03:30 2005
@@ -17,7 +17,6 @@
  */
 package org.apache.struts.util;
 
-import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionMessage;
 
 /**
@@ -28,11 +27,6 @@
     protected String property = null;
 
     /**
-     * @deprecated Use message instead.
-     */
-    protected ActionError error = null;
-
-    /**
      * The ActionMessage associated with this exception.
      * @since Struts 1.2
      */
@@ -45,7 +39,6 @@
      */
     public ModuleException(String key) {
         super(key);
-        error = new ActionError(key);
         message = new ActionMessage(key);
     }
 
@@ -57,7 +50,6 @@
      */
     public ModuleException(String key, Object value) {
         super(key);
-        error = new ActionError(key, value);
         message = new ActionMessage(key, value);
     }
 
@@ -70,7 +62,6 @@
      */
     public ModuleException(String key, Object value0, Object value1) {
         super(key);
-        error = new ActionError(key, value0, value1);
         message = new ActionMessage(key, value0, value1);
     }
 
@@ -84,7 +75,6 @@
      */
     public ModuleException(String key, Object value0, Object value1, Object value2) {
         super(key);
-        error = new ActionError(key, value0, value1, value2);
         message = new ActionMessage(key, value0, value1, value2);
     }
 
@@ -99,19 +89,17 @@
      */
     public ModuleException(String key, Object value0, Object value1, Object value2, Object value3) {
         super(key);
-        error = new ActionError(key, value0, value1, value2, value3);
         message = new ActionMessage(key, value0, value1, value2, value3);
     }
 
     /**
-     * Construct an action error with the specified replacement values.
+     * Construct an error with the specified replacement values.
      *
      * @param key Message key for this message
      * @param values Array of replacement values
      */
     public ModuleException(String key, Object[] values) {
         super(key);
-        error = new ActionError(key, values);
         message = new ActionMessage(key, values);
     }
 
@@ -134,19 +122,10 @@
     /**
      * Returns the error associated with the exception.
      * @return Value of property error.
-     * @deprecated Use getActionMessage() instead.  This will be removed
-     * after Struts 1.2.
-     */
-    public ActionError getError() {
-        return error;
-    }
-
-    /**
-     * Returns the error associated with the exception.
-     * @return Value of property error.
      * @since Struts 1.2
      */
     public ActionMessage getActionMessage() {
         return this.message;
     }
+    
 }

Modified: struts/core/trunk/src/share/org/apache/struts/util/RequestUtils.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/util/RequestUtils.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/util/RequestUtils.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/util/RequestUtils.java Sat Aug  6 15:03:30 2005
@@ -967,147 +967,4 @@
     }
 
 
-    // ------------------------------------- Deprecated in favor of ModuleUtils
-
-
-
-    /**
-     * <p>Select the module to which the specified request belongs, and
-     * add corresponding request attributes to this request.</p>
-     *
-     * @param prefix The module prefix of the desired module
-     * @param request The servlet request we are processing
-     * @param context The ServletContext for this web application
-     *
-     * @since Struts 1.1
-     * @deprecated Use {@link org.apache.struts.util.ModuleUtils#selectModule(String,HttpServletRequest,ServletContext)} instead.
-     * This will be removed after Struts 1.2.
-     */
-    public static void selectModule(
-            String prefix,
-            HttpServletRequest request,
-            ServletContext context) {
-        // :TODO: Remove after Struts 1.2
-
-        ModuleUtils.getInstance().selectModule(prefix, request, context);
-
-    }
-
-
-    /**
-     * <p>Select the module to which the specified request belongs, and
-     * add corresponding request attributes to this request.</p>
-     *
-     * @param request The servlet request we are processing
-     * @param context The ServletContext for this web application
-     *
-     * @deprecated Use {@link org.apache.struts.util.ModuleUtils#selectModule(HttpServletRequest,ServletContext)} instead.
-     * This will be removed after Struts 1.2.
-     */
-    public static void selectModule(HttpServletRequest request, ServletContext context) {
-        // :TODO: Remove after Struts 1.2
-
-        ModuleUtils.getInstance().selectModule(request, context);
-
-    }
-
-
-    /**
-     * Get the module name to which the specified request belong.
-     * @param request The servlet request we are processing
-     * @param context The ServletContext for this web application
-     * @return The module prefix or ""
-     * @deprecated Use Use {@link org.apache.struts.util.ModuleUtils#getModuleName(HttpServletRequest,ServletContext)} instead.
-     * This will be removed after Struts 1.2.
-     */
-    public static String getModuleName(HttpServletRequest request, ServletContext context) {
-        // :TODO: Remove after Struts 1.2
-
-        return ModuleUtils.getInstance().getModuleName(request, context);
-
-    }
-
-
-    /**
-     * <p>Get the module name to which the specified uri belong.</p>
-     *
-     * @param matchPath The uri from which we want the module name.
-     * @param context The ServletContext for this web application
-     *
-     * @return The module prefix or ""
-     * @deprecated Use {@link org.apache.struts.util.ModuleUtils#getModuleName(String,ServletContext)} instead.
-     * This will be removed after Struts 1.2.
-     */
-    public static String getModuleName(String matchPath, ServletContext context) {
-        // :TODO: Remove after Struts 1.2
-
-        return ModuleUtils.getInstance().getModuleName(matchPath, context);
-
-    }
-
-
-    /**
-     * <p>Return the current <code>ModuleConfig</code> object stored in request,
-     * if it exists, null otherwise.
-     * This method can be used by a {@link org.apache.struts.action.PlugIn} to
-     * retrieve the current module config object. If no moduleConfig is found,
-     * this means that the request hasn't hit the server through the Struts servlet.
-     * The appropriate module config can be set and found with
-     * <code>{@link RequestUtils#selectModule(HttpServletRequest, ServletContext)} </code>.
-     *
-     * @param request The servlet request we are processing
-     *
-     * @return the ModuleConfig object from request, or null if none is set in
-     * the request.
-     * @since Struts 1.1
-     * @deprecated Use {@link org.apache.struts.util.ModuleUtils#getModuleConfig(HttpServletRequest)} instead.
-     * This will be removed after Struts 1.2.
-     */
-    public static ModuleConfig getRequestModuleConfig(HttpServletRequest request) {
-        // :TODO: Remove after Struts 1.2
-
-        return ModuleUtils.getInstance().getModuleConfig(request);
-
-    }
-
-
-    /**
-     * <p>Return the ModuleConfig object is it exists, null otherwise.</p>
-     *
-     * @param request The servlet request we are processing
-     * @param context The ServletContext for this web application
-     *
-     * @return the ModuleConfig object
-     * @since Struts 1.1
-     * @deprecated Use {@link org.apache.struts.util.ModuleUtils#getModuleConfig(HttpServletRequest,ServletContext)} instead.
-     * This will be removed after Struts 1.2.
-     */
-    public static ModuleConfig getModuleConfig(
-            HttpServletRequest request,
-            ServletContext context) {
-        // :TODO: Remove after Struts 1.2
-
-        return ModuleUtils.getInstance().getModuleConfig(request, context);
-
-    }
-
-
-    /**
-     * <p>Return the list of module prefixes that are defined for
-     * this web application. <strong>NOTE</strong> -
-     * the "" prefix for the default module is not included in this list.</p>
-     *
-     * @param context The ServletContext for this web application.
-     *
-     * @return An array of module prefixes.
-     * @since Struts 1.1
-     * @deprecated Use {@link org.apache.struts.util.ModuleUtils#getModulePrefixes(ServletContext)} instead.
-     * This will be removed after Struts 1.2.
-     */
-    public static String[] getModulePrefixes(ServletContext context) {
-        // :TODO: Remove after Struts 1.2
-
-        return ModuleUtils.getInstance().getModulePrefixes(context);
-
-    }
 }

Modified: struts/core/trunk/src/share/org/apache/struts/validator/Resources.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/validator/Resources.java?rev=230602&r1=230601&r2=230602&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/validator/Resources.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/validator/Resources.java Sat Aug  6 15:03:30 2005
@@ -30,7 +30,6 @@
 import org.apache.commons.validator.ValidatorAction;
 import org.apache.commons.validator.ValidatorResources;
 import org.apache.struts.Globals;
-import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionMessage;
 import org.apache.struts.action.ActionMessages;
 import org.apache.struts.util.MessageResources;
@@ -53,34 +52,17 @@
     private static String SERVLET_CONTEXT_PARAM = "javax.servlet.ServletContext";
 
     /**
-     * Resources key the <code>ServletContext</code> is stored under.
-     * @deprecated This will be removed after Struts 1.2
-     */
-    public static String SERVLET_CONTEXT_KEY = SERVLET_CONTEXT_PARAM;
-
-    /**
      * Resources key the <code>HttpServletRequest</code> is stored under.
      */
     private static String HTTP_SERVLET_REQUEST_PARAM =
         "javax.servlet.http.HttpServletRequest";
 
     /**
-     * Resources key the <code>HttpServletRequest</code> is stored under.
-     * @deprecated This will be removed after Struts 1.2
-     */
-    public static String HTTP_SERVLET_REQUEST_KEY = HTTP_SERVLET_REQUEST_PARAM;
-
-    /**
      * Resources key the <code>ActionMessages</code> is stored under.
      */
     private static String ACTION_MESSAGES_PARAM =
         "org.apache.struts.action.ActionMessages";
 
-    /**
-     * Resources key the <code>ActionErrors</code> is stored under.
-     * @deprecated This will be removed after Struts 1.2
-     */
-    public static String ACTION_ERRORS_KEY = ACTION_MESSAGES_PARAM;
 
     /**
      * Retrieve <code>ValidatorResources</code> for the current module.
@@ -144,15 +126,6 @@
 
     }
 
-    /**
-     * Get the <code>Locale</code> of the current user.
-     * @param request servlet request
-     * @deprecated Use RequestUtils.getUserLocale() instead.  This will be removed
-     * after Struts 1.2.
-     */
-    public static Locale getLocale(HttpServletRequest request) {
-        return RequestUtils.getUserLocale(request, null);
-    }
 
     /**
      * Gets the <code>Locale</code> sensitive value based on the key passed in.
@@ -254,35 +227,6 @@
 
     }
 
-    /**
-     * Gets the <code>ActionError</code> based on the
-     * <code>ValidatorAction</code> message and the <code>Field</code>'s
-     * arg objects.
-     * @param request the servlet request
-     * @param va Validator action
-     * @param field the validator Field
-     * @deprecated Use getActionMessage() instead.  This will be removed after
-     * Struts 1.2.
-     */
-    public static ActionError getActionError(
-        HttpServletRequest request,
-        ValidatorAction va,
-        Field field) {
-
-        String args[] =
-            getArgs(
-                va.getName(),
-                getMessageResources(request),
-                RequestUtils.getUserLocale(request, null),
-                field);
-
-        String msg =
-            field.getMsg(va.getName()) != null
-                ? field.getMsg(va.getName())
-                : va.getMsg();
-
-        return new ActionError(msg, args);
-    }
 
     /**
      * Gets the <code>ActionMessage</code> based on the



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