cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r471476 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SitemapElementParser.java
Date Sun, 05 Nov 2006 17:52:24 GMT
Author: lgawron
Date: Sun Nov  5 09:52:23 2006
New Revision: 471476

URL: http://svn.apache.org/viewvc?view=rev&rev=471476
Log:
enable cocoon running modes for block/COB-INF/config/spring directory (and user specified)

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SitemapElementParser.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SitemapElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SitemapElementParser.java?view=diff&rev=471476&r1=471475&r2=471476
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SitemapElementParser.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SitemapElementParser.java
Sun Nov  5 09:52:23 2006
@@ -150,6 +150,7 @@
 
             if ( useDefaultIncludes ) {
                 this.handleBeanInclude(parserContext, null, Constants.DEFAULT_SITEMAP_SPRING_CONFIGURATION_LOCATION,
"*.xml", true);
+                this.handleBeanInclude(parserContext, null, Constants.DEFAULT_SITEMAP_SPRING_CONFIGURATION_LOCATION
+ "/" + runningMode, "*.xml", true);
             }
             // search for includes
             if ( componentsElement != null ) {
@@ -160,7 +161,14 @@
                         final String dir = DomHelper.getAttribute(includeElements[i], "dir",
null);
                         final String pattern = DomHelper.getAttribute(includeElements[i],
"pattern", "*.xml");
                         final boolean optional = DomHelper.getAttributeAsBoolean(includeElements[i],
"optional", false);
+
                         this.handleBeanInclude(parserContext, src, dir, pattern, optional);
+                        
+                        // TODO do we really need both src/dir attributes? The
+                        // quiet precedence of 'src' over 'dir' attribute is at
+                        // least unclear.
+                        if (src == null && dir != null)
+                            this.handleBeanInclude(parserContext, null, dir + "/" + runningMode,
pattern, optional);
                     }
                 }
             }



Mime
View raw message