cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r124103 - /cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java /cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java /cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java
Date Tue, 04 Jan 2005 12:45:51 GMT
Author: cziegeler
Date: Tue Jan  4 04:45:47 2005
New Revision: 124103

URL: http://svn.apache.org/viewcvs?view=rev&rev=124103
Log:
Add property replacement
Modified:
   cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java
   cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java
   cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java

Modified: cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java?view=diff&rev=124103&p1=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java&r1=124102&p2=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java&r2=124103
==============================================================================
--- cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java
(original)
+++ cocoon/trunk/src/core/java/org/apache/cocoon/core/container/ConfigurationBuilder.java
Tue Jan  4 04:45:47 2005
@@ -27,6 +27,7 @@
 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.core.container.util.PropertyHelper;
 import org.xml.sax.Attributes;
 import org.xml.sax.EntityResolver;
 import org.xml.sax.ErrorHandler;
@@ -271,7 +272,7 @@
             } else {
                 finishedValue = accumulatedValue.trim();
             }
-            finishedConfiguration.setValue( finishedValue );
+            finishedConfiguration.setValue( PropertyHelper.replace(finishedValue) );
         } else {
             final String trimmedValue = accumulatedValue.trim();
             if( trimmedValue.length() > 0 ) {
@@ -338,8 +339,7 @@
         AttributesImpl componentAttr = new AttributesImpl();
 
         for( int i = 0; i < attributes.getLength(); i++ ) {
-            if( attributes.getQName( i ).startsWith( "xmlns" ) )
-            {
+            if( attributes.getQName( i ).startsWith( "xmlns" ) ) {
                 prefixes.add( attributes.getLocalName( i ) );
                 this.startPrefixMapping( attributes.getLocalName( i ),
                                          attributes.getValue( i ) );
@@ -367,7 +367,7 @@
         for( int i = 0; i < attributesSize; i++ ) {
             final String name = componentAttr.getQName( i );
             final String value = componentAttr.getValue( i );
-            configuration.setAttribute( name, value );
+            configuration.setAttribute( name, PropertyHelper.replace(value) );
         }
     }
 

Modified: cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java?view=diff&rev=124103&p1=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java&r1=124102&p2=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java&r2=124103
==============================================================================
--- cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java	(original)
+++ cocoon/trunk/src/core/java/org/apache/cocoon/core/container/RoleManager.java	Tue Jan 
4 04:45:47 2005
@@ -16,12 +16,8 @@
  */
 package org.apache.cocoon.core.container;
 
-import java.net.URL;
-import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;

Modified: cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java?view=diff&rev=124103&p1=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java&r1=124102&p2=cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java&r2=124103
==============================================================================
--- cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java	(original)
+++ cocoon/trunk/src/core/java/org/apache/cocoon/core/container/util/PropertyHelper.java	Tue
Jan  4 04:45:47 2005
@@ -22,14 +22,13 @@
  *
  * @version CVS $Id: AbstractComponentHandler.java 123887 2005-01-02 15:12:01Z sylvain $
  */
-
 public class PropertyHelper {
 
     /**
      * Replace all property references in the string with the current value
      * and return it.
      */
-    static String replace(String value) {
+    public static String replace(String value) {
         // quick test for null or no references
         if ( value == null || value.indexOf("${") == -1 ) {
             return value;

Mime
View raw message