cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r485024 - in /cocoon/trunk/core: cocoon-blocks-fw/cocoon-blocks-fw-impl/src/main/java/org/apache/cocoon/blocks/ cocoon-core/src/main/java/org/apache/cocoon/ cocoon-core/src/main/java/org/apache/cocoon/components/source/ cocoon-core/src/main...
Date Sat, 09 Dec 2006 18:22:31 GMT
Author: cziegeler
Date: Sat Dec  9 10:22:28 2006
New Revision: 485024

URL: http://svn.apache.org/viewvc?view=rev&rev=485024
Log:
Clean up code and move avalon specific stuff into avalon package

Modified:
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/src/main/java/org/apache/cocoon/blocks/DispatcherServlet.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/ProcessingUtil.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/SourceUtil.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNodeBuilder.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonChildLoggerFactoryBean.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonSitemapContextFactoryBean.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/DebugFilter.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java
    cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java

Modified: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/src/main/java/org/apache/cocoon/blocks/DispatcherServlet.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/src/main/java/org/apache/cocoon/blocks/DispatcherServlet.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/src/main/java/org/apache/cocoon/blocks/DispatcherServlet.java
(original)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/src/main/java/org/apache/cocoon/blocks/DispatcherServlet.java
Sat Dec  9 10:22:28 2006
@@ -33,6 +33,7 @@
 
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.cocoon.ProcessingUtil;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.springframework.beans.BeanWrapperImpl;
 import org.springframework.beans.factory.BeanFactoryUtils;
 import org.springframework.beans.factory.ListableBeanFactory;
@@ -73,7 +74,7 @@
             WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext());
         
         // setup logger
-        this.log = (Logger) this.beanFactory.getBean(ProcessingUtil.LOGGER_ROLE);       

+        this.log = (Logger) this.beanFactory.getBean(AvalonUtils.LOGGER_ROLE);        
         this.log.info("DispatcherServlet is initializing");
         
         // the returned map contains the bean names as key and the beans as values

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/ProcessingUtil.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/ProcessingUtil.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/ProcessingUtil.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/ProcessingUtil.java Sat
Dec  9 10:22:28 2006
@@ -20,34 +20,13 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.environment.internal.EnvironmentHelper;
-
 /**
  * This is an utility class for processing Cocoon requests.
  *
- * TODO Remove the avalon specific stuff and move it into an avalon specific package
- *
  * $Id$
  * @since 2.2
  */
-public class ProcessingUtil {
-
-    /** Bean name for the Avalon context. */
-    public static final String CONTEXT_ROLE = "org.apache.avalon.framework.context.Context";
-
-    /** Bean name for the logger. */
-    public static final String LOGGER_ROLE = "org.apache.avalon.framework.logger.Logger";
-
-    /** Bean name for the service manager. */
-    public static final String SERVICE_MANAGER_ROLE = "org.apache.avalon.framework.service.ServiceManager";
-
-    /**
-     * Avoid construction.
-     */
-    private ProcessingUtil() {
-        // empty 
-    }
+public abstract class ProcessingUtil {
 
     /**
      * The cleanup threads that are invoked after the processing of a
@@ -97,16 +76,5 @@
          * This method should never raise any exception!
          */
         void invoke();
-    }
-
-    /**
-     * Get the current sitemap component manager.
-     * This method returns the current sitemap component manager. This
-     * is the manager that holds all the components of the currently
-     * processed (sub)sitemap.
-     * @deprecated This method will be removed.
-     */
-    static public ServiceManager getSitemapServiceManager() {
-        return EnvironmentHelper.getSitemapServiceManager(); 
     }
 }

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/SourceUtil.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/SourceUtil.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/SourceUtil.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/source/SourceUtil.java
Sat Dec  9 10:22:28 2006
@@ -22,8 +22,8 @@
 import org.apache.avalon.framework.service.ServiceSelector;
 
 import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.ResourceNotFoundException;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
 import org.apache.cocoon.serialization.Serializer;
 import org.apache.cocoon.util.NetUtils;
 import org.apache.cocoon.xml.IncludeXMLConsumer;
