cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r345664 - in /cocoon/trunk/src/java/org/apache/cocoon/core: MutableSettings.java Settings.java
Date Sat, 19 Nov 2005 18:18:56 GMT
Author: reinhard
Date: Sat Nov 19 10:18:51 2005
New Revision: 345664

URL: http://svn.apache.org/viewcvs?rev=345664&view=rev
Log:
make settings properties available in Spring configuration files; update to latest Spring
1.2.6

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java
    cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java?rev=345664&r1=345663&r2=345664&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java Sat Nov 19 10:18:51
2005
@@ -941,12 +941,30 @@
      */
     public List getProperties(String keyPrefix) {
         final List props = new ArrayList();
-        for(int i=0; i<this.properties.size(); i++) {
+        for(int i=0; i < this.properties.size(); i++) {
             final Properties p = (Properties)this.properties.get(i);
             final Iterator kI = p.keySet().iterator();
             while ( kI.hasNext() ) {
                 final String name = (String)kI.next();
                 if ( name.startsWith(keyPrefix) && !props.contains(name) ) {
+                    props.add(name);
+                }
+            }
+        }
+        return props;
+    }
+    
+    /**
+     * @see org.apache.cocoon.core.Settings#getProperties()
+     */
+    public List getProperties() {
+        final List props = new ArrayList();
+        for(int i=0; i < this.properties.size(); i++) {
+            final Properties p = (Properties)this.properties.get(i);
+            final Iterator kI = p.keySet().iterator();
+            while ( kI.hasNext() ) {
+                final String name = (String)kI.next();
+                if (!props.contains(name) ) {
                     props.add(name);
                 }
             }

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java?rev=345664&r1=345663&r2=345664&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java Sat Nov 19 10:18:51 2005
@@ -48,4 +48,10 @@
      *         an empty list.
      */
     List getProperties(String keyPrefix);
+    
+    /**
+     * Return all available properties
+     * @return A list of all property names or an empty list.
+     */
+    List getProperties();
 }



Mime
View raw message