craigmcc    2003/09/28 23:55:08

  Modified:    contrib/struts-chain/src/java/org/apache/struts/chain
                        AbstractExceptionHandler.java
                        AbstractExecuteAction.java
                        AbstractPerformForward.java
                        AbstractPopulateActionForm.java
                        AbstractSelectAction.java AbstractSelectInput.java
                        AbstractSelectLocale.java AbstractSelectModule.java
                        AbstractValidateActionForm.java CreateAction.java
                        CreateActionForm.java ExceptionCatcher.java
               contrib/struts-chain/src/java/org/apache/struts/chain/legacy
                        ComposableRequestProcessor.java
               contrib/struts-chain/src/java/org/apache/struts/chain/servlet
                        ExceptionHandler.java SelectAction.java
  Log:
  Correct compile errors due to the "has-a Map" to "is-a Map" transition
  in jaarta-commons-sandbox/chain.
  
  Revision  Changes    Path
  1.2       +8 -8      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractExceptionHandler.java
  
  Index: AbstractExceptionHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractExceptionHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractExceptionHandler.java     31 Aug 2003 21:53:00 -0000      1.1
  +++ AbstractExceptionHandler.java     29 Sep 2003 06:55:07 -0000      1.2
  @@ -220,7 +220,7 @@
   
           // Look up the exception that was thrown
           Exception exception = (Exception)
  -            context.getAttributes().get(getExceptionKey());
  +            context.get(getExceptionKey());
           if (exception == null) {
               log.warn("No Exception found under key '" +
                        getExceptionKey() + "'");
  @@ -230,9 +230,9 @@
           // Look up the local or global exception handler configuration
           ExceptionConfig exceptionConfig = null;
           ActionConfig actionConfig = (ActionConfig)
  -            context.getAttributes().get(getActionConfigKey());
  +            context.get(getActionConfigKey());
           ModuleConfig moduleConfig = (ModuleConfig)
  -            context.getAttributes().get(getModuleConfigKey());
  +            context.get(getModuleConfigKey());
           if (actionConfig != null) {
               exceptionConfig =
                   actionConfig.findExceptionConfig(exception.getClass().getName());
  @@ -250,7 +250,7 @@
               handle(context, exception, exceptionConfig,
                      actionConfig, moduleConfig);
           if (forwardConfig != null) {
  -            context.getAttributes().put(getForwardConfigKey(), forwardConfig);
  +            context.put(getForwardConfigKey(), forwardConfig);
               return (false);
           } else {
               return (true);
  
  
  
  1.2       +8 -8      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractExecuteAction.java
  
  Index: AbstractExecuteAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractExecuteAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractExecuteAction.java        11 Aug 2003 04:55:34 -0000      1.1
  +++ AbstractExecuteAction.java        29 Sep 2003 06:55:07 -0000      1.2
  @@ -216,19 +216,19 @@
   
           // Acquire the resources we will need to send to the Action
           Action action = (Action)
  -            context.getAttributes().get(getActionKey());
  +            context.get(getActionKey());
           if (action == null) {
               return (false);
           }
           ActionConfig actionConfig = (ActionConfig)
  -            context.getAttributes().get(getActionConfigKey());
  +            context.get(getActionConfigKey());
           ActionForm actionForm = (ActionForm)
  -            context.getAttributes().get(getActionFormKey());
  +            context.get(getActionFormKey());
   
           // Execute the Action for this request, caching returned ActionForward
           ForwardConfig forwardConfig =
               execute(context, action, actionConfig, actionForm);
  -        context.getAttributes().put(getForwardConfigKey(), forwardConfig);
  +        context.put(getForwardConfigKey(), forwardConfig);
   
           return (false);
   
  
  
  
  1.2       +5 -5      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPerformForward.java
  
  Index: AbstractPerformForward.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPerformForward.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractPerformForward.java       11 Aug 2003 04:55:34 -0000      1.1
  +++ AbstractPerformForward.java       29 Sep 2003 06:55:07 -0000      1.2
  @@ -130,7 +130,7 @@
   
           // Is there a ForwardConfig to be performed?
           ForwardConfig forwardConfig = (ForwardConfig)
  -            context.getAttributes().get(getForwardConfigKey());
  +            context.get(getForwardConfigKey());
           if (forwardConfig == null) {
               return (true);
           }
  
  
  
  1.2       +8 -8      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPopulateActionForm.java
  
  Index: AbstractPopulateActionForm.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractPopulateActionForm.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractPopulateActionForm.java   11 Aug 2003 04:55:34 -0000      1.1
  +++ AbstractPopulateActionForm.java   29 Sep 2003 06:55:07 -0000      1.2
  @@ -187,14 +187,14 @@
   
           // Is there a form bean for this request?
           ActionForm actionForm = (ActionForm)
  -            context.getAttributes().get(getActionFormKey());
  +            context.get(getActionFormKey());
           if (actionForm == null) {
               return (false);
           }
   
           // Reset the form bean property values
           ActionConfig actionConfig = (ActionConfig)
  -            context.getAttributes().get(getActionConfigKey());
  +            context.get(getActionConfigKey());
           String prefix = actionConfig.getPrefix();
           String suffix = actionConfig.getSuffix();
           reset(context, actionConfig, actionForm);
  @@ -227,10 +227,10 @@
           // Set the cancellation attribute if appropriate
           if 
((paramValues.get(org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY) != null) ||
               
(paramValues.get(org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY_X) != null)) {
  -            wcontext.getAttributes().put(getCancelKey(), Boolean.TRUE);
  +            wcontext.put(getCancelKey(), Boolean.TRUE);
               wcontext.getRequestScope().put(Globals.CANCEL_KEY, Boolean.TRUE);
           } else {
  -            wcontext.getAttributes().put(getCancelKey(), Boolean.FALSE);
  +            wcontext.put(getCancelKey(), Boolean.FALSE);
           }
   
           return (false);
  
  
  
  1.2       +6 -6      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectAction.java
  
  Index: AbstractSelectAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractSelectAction.java 11 Aug 2003 04:55:34 -0000      1.1
  +++ AbstractSelectAction.java 29 Sep 2003 06:55:07 -0000      1.2
  @@ -166,13 +166,13 @@
           // Cache the corresponding ActonConfig instance
           WebContext wcontext = (WebContext) context;
           ModuleConfig moduleConfig = (ModuleConfig)
  -            wcontext.getAttributes().get(getModuleConfigKey());
  +            wcontext.get(getModuleConfigKey());
           ActionConfig actionConfig = moduleConfig.findActionConfig(path);
           if (actionConfig == null) {
               throw new IllegalArgumentException("No action config for '" +
                                                  path + "'");
           }
  -        wcontext.getAttributes().put(getActionConfigKey(), actionConfig);
  +        wcontext.put(getActionConfigKey(), actionConfig);
           wcontext.getRequestScope().put(Globals.MAPPING_KEY, actionConfig);
           return (false);
   
  
  
  
  1.2       +6 -6      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectInput.java
  
  Index: AbstractSelectInput.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectInput.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractSelectInput.java  31 Aug 2003 22:42:45 -0000      1.1
  +++ AbstractSelectInput.java  29 Sep 2003 06:55:07 -0000      1.2
  @@ -161,7 +161,7 @@
       public boolean execute(Context context) throws Exception {
   
           ActionConfig actionConfig = (ActionConfig)
  -            context.getAttributes().get(getActionConfigKey());
  +            context.get(getActionConfigKey());
           ModuleConfig moduleConfig = actionConfig.getModuleConfig();
   
           // Cache an ForwardConfig back to our input page
  @@ -184,7 +184,7 @@
           if (log.isDebugEnabled()) {
               log.debug("Forwarding back to " + forwardConfig);
           }
  -        context.getAttributes().put(getForwardConfigKey(), forwardConfig);
  +        context.put(getForwardConfigKey(), forwardConfig);
           return (false);
   
       }
  
  
  
  1.2       +6 -6      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectLocale.java
  
  Index: AbstractSelectLocale.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectLocale.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractSelectLocale.java 11 Aug 2003 04:55:34 -0000      1.1
  +++ AbstractSelectLocale.java 29 Sep 2003 06:55:07 -0000      1.2
  @@ -153,14 +153,14 @@
   
           // Are we configured to select Locale automatically?
           ModuleConfig moduleConfig = (ModuleConfig)
  -            context.getAttributes().get(getModuleConfigKey());
  +            context.get(getModuleConfigKey());
           if (!moduleConfig.getControllerConfig().getLocale()) {
               return (false);
           }
   
           // Retrieve and cache appropriate Locale for this request
           Locale locale = getLocale(context);
  -        context.getAttributes().put(getLocaleKey(), locale);
  +        context.put(getLocaleKey(), locale);
   
           return (false);
   
  
  
  
  1.2       +6 -6      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectModule.java
  
  Index: AbstractSelectModule.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractSelectModule.java 11 Aug 2003 04:55:34 -0000      1.1
  +++ AbstractSelectModule.java 29 Sep 2003 06:55:07 -0000      1.2
  @@ -173,12 +173,12 @@
               throw new IllegalArgumentException("No module config for prefix '" +
                                                  prefix + "'");
           }
  -        wcontext.getAttributes().put(getModuleConfigKey(), moduleConfig);
  +        wcontext.put(getModuleConfigKey(), moduleConfig);
           wcontext.getRequestScope().put(Globals.MODULE_KEY, moduleConfig);
           MessageResources messageResources = (MessageResources)
               wcontext.getApplicationScope().get(Globals.MESSAGES_KEY + prefix);
           if (messageResources != null) {
  -            wcontext.getAttributes().put(getMessageResourcesKey(),
  +            wcontext.put(getMessageResourcesKey(),
                                            messageResources);
               wcontext.getRequestScope().put(Globals.MESSAGES_KEY,
                                              messageResources);
  
  
  
  1.3       +8 -8      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractValidateActionForm.java
  
  Index: AbstractValidateActionForm.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractValidateActionForm.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractValidateActionForm.java   31 Aug 2003 22:42:45 -0000      1.2
  +++ AbstractValidateActionForm.java   29 Sep 2003 06:55:07 -0000      1.3
  @@ -246,21 +246,21 @@
   
           // Is there a form bean for this request?
           ActionForm actionForm = (ActionForm)
  -            context.getAttributes().get(getActionFormKey());
  +            context.get(getActionFormKey());
           if (actionForm == null) {
               return (false);
           }
   
           // Was this request cancelled?
           Boolean cancel = (Boolean)
  -            context.getAttributes().get(getCancelKey());
  +            context.get(getCancelKey());
           if ((cancel != null) && cancel.booleanValue()) {
               return (false);
           }
   
           // Is validation disabled on this request?
           ActionConfig actionConfig = (ActionConfig)
  -            context.getAttributes().get(getActionConfigKey());
  +            context.get(getActionConfigKey());
           if (!actionConfig.getValidate()) {
               return (false);
           }
  @@ -276,7 +276,7 @@
           // Execute the specified validation failure command
           try {
               Catalog catalog = (Catalog)
  -                context.getAttributes().get(getCatalogKey());
  +                context.get(getCatalogKey());
               Command command = catalog.getCommand(getFailureCommand());
               if (log.isTraceEnabled()) {
                   log.trace("Calling failure command '" + getFailureCommand()
  
  
  
  1.2       +7 -7      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/CreateAction.java
  
  Index: CreateAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/CreateAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CreateAction.java 11 Aug 2003 04:55:34 -0000      1.1
  +++ CreateAction.java 29 Sep 2003 06:55:07 -0000      1.2
  @@ -190,7 +190,7 @@
   
           // Look up the class name for the desired Action
           ActionConfig actionConfig = (ActionConfig)
  -            context.getAttributes().get(getActionConfigKey());
  +            context.get(getActionConfigKey());
           String type = actionConfig.getType();
   
           // Create (if necessary) and cache an Action instance
  @@ -201,12 +201,12 @@
               if (action == null) {
                   action = (Action) ClassUtils.getApplicationInstance(type);
                   ActionServlet actionServlet = (ActionServlet)
  -                    context.getAttributes().get(getActionServletKey());
  +                    context.get(getActionServletKey());
                   action.setServlet(actionServlet);
                   actions.put(type, action);
               }
           }
  -        context.getAttributes().put(getActionKey(), action);
  +        context.put(getActionKey(), action);
   
           return (false);
   
  
  
  
  1.2       +11 -11    
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/CreateActionForm.java
  
  Index: CreateActionForm.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/CreateActionForm.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CreateActionForm.java     11 Aug 2003 04:55:34 -0000      1.1
  +++ CreateActionForm.java     29 Sep 2003 06:55:07 -0000      1.2
  @@ -190,10 +190,10 @@
   
           // Is there a form bean associated with this ActionConfig?
           ActionConfig actionConfig = (ActionConfig)
  -            context.getAttributes().get(getActionConfigKey());
  +            context.get(getActionConfigKey());
           String name = actionConfig.getName();
           if (name == null) {
  -            context.getAttributes().remove(getActionFormKey());
  +            context.remove(getActionFormKey());
               return (false);
           }
   
  @@ -202,7 +202,7 @@
               actionConfig.getModuleConfig().findFormBeanConfig(name);
           if (formBeanConfig == null) {
               // FIXME - report an error?
  -            context.getAttributes().remove(getActionFormKey());
  +            context.remove(getActionFormKey());
               return (false);
           }
   
  @@ -220,7 +220,7 @@
                   String className =
                       ((DynaBean) instance).getDynaClass().getName();
                   if (className.equals(formBeanConfig.getName())) {
  -                    wcontext.getAttributes().put
  +                    wcontext.put
                           (getActionFormKey(), instance);
                       /* It should already be in session scope
                       if ("session".equals(actionConfig.getScope())) {
  @@ -236,7 +236,7 @@
                           ClassUtils.getApplicationClass
                           (formBeanConfig.getType());
                       if (configClass.isAssignableFrom(instance.getClass())) {
  -                        wcontext.getAttributes().put
  +                        wcontext.put
                               (getActionFormKey(), instance);
                           /* It should already be in session scope
                              if ("session".equals(actionConfig.getScope())) {
  @@ -266,9 +266,9 @@
   
           // Configure and cache the new instance
           ActionServlet servlet = (ActionServlet)
  -            wcontext.getAttributes().get(getActionServletKey());
  +            wcontext.get(getActionServletKey());
           instance.setServlet(servlet);
  -        wcontext.getAttributes().put(getActionFormKey(), instance);
  +        wcontext.put(getActionFormKey(), instance);
           if ("session".equals(actionConfig.getScope())) {
               wcontext.getSessionScope().put
                   (actionConfig.getAttribute(), instance);
  
  
  
  1.2       +7 -7      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/ExceptionCatcher.java
  
  Index: ExceptionCatcher.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/ExceptionCatcher.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExceptionCatcher.java     31 Aug 2003 21:53:00 -0000      1.1
  +++ ExceptionCatcher.java     29 Sep 2003 06:55:07 -0000      1.2
  @@ -182,7 +182,7 @@
        */
       public boolean execute(Context context) throws Exception {
   
  -        context.getAttributes().remove(getExceptionKey());
  +        context.remove(getExceptionKey());
           return (false);
   
       }
  @@ -210,12 +210,12 @@
           if (log.isDebugEnabled()) {
               log.debug("Attempting to handle a thrown exception");
           }
  -        context.getAttributes().put(getExceptionKey(), exception);
  +        context.put(getExceptionKey(), exception);
   
           // Execute the specified command
           try {
               Catalog catalog = (Catalog)
  -                context.getAttributes().get(getCatalogKey());
  +                context.get(getCatalogKey());
               Command command = catalog.getCommand(getExceptionCommand());
               if (log.isTraceEnabled()) {
                   log.trace("Calling handler command '" + getExceptionCommand()
  
  
  
  1.4       +10 -10    
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/legacy/ComposableRequestProcessor.java
  
  Index: ComposableRequestProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/legacy/ComposableRequestProcessor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ComposableRequestProcessor.java   31 Aug 2003 21:53:00 -0000      1.3
  +++ ComposableRequestProcessor.java   29 Sep 2003 06:55:07 -0000      1.4
  @@ -176,12 +176,12 @@
           // Create and populate a Context for this request
           ServletWebContext context = new ServletWebContext();
           context.initialize(getServletContext(), request, response);
  -        context.getAttributes().put(Constants.CATALOG_KEY,
  -                                    this.catalog);
  -        context.getAttributes().put(Constants.ACTION_SERVLET_KEY,
  -                                    this.servlet);
  -        context.getAttributes().put(Constants.MODULE_CONFIG_KEY,
  -                                    this.moduleConfig);
  +        context.put(Constants.CATALOG_KEY,
  +                    this.catalog);
  +        context.put(Constants.ACTION_SERVLET_KEY,
  +                    this.servlet);
  +        context.put(Constants.MODULE_CONFIG_KEY,
  +                    this.moduleConfig);
   
           // Create and execute the command.
           Command command = this.catalog.getCommand("servlet-standard");
  
  
  
  1.2       +5 -5      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet/ExceptionHandler.java
  
  Index: ExceptionHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet/ExceptionHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExceptionHandler.java     31 Aug 2003 21:53:00 -0000      1.1
  +++ ExceptionHandler.java     29 Sep 2003 06:55:08 -0000      1.2
  @@ -139,7 +139,7 @@
           // Look up the remaining properties needed for this handler
           ServletWebContext swcontext = (ServletWebContext) context;
           ActionForm actionForm = (ActionForm)
  -            swcontext.getAttributes().get(getActionFormKey());
  +            swcontext.get(getActionFormKey());
           HttpServletRequest request = swcontext.getRequest();
           HttpServletResponse response = swcontext.getResponse();
   
  
  
  
  1.2       +5 -5      
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet/SelectAction.java
  
  Index: SelectAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/servlet/SelectAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SelectAction.java 11 Aug 2003 04:55:34 -0000      1.1
  +++ SelectAction.java 29 Sep 2003 06:55:08 -0000      1.2
  @@ -114,7 +114,7 @@
   
           // Strip the module prefix and extension (if any)
           ModuleConfig moduleConfig = (ModuleConfig)
  -            swcontext.getAttributes().get(getModuleConfigKey());
  +            swcontext.get(getModuleConfigKey());
           String prefix = moduleConfig.getPrefix();
           if (!path.startsWith(prefix)) {
               throw new IllegalArgumentException("Path does not start with '" +
  
  
  

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

Reply via email to