@@ -69,7 +69,18 @@
  */
 public final class SourceUtil {
 
-    private static REProgram uripattern = null;
+    /**
+     * Get the current sitemap component manager.
+     * This method returns the current sitemap component manager. This
+     * is the manager that holds all the components of the currently
+     * processed (sub)sitemap.
+     * @deprecated This method will be removed.
+     */
+    static private ServiceManager getSitemapServiceManager() {
+        return EnvironmentHelper.getSitemapServiceManager(); 
+    }
+
+    private static REProgram uripattern;
 
     static {
         try {
@@ -132,7 +143,7 @@
     static public void toSAX(Source source,
                              ContentHandler handler)
     throws SAXException, IOException, ProcessingException {
-        toSAX(ProcessingUtil.getSitemapServiceManager(),
+        toSAX(getSitemapServiceManager(),
               source, null, handler);
     }
 
@@ -151,7 +162,7 @@
                              String mimeTypeHint,
                              ContentHandler handler)
     throws SAXException, IOException, ProcessingException {
-        toSAX(ProcessingUtil.getSitemapServiceManager(),
+        toSAX(getSitemapServiceManager(),
               source, mimeTypeHint, handler);
     }
 
@@ -574,7 +585,7 @@
                 frag.normalize();
 
                 if (null != serializerName) {
-                    ServiceManager manager = ProcessingUtil.getSitemapServiceManager();
+                    ServiceManager manager = getSitemapServiceManager();
 
                     ServiceSelector selector = null;
                     Serializer serializer = null;
@@ -616,7 +627,7 @@
             } else {
                 String content;
                 if (null != serializerName) {
-                    ServiceManager manager = ProcessingUtil.getSitemapServiceManager();
+                    ServiceManager manager = getSitemapServiceManager();
 
                     ServiceSelector selector = null;
                     Serializer serializer = null;

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNodeBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNodeBuilder.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNodeBuilder.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNodeBuilder.java
Sat Dec  9 10:22:28 2006
@@ -20,7 +20,7 @@
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.ProcessingUtil;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 
 /**
  *
@@ -38,7 +38,7 @@
      */
     public void setBuilder(TreeBuilder treeBuilder) {
         this.treeBuilder = treeBuilder;
-        this.manager = (ServiceManager)treeBuilder.getContainer().getBeanFactory().getBean(ProcessingUtil.SERVICE_MANAGER_ROLE);
+        this.manager = (ServiceManager)treeBuilder.getContainer().getBeanFactory().getBean(AvalonUtils.SERVICE_MANAGER_ROLE);
     }
 
     /**

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
Sat Dec  9 10:22:28 2006
@@ -27,11 +27,11 @@
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.Processor;
 import org.apache.cocoon.components.source.impl.SitemapSourceInfo;
 import org.apache.cocoon.core.container.spring.CocoonRequestAttributes;
 import org.apache.cocoon.core.container.spring.Container;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.cocoon.environment.Environment;
 import org.apache.cocoon.environment.ForwardRedirector;
 import org.apache.cocoon.environment.ObjectModelHelper;
@@ -119,7 +119,7 @@
         }
         this.classLoader = container.getClassLoader();
         this.container = container;
-        this.manager = (ServiceManager)this.container.getBeanFactory().getBean(ProcessingUtil.SERVICE_MANAGER_ROLE);
+        this.manager = (ServiceManager)this.container.getBeanFactory().getBean(AvalonUtils.SERVICE_MANAGER_ROLE);
         this.rootNode = rootNode;
         this.disposableNodes = disposableNodes;
         this.enterSitemapEventListeners = enterSitemapEventListeners;

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
Sat Dec  9 10:22:28 2006
@@ -44,7 +44,6 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.cocoon.Constants;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.classloader.reloading.Monitor;
 import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.components.source.SourceUtil;
@@ -344,7 +343,7 @@
                                                location,
                                                fam,
                                                (ServletContext)this.context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT));
-        final Context itsContext = (Context)this.itsContainer.getBeanFactory().getBean(ProcessingUtil.CONTEXT_ROLE);
+        final Context itsContext = (Context)this.itsContainer.getBeanFactory().getBean(AvalonUtils.CONTEXT_ROLE);
         // The namespace used in the whole sitemap is the one of the root
         // element
         this.itsNamespace = tree.getNamespace();
@@ -354,7 +353,7 @@
             tree = AvalonUtils.replaceProperties(tree, this.itsContainer.getSettings());
         }
 
-        this.itsManager = (ServiceManager) this.itsContainer.getBeanFactory().getBean(ProcessingUtil.SERVICE_MANAGER_ROLE);
+        this.itsManager = (ServiceManager) this.itsContainer.getBeanFactory().getBean(AvalonUtils.SERVICE_MANAGER_ROLE);
         // register listeners
         this.registerListeners();
 

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonChildLoggerFactoryBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonChildLoggerFactoryBean.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonChildLoggerFactoryBean.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonChildLoggerFactoryBean.java
Sat Dec  9 10:22:28 2006
@@ -17,7 +17,6 @@
 package org.apache.cocoon.core.container.spring.avalon;
 
 import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.BeansException;
@@ -57,7 +56,7 @@
     throws Exception {
         // get parent factory
         final BeanFactory parentFactory = ((HierarchicalBeanFactory)this.beanFactory).getParentBeanFactory();
-        final Logger parentLogger = (Logger)parentFactory.getBean(ProcessingUtil.LOGGER_ROLE);
+        final Logger parentLogger = (Logger)parentFactory.getBean(AvalonUtils.LOGGER_ROLE);
         if ( this.category == null ) {
             this.logger = parentLogger;
         } else {

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonElementParser.java
Sat Dec  9 10:22:28 2006
@@ -26,7 +26,6 @@
 import org.apache.avalon.excalibur.pool.Poolable;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.acting.Action;
 import org.apache.cocoon.components.pipeline.ProcessingPipeline;
 import org.apache.cocoon.components.treeprocessor.ProcessorComponentInfo;
@@ -100,7 +99,7 @@
 
         // add service manager
         this.addComponent(AvalonServiceManager.class,
-                ProcessingUtil.SERVICE_MANAGER_ROLE,
+                AvalonUtils.SERVICE_MANAGER_ROLE,
                 null,
                 false,
                 registry);
@@ -127,8 +126,8 @@
 
         // and finally add avalon bean post processor
         final RootBeanDefinition beanDef = this.createBeanDefinition(AvalonBeanPostProcessor.class,
"init", true);
-        beanDef.getPropertyValues().addPropertyValue("logger", new RuntimeBeanReference(ProcessingUtil.LOGGER_ROLE));
-        beanDef.getPropertyValues().addPropertyValue("context", new RuntimeBeanReference(ProcessingUtil.CONTEXT_ROLE));
+        beanDef.getPropertyValues().addPropertyValue("logger", new RuntimeBeanReference(AvalonUtils.LOGGER_ROLE));
+        beanDef.getPropertyValues().addPropertyValue("context", new RuntimeBeanReference(AvalonUtils.CONTEXT_ROLE));
         beanDef.getPropertyValues().addPropertyValue("configurationInfo", new RuntimeBeanReference(ConfigurationInfo.class.getName()));
         beanDef.getPropertyValues().addPropertyValue("resourceLoader", resourceLoader);
         beanDef.getPropertyValues().addPropertyValue("location", this.getConfigurationLocation());
@@ -143,7 +142,7 @@
 
     protected void addContext(Element element, BeanDefinitionRegistry registry) {
         this.addComponent(AvalonContextFactoryBean.class,
-                ProcessingUtil.CONTEXT_ROLE,
+                AvalonUtils.CONTEXT_ROLE,
                 "init",
                 true,
                 registry);        
@@ -165,7 +164,7 @@
             if ( loggerCategory != null ) {
                 beanDef.getPropertyValues().addPropertyValue("category", loggerCategory);
             }
-            this.register(beanDef, ProcessingUtil.LOGGER_ROLE, registry);
+            this.register(beanDef, AvalonUtils.LOGGER_ROLE, registry);
         }
     }
 

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonSitemapContextFactoryBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonSitemapContextFactoryBean.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonSitemapContextFactoryBean.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonSitemapContextFactoryBean.java
Sat Dec  9 10:22:28 2006
@@ -19,7 +19,6 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.DefaultContext;
 import org.apache.cocoon.Constants;
-import org.apache.cocoon.ProcessingUtil;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.BeanFactoryAware;
@@ -64,7 +63,7 @@
     throws Exception {
         final BeanFactory parentBeanFactory = ((HierarchicalBeanFactory)this.beanFactory).getParentBeanFactory();
         // create new Avalon context
-        final DefaultContext appContext = new DefaultContext((Context)parentBeanFactory.getBean(ProcessingUtil.CONTEXT_ROLE));
+        final DefaultContext appContext = new DefaultContext((Context)parentBeanFactory.getBean(AvalonUtils.CONTEXT_ROLE));
         appContext.put(Constants.CONTEXT_ENV_PREFIX, this.uriPrefix);
 
         this.context = appContext;

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonUtils.java
Sat Dec  9 10:22:28 2006
@@ -16,20 +16,11 @@
  */
 package org.apache.cocoon.core.container.spring.avalon;
 
-import java.net.URL;
-import java.util.Iterator;
-
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.cocoon.classloader.reloading.ReloadingClassLoaderConfiguration;
 import org.apache.cocoon.configuration.Settings;
 import org.apache.cocoon.configuration.impl.PropertyHelper;
-//TODO rcl    
-// import org.apache.commons.jci.stores.ResourceStore;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.TraversableSource;
 
 /**
  * Some utility methods for handling Avalon stuff.
@@ -38,6 +29,13 @@
  * @since 2.2
  */
 public class AvalonUtils {
+
+    /** Bean name for the Avalon context. */
+    public static final String CONTEXT_ROLE = "org.apache.avalon.framework.context.Context";
+    /** Bean name for the logger. */
+    public static final String LOGGER_ROLE = "org.apache.avalon.framework.logger.Logger";
+    /** Bean name for the service manager. */
+    public static final String SERVICE_MANAGER_ROLE = "org.apache.avalon.framework.service.ServiceManager";
 
     /**
      * Replace all properties in the configuration object.

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
Sat Dec  9 10:22:28 2006
@@ -18,7 +18,6 @@
  */
 package org.apache.cocoon.core.container.spring.avalon;
 
-import org.apache.cocoon.ProcessingUtil;
 import org.springframework.beans.factory.support.BeanDefinitionRegistry;
 import org.springframework.beans.factory.support.RootBeanDefinition;
 import org.springframework.core.io.ResourceLoader;
@@ -41,7 +40,7 @@
                                                                       "init",
                                                                       false);
         beanDefinition.getPropertyValues().addPropertyValue("uriPrefix", uriPrefix);
-        this.register(beanDefinition, ProcessingUtil.CONTEXT_ROLE, registry);
+        this.register(beanDefinition, AvalonUtils.CONTEXT_ROLE, registry);
     }
 
     /**
@@ -57,7 +56,7 @@
         if ( loggerCategory != null ) {
             beanDef.getPropertyValues().addPropertyValue("category", loggerCategory);
         }
-        this.register(beanDef, ProcessingUtil.LOGGER_ROLE, registry);
+        this.register(beanDef, AvalonUtils.LOGGER_ROLE, registry);
     }
 
     /**

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
Sat Dec  9 10:22:28 2006
@@ -28,11 +28,11 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.Processor;
 import org.apache.cocoon.components.source.SourceUtil;
 import org.apache.cocoon.core.container.spring.CocoonRequestAttributes;
 import org.apache.cocoon.core.container.spring.Container;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.cocoon.environment.Context;
 import org.apache.cocoon.environment.Environment;
 import org.apache.cocoon.environment.ObjectModelHelper;
@@ -400,7 +400,7 @@
             final Request request = ObjectModelHelper.getRequest(info.environment.getObjectModel());
             final Context context = ObjectModelHelper.getContext(info.environment.getObjectModel());
             final Container container = Container.getCurrentContainer(context, new CocoonRequestAttributes(request));
-            return (ServiceManager)container.getBeanFactory().getBean(ProcessingUtil.SERVICE_MANAGER_ROLE);
+            return (ServiceManager)container.getBeanFactory().getBean(AvalonUtils.SERVICE_MANAGER_ROLE);
         }
         return null;
     }

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/DebugFilter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/DebugFilter.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/DebugFilter.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/DebugFilter.java
Sat Dec  9 10:22:28 2006
@@ -29,7 +29,7 @@
 import javax.servlet.http.HttpSession;
 
 import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.ProcessingUtil;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.commons.lang.SystemUtils;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -54,7 +54,7 @@
      */
     public void init(FilterConfig config) throws ServletException {
         BeanFactory cocoonBeanFactory = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext());
-        this.logger = (Logger) cocoonBeanFactory.getBean(ProcessingUtil.LOGGER_ROLE);
+        this.logger = (Logger) cocoonBeanFactory.getBean(AvalonUtils.LOGGER_ROLE);
     }
 
     /**

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
Sat Dec  9 10:22:28 2006
@@ -36,6 +36,7 @@
 import org.apache.cocoon.components.notification.Notifier;
 import org.apache.cocoon.components.notification.Notifying;
 import org.apache.cocoon.configuration.Settings;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.cocoon.environment.Context;
 import org.apache.cocoon.environment.Environment;
 import org.apache.cocoon.environment.http.HttpContext;
@@ -95,7 +96,7 @@
         } else {
             this.containerEncoding = encoding;
         }
-        this.log = (Logger) this.cocoonBeanFactory.getBean(ProcessingUtil.LOGGER_ROLE);
+        this.log = (Logger) this.cocoonBeanFactory.getBean(AvalonUtils.LOGGER_ROLE);
         this.processor = this.getProcessor();
         this.environmentContext = new HttpContext(this.servletContext);
         // get the optional request listener

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
Sat Dec  9 10:22:28 2006
@@ -31,11 +31,11 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.components.notification.DefaultNotifyingBuilder;
 import org.apache.cocoon.components.notification.Notifier;
 import org.apache.cocoon.components.notification.Notifying;
 import org.apache.cocoon.configuration.Settings;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.cocoon.environment.Environment;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -82,7 +82,7 @@
                                                  this.settings.isSilentlyRename(),
                                                  this.settings.getMaxUploadSize(),
                                                  containerEncoding);
-        this.log = (Logger) this.cocoonBeanFactory.getBean(ProcessingUtil.LOGGER_ROLE);
+        this.log = (Logger) this.cocoonBeanFactory.getBean(AvalonUtils.LOGGER_ROLE);
     }
 
     /**

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java
Sat Dec  9 10:22:28 2006
@@ -28,10 +28,10 @@
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.Processor;
 import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.components.treeprocessor.TreeProcessor;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.springframework.beans.factory.BeanCreationException;
 
 /**
@@ -73,7 +73,7 @@
 
         protected Processor getProcessor() {
             ServiceManager serviceManager =
-                (ServiceManager) this.cocoonBeanFactory.getBean(ProcessingUtil.SERVICE_MANAGER_ROLE);
+                (ServiceManager) this.cocoonBeanFactory.getBean(AvalonUtils.SERVICE_MANAGER_ROLE);
             try {
                 this.treeProcessorConfiguration =
                     this.createTreeProcessorConfiguration(this.servletContext);

Modified: cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java?view=diff&rev=485024&r1=485023&r2=485024
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/core/container/ContainerTestCase.java
Sat Dec  9 10:22:28 2006
@@ -41,11 +41,11 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.Constants;
-import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.configuration.Settings;
 import org.apache.cocoon.configuration.impl.MutableSettings;
 import org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor;
 import org.apache.cocoon.core.container.spring.avalon.AvalonElementParser;
+import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.cocoon.core.container.spring.avalon.ConfigurationInfo;
 import org.apache.cocoon.core.container.spring.avalon.ConfigurationReader;
 import org.apache.cocoon.environment.mock.MockContext;
@@ -351,7 +351,7 @@
 
         ((DefaultListableBeanFactory)this.beanFactory).preInstantiateSingletons();
         this.manager = (ServiceManager)this.beanFactory.getBean(ServiceManager.class.getName());
-        this.context = (Context)this.beanFactory.getBean(ProcessingUtil.CONTEXT_ROLE);
+        this.context = (Context)this.beanFactory.getBean(AvalonUtils.CONTEXT_ROLE);
     }
 
     protected final Object lookup( final String key )
@@ -418,14 +418,14 @@
         protected void addContext(Element element, BeanDefinitionRegistry registry) {
             RootBeanDefinition def = this.createBeanDefinition(ContextFactoryBean.class,
"init", false);
             def.getPropertyValues().addPropertyValue("properties", this.properties);
-            this.register(def, ProcessingUtil.CONTEXT_ROLE, registry);
+            this.register(def, AvalonUtils.CONTEXT_ROLE, registry);
         }
 
         /**
          * @see org.apache.cocoon.core.container.spring.avalon.AvalonElementParser#addLogger(java.lang.String,
org.springframework.beans.factory.support.BeanDefinitionRegistry, java.lang.String)
          */
         protected void addLogger(String configuration, BeanDefinitionRegistry registry, String
loggerCategory) {
-            this.addComponent(ConsoleLogger.class, ProcessingUtil.LOGGER_ROLE, null, false,
registry);
+            this.addComponent(ConsoleLogger.class, AvalonUtils.LOGGER_ROLE, null, false,
registry);
         }
     }
 



Mime
View raw message