dgraham     2003/08/08 16:26:36

  Modified:    src/share/org/apache/struts Globals.java
               src/share/org/apache/struts/action ActionServlet.java
               src/share/org/apache/struts/config
                        ConfigHelperInterface.java ConfigHelper.java
  Log:
  Removed references to ActionMappings, ActionFormBeans, and 
  ActionForwards.
  
  Revision  Changes    Path
  1.8       +4 -44     jakarta-struts/src/share/org/apache/struts/Globals.java
  
  Index: Globals.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/Globals.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Globals.java      4 Jul 2003 21:35:50 -0000       1.7
  +++ Globals.java      8 Aug 2003 23:26:36 -0000       1.8
  @@ -137,7 +137,6 @@
       public static final String ERROR_KEY =
         "org.apache.struts.action.ERROR";
   
  -
       /**
        * The request attributes key under which Struts custom tags might store a
        * <code>Throwable</code> that caused them to report a JspException at
  @@ -147,31 +146,6 @@
       public static final String EXCEPTION_KEY =
           "org.apache.struts.action.EXCEPTION";
   
  -
  -    /**
  -     * The context attributes key under which our
  -     * <code>org.apache.struts.action.ActionFormBeans</code> collection
  -     * is normally stored, unless overridden when initializing our
  -     * ActionServlet.
  -     *
  -     * @deprecated Replaced by collection in ModuleConfig
  -     */
  -    public static final String FORM_BEANS_KEY =
  -        "org.apache.struts.action.FORM_BEANS";
  -
  -
  -    /**
  -     * The context attributes key under which our
  -     * <code>org.apache.struts.action.ActionForwards</code> collection
  -     * is normally stored, unless overridden when initializing our
  -     * ActionServlet.
  -     *
  -     * @deprecated Replaced by collection in ModuleConfig.
  -     */
  -    public static final String FORWARDS_KEY =
  -      "org.apache.struts.action.FORWARDS";
  -
  -
       /**
        * The session attributes key under which the user's selected
        * <code>java.util.Locale</code> is stored, if any.  If no such
  @@ -182,7 +156,6 @@
       public static final String LOCALE_KEY =
         "org.apache.struts.action.LOCALE";
   
  -
       /**
        * The request attributes key under which our
        * <code>org.apache.struts.ActionMapping</code> instance
  @@ -190,19 +163,6 @@
        */
       public static final String MAPPING_KEY =
           "org.apache.struts.action.mapping.instance";
  -
  -
  -    /**
  -     * The context attributes key under which our
  -     * <code>org.apache.struts.action.ActionMappings</code> collection
  -     * is normally stored, unless overridden when initializing our
  -     * ActionServlet.
  -     *
  -     * @deprecated Replaced by collection in ModuleConfig
  -     */
  -    public static final String MAPPINGS_KEY =
  -      "org.apache.struts.action.MAPPINGS";
  -
   
       /**
        * The request attributes key under which your action should store an
  
  
  
  1.166     +4 -94     
jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
  
  Index: ActionServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- ActionServlet.java        2 Aug 2003 21:08:55 -0000       1.165
  +++ ActionServlet.java        8 Aug 2003 23:26:36 -0000       1.166
  @@ -99,11 +99,9 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.struts.Globals;
  -import org.apache.struts.config.ActionConfig;
   import org.apache.struts.config.ConfigRuleSet;
   import org.apache.struts.config.DataSourceConfig;
   import org.apache.struts.config.FormBeanConfig;
  -import org.apache.struts.config.ForwardConfig;
   import org.apache.struts.config.MessageResourcesConfig;
   import org.apache.struts.config.ModuleConfig;
   import org.apache.struts.config.ModuleConfigFactory;
  @@ -731,17 +729,7 @@
               }
           }
   
  -        // Special handling for the default module (for
  -        // backwards compatibility only, will be removed later)
  -        if (prefix.length() < 1) {
  -            defaultFormBeansConfig(config);
  -            defaultForwardsConfig(config);
  -            defaultMappingsConfig(config);
  -        }
  -
  -        // Return the completed configuration object
           return config;
  -
       }
   
       /**
  @@ -1167,84 +1155,6 @@
   
           ModuleUtils.getInstance().selectModule(request, getServletContext());
           getRequestProcessor(getModuleConfig(request)).process(request, response);
  -    }
  -
  -
  -    // -------------------------------------------------------- Private Methods
  -
  -    /**
  -     * Perform backwards-compatible configuration of an ActionFormBeans
  -     * collection, and expose it as a servlet context attribute (as was
  -     * used in Struts 1.0).  Note that the current controller code does
  -     * not (and should not) reference this attribute for any reason.
  -     *
  -     * @param config The ModuleConfig object for the default app
  -     *
  -     * @since Struts 1.1
  -     * @deprecated Will be removed in a release after Struts 1.1.
  -     */
  -    private void defaultFormBeansConfig(ModuleConfig config) {
  -
  -        FormBeanConfig fbcs[] = config.findFormBeanConfigs();
  -        ActionFormBeans afb = new ActionFormBeans();
  -        afb.setFast(false);
  -        for (int i = 0; i < fbcs.length; i++) {
  -            afb.addFormBean((ActionFormBean) fbcs[i]);
  -        }
  -        afb.setFast(true);
  -        getServletContext().setAttribute(Globals.FORM_BEANS_KEY, afb);
  -
  -    }
  -
  -
  -    /**
  -     * Perform backwards-compatible configuration of an ActionForwards
  -     * collection, and expose it as a servlet context attribute (as was
  -     * used in Struts 1.0).  Note that the current controller code does
  -     * not (and should not) reference this attribute for any reason.
  -     *
  -     * @param config The ModuleConfig object for the default app
  -     *
  -     * @since Struts 1.1
  -     * @deprecated Will be removed in a release after Struts 1.1.
  -     */
  -    private void defaultForwardsConfig(ModuleConfig config) {
  -
  -        ForwardConfig fcs[] = config.findForwardConfigs();
  -        ActionForwards af = new ActionForwards();
  -        af.setFast(false);
  -        for (int i = 0; i < fcs.length; i++) {
  -            af.addForward((ActionForward) fcs[i]);
  -        }
  -        af.setFast(true);
  -        getServletContext().setAttribute(Globals.FORWARDS_KEY, af);
  -
  -    }
  -
  -
  -    /**
  -     * Perform backwards-compatible configuration of an ActionMappings
  -     * collection, and expose it as a servlet context attribute (as was
  -     * used in Struts 1.0).  Note that the current controller code does
  -     * not (and should not) reference this attribute for any reason.
  -     *
  -     * @param config The ModuleConfig object for the default app
  -     *
  -     * @since Struts 1.1
  -     * @deprecated Will be removed in a release after Struts 1.1.
  -     */
  -    private void defaultMappingsConfig(ModuleConfig config) {
  -
  -        ActionConfig acs[] = config.findActionConfigs();
  -        ActionMappings am = new ActionMappings();
  -        am.setServlet(this);
  -        am.setFast(false);
  -        for (int i = 0; i < acs.length; i++) {
  -            am.addMapping((ActionMapping) acs[i]);
  -        }
  -        am.setFast(true);
  -        getServletContext().setAttribute(Globals.MAPPINGS_KEY, am);
  -
       }
   
   }
  
  
  
  1.7       +8 -37     
