cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r407762 - in /cocoon/trunk: blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/ core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/ core/cocoon-core/src/main/java/org/apache/cocoon/com...
Date Fri, 19 May 2006 10:10:28 GMT
Author: cziegeler
Date: Fri May 19 03:10:27 2006
New Revision: 407762

URL: http://svn.apache.org/viewvc?rev=407762&view=rev
Log:
Cleanup

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNodeBuilder.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/BeanFactoryFactoryImpl.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java?rev=407762&r1=407761&r2=407762&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
Fri May 19 03:10:27 2006
@@ -16,6 +16,7 @@
 package org.apache.cocoon.portal.impl;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -40,7 +41,6 @@
 import org.apache.cocoon.portal.layout.Layout;
 import org.apache.cocoon.portal.layout.LayoutFeatures;
 import org.apache.cocoon.portal.layout.NamedItem;
-import org.apache.cocoon.util.HashMap;
 
 /**
  * Manages the various activities required for page labels.

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNodeBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNodeBuilder.java?rev=407762&r1=407761&r2=407762&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNodeBuilder.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNodeBuilder.java
Fri May 19 03:10:27 2006
@@ -18,7 +18,7 @@
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.cocoon.util.StringUtils;
+import org.apache.commons.lang.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Arrays;

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?rev=407762&r1=407761&r2=407762&view=diff
==============================================================================
--- 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
Fri May 19 03:10:27 2006
@@ -76,10 +76,10 @@
 import org.apache.cocoon.sitemap.PatternException;
 import org.apache.cocoon.sitemap.SitemapParameters;
 import org.apache.cocoon.util.ClassUtils;
-import org.apache.cocoon.util.StringUtils;
 import org.apache.cocoon.util.location.Location;
 import org.apache.cocoon.util.location.LocationImpl;
 import org.apache.cocoon.util.location.LocationUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
 import org.apache.excalibur.source.TraversableSource;
@@ -217,9 +217,7 @@
         this.attributes.put(name, value);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
+    /**
      * @see org.apache.cocoon.components.treeprocessor.TreeBuilder#getAttribute(java.lang.String)
      */
     public Object getAttribute(String name) {
@@ -277,6 +275,9 @@
         return true;
     }
 
+    /**
+     * @see org.apache.cocoon.components.treeprocessor.TreeBuilder#getRegisteredNode(java.lang.String)
+     */
     public ProcessingNode getRegisteredNode(String name) {
         if (this.canGetNode) {
             return (ProcessingNode) this.registeredNodes.get(name);
@@ -284,6 +285,9 @@
         throw new IllegalArgumentException("Categories are only available during buildNode()");
     }
 
+    /**
+     * @see org.apache.cocoon.components.treeprocessor.TreeBuilder#createNodeBuilder(org.apache.avalon.framework.configuration.Configuration)
+     */
     public ProcessingNodeBuilder createNodeBuilder(Configuration config) throws Exception
{
         // FIXME : check namespace
         String nodeName = config.getName();

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java?rev=407762&r1=407761&r2=407762&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java
Fri May 19 03:10:27 2006
@@ -20,6 +20,7 @@
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.cocoon.ProcessingUtil;
 import org.apache.cocoon.components.ContextHelper;
+import org.apache.cocoon.components.classloader.ClassLoaderFactory;
 import org.apache.cocoon.core.Settings;
 import org.apache.cocoon.environment.Request;
 import org.apache.excalibur.source.SourceResolver;
@@ -44,6 +45,24 @@
             throw new BeanInitializationException("BeanFactory is not a configurable listable
bean factory: " + factory);
         }
         this.beanFactory = (ConfigurableListableBeanFactory)factory;
+    }
+
+    public ClassLoader createClassLoader(Context sitemapContext,
+                                            Configuration config)
+    throws Exception {
+        // we don't create a new class loader if there is no new configuration
+        if ( config == null ) {
+            return Thread.currentThread().getContextClassLoader();            
+        }
+        // get parent bean factory
+        BeanFactory parentFactory = getCurrentBeanFactory(sitemapContext);
+        final String factoryRole = config.getAttribute("factory-role",
+                ClassLoaderFactory.ROLE);
+
+        // Create a new classloader
+        ClassLoaderFactory clFactory = (ClassLoaderFactory)parentFactory.getBean(factoryRole);
+        return clFactory.createClassLoader(Thread.currentThread().getContextClassLoader(),
+                                           config);
     }
 
     /**



Mime
View raw message