cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r619026 - in /cocoon/whiteboard/micro/core: cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/parsing/ cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/c...
Date Wed, 06 Feb 2008 15:33:56 GMT
Author: gkossakowski
Date: Wed Feb  6 07:33:54 2008
New Revision: 619026

URL: http://svn.apache.org/viewvc?rev=619026&view=rev
Log:
Move declaration of StringTemplateParserVariableResolver and DefaultStringTemplateParser to
casual Spring configuration file.

Since we drop support for map:mount we don't need to create them dynamically in order to support
local components configuration in map:components.

Removed LegacyStringTemplate class because we don't need it anymore and switched to DefaultStringTemplateParser
as defulat string parser.

Added:
    cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/META-INF/cocoon/spring/cocoon-sitemap-expression.xml
      - copied, changed from r618996, cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml
Removed:
    cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/el/impl/parsing/LegacyStringTemplateParser.java
    cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/LegacyStringTemplateParser.xml
Modified:
    cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml
    cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java

Modified: cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml?rev=619026&r1=619025&r2=619026&view=diff
==============================================================================
--- cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml
(original)
+++ cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml
Wed Feb  6 07:33:54 2008
@@ -20,7 +20,7 @@
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
   
-  <bean name="org.apache.cocoon.el.parsing.StringTemplateParser/default" 
+  <bean name="org.apache.cocoon.el.parsing.StringTemplateParser/default org.apache.cocoon.el.parsing.StringTemplateParser"

         class="org.apache.cocoon.template.expression.DefaultStringTemplateParser"
         parent="org.apache.cocoon.template.expression.AbstractStringTemplateParser"/>
   

Modified: cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java?rev=619026&r1=619025&r2=619026&view=diff
==============================================================================
--- cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
(original)
+++ cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/SitemapElementParser.java
Wed Feb  6 07:33:54 2008
@@ -45,20 +45,6 @@
             BeanDefinitionRegistry registry, BeanDefinitionReader reader,
             ResourceLoader resourceLoader) throws Exception {
         super.createComponents(element, info, registry, reader, resourceLoader);
-        // add string template parser for sitemap variable substitution
-        final ChildBeanDefinition beanDef = new ChildBeanDefinition("org.apache.cocoon.template.expression.AbstractStringTemplateParser");
-        beanDef.setBeanClassName("org.apache.cocoon.template.expression.DefaultStringTemplateParser");
-        beanDef.setSingleton(true);
-        beanDef.setLazyInit(false);
-        this.register(beanDef, "org.apache.cocoon.el.parsing.StringTemplateParser", null,
registry);
-
-        final RootBeanDefinition resolverDef = new RootBeanDefinition();
-        resolverDef.setBeanClassName("org.apache.cocoon.components.treeprocessor.variables.StringTemplateParserVariableResolver");
-        resolverDef.setLazyInit(false);
-        resolverDef.setScope("prototype");
-        resolverDef.getPropertyValues().addPropertyValue("stringTemplateParser", new RuntimeBeanReference("org.apache.cocoon.el.parsing.StringTemplateParser"));
-        resolverDef.getPropertyValues().addPropertyValue("objectModel", new RuntimeBeanReference("org.apache.cocoon.el.objectmodel.ObjectModel"));
-        this.register(resolverDef, "org.apache.cocoon.components.treeprocessor.variables.VariableResolver",
null, registry);
     }
 
     /**

Copied: cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/META-INF/cocoon/spring/cocoon-sitemap-expression.xml
(from r618996, cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml)
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/META-INF/cocoon/spring/cocoon-sitemap-expression.xml?p2=cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/META-INF/cocoon/spring/cocoon-sitemap-expression.xml&p1=cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml&r1=618996&r2=619026&rev=619026&view=diff
==============================================================================
--- cocoon/whiteboard/micro/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/resources/META-INF/cocoon/spring/DefaultStringTemplateParser.xml
(original)
+++ cocoon/whiteboard/micro/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/resources/META-INF/cocoon/spring/cocoon-sitemap-expression.xml
Wed Feb  6 07:33:54 2008
@@ -6,9 +6,9 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,11 +17,16 @@
 -->
 <!-- SVN $Id$ -->
 <beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-  
-  <bean name="org.apache.cocoon.el.parsing.StringTemplateParser/default" 
-        class="org.apache.cocoon.template.expression.DefaultStringTemplateParser"
-        parent="org.apache.cocoon.template.expression.AbstractStringTemplateParser"/>
-  
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+  <bean name="org.apache.cocoon.el.parsing.StringTemplateParser" parent="org.apache.cocoon.template.expression.AbstractStringTemplateParser"

+        class="org.apache.cocoon.template.expression.DefaultStringTemplateParser"/>
+          
+  <bean name="org.apache.cocoon.components.treeprocessor.variables.VariableResolver" 
+        class="org.apache.cocoon.components.treeprocessor.variables.StringTemplateParserVariableResolver"
scope="prototype">
+    <property name="stringTemplateParser" ref="org.apache.cocoon.el.parsing.StringTemplateParser"/>
+    <property name="objectModel" ref="org.apache.cocoon.el.objectmodel.ObjectModel"/>
+  </bean>
+
 </beans>



Mime
View raw message