jakarta-struts/src/share/org/apache/struts/config/ConfigHelperInterface.java
  
  Index: ConfigHelperInterface.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ConfigHelperInterface.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ConfigHelperInterface.java        4 Jul 2003 20:53:42 -0000       1.6
  +++ ConfigHelperInterface.java        8 Aug 2003 23:26:36 -0000       1.7
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,18 +65,15 @@
   
   import java.util.Iterator;
   import java.util.Locale;
  +
   import javax.sql.DataSource;
   
   import org.apache.struts.action.ActionErrors;
  -import org.apache.struts.action.ActionMapping;
  -import org.apache.struts.action.ActionMappings;
  -import org.apache.struts.action.ActionMessages;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionFormBean;
  -import org.apache.struts.action.ActionFormBeans;
   import org.apache.struts.action.ActionForward;
  -import org.apache.struts.action.ActionForwards;
  -
  +import org.apache.struts.action.ActionMapping;
  +import org.apache.struts.action.ActionMessages;
   import org.apache.struts.upload.MultipartRequestWrapper;
   import org.apache.struts.util.MessageResources;
   
  @@ -116,42 +113,16 @@
   
       public DataSource getDataSource();
   
  -
       /**
        * The <code>org.apache.struts.action.ActionFormBeans</code> collection
        * for this application.
        */
       public ActionMessages getActionMessages();
   
  -
  -    /**
  -     * The <code>org.apache.struts.action.ActionFormBeans</code> collection
  -     * for this application.
  -     */
  -    public ActionFormBeans getActionFormBeans();
  -
  -
  -    /**
  -     * The <code>org.apache.struts.action.ActionForwards</code> collection
  -     * for this application.
  -     */
  -    public ActionForwards getActionForwards();
  -
  -
  -    /**
  -     * The context attributes key under which our
  -     * <code>org.apache.struts.action.ActionMappings</code> collection
  -     * is normally stored, unless overridden when initializing our
  -     * ActionServlet.
  -     */
  -    public ActionMappings getActionMappings();
  -
  -
       /**
        * The application resources for this application.
        */
       public MessageResources getMessageResources();
  -
   
       /**
        * The path-mapped pattern (<code>/action/*</code>) or
  
  
  
  1.9       +3 -67     
jakarta-struts/src/share/org/apache/struts/config/ConfigHelper.java
  
  Index: ConfigHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ConfigHelper.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ConfigHelper.java 4 Aug 2003 12:07:34 -0000       1.8
  +++ ConfigHelper.java 8 Aug 2003 23:26:36 -0000       1.9
  @@ -75,11 +75,8 @@
   import org.apache.struts.action.ActionErrors;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionFormBean;
  -import org.apache.struts.action.ActionFormBeans;
   import org.apache.struts.action.ActionForward;
  -import org.apache.struts.action.ActionForwards;
   import org.apache.struts.action.ActionMapping;
  -import org.apache.struts.action.ActionMappings;
   import org.apache.struts.action.ActionMessages;
   import org.apache.struts.upload.MultipartRequestWrapper;
   import org.apache.struts.util.MessageResources;
  @@ -231,49 +228,6 @@
       }
   
       /**
  -     * The <code>org.apache.struts.action.ActionFormBeans</code> collection
  -     * for this application.
  -     * @deprecated deprecated in struts 1.2 ActionFormBeans is replaced by a 
collection in ModuleConfig.
  -     */
  -    public ActionFormBeans getActionFormBeans() {
  -
  -        if (this.application == null) {
  -            return null;
  -        }
  -        return (ActionFormBeans) 
this.application.getAttribute(Globals.FORM_BEANS_KEY);
  -
  -    }
  -
  -    /**
  -     * The <code>org.apache.struts.action.ActionForwards</code> collection
  -     * for this application.
  -     * @deprecated deprecated in struts 1.2 ActionForwards is replaced by a 
collection in ModuleConfig.
  -
  -     */
  -    public ActionForwards getActionForwards() {
  -
  -        if (this.application == null) {
  -            return null;
  -        }
  -        return (ActionForwards) this.application.getAttribute(Globals.FORWARDS_KEY);
  -
  -    }
  -
  -    /**
  -     * The context attributes key under which our
  -     * <code>org.apache.struts.action.ActionMappings</code> collection
  -     * is normally stored, unless overridden when initializing our
  -     * ActionServlet.
  -     * @deprecated deprecated in struts 1.2 ActionMappings is replaced by a 
collection in ModuleConfig.
  -     */
  -    public ActionMappings getActionMappings() {
  -        if (this.application == null) {
  -            return null;
  -        }
  -        return (ActionMappings) this.application.getAttribute(Globals.MAPPINGS_KEY);
  -    }
  -
  -    /**
        * The application resources for this application.
        */
       public MessageResources getMessageResources() {
  @@ -445,13 +399,7 @@
        * @param name Logical name of the requested form bean definition
        */
       public ActionFormBean getFormBean(String name) {
  -
  -        ActionFormBeans formBeans = getActionFormBeans();
  -
  -        if (formBeans == null)
  -            return null;
  -        return formBeans.findFormBean(name);
  -
  +        return null;
       }
   
       /**
  @@ -461,13 +409,7 @@
        * @param name Logical name of the requested forwarding
        */
       public ActionForward getActionForward(String name) {
  -
  -        ActionForwards forwards = getActionForwards();
  -
  -        if (forwards == null)
  -            return null;
  -        return forwards.findForward(name);
  -
  +        return null;
       }
   
       /**
  @@ -477,13 +419,7 @@
        * @param path Request path for which a mapping is requested
        */
       public ActionMapping getActionMapping(String path) {
  -
  -        ActionMappings mappings = getActionMappings();
  -
  -        if (mappings == null)
  -            return null;
  -        return mappings.findMapping(path);
  -
  +        return null;
       }
   
       /**
  
  
  

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

Reply via email to