velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r692337 - in /velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config: CompoundConfiguration.java Configuration.java FactoryConfiguration.java ToolboxConfiguration.java
Date Fri, 05 Sep 2008 05:10:09 GMT
Author: nbubna
Date: Thu Sep  4 22:10:08 2008
New Revision: 692337

URL: http://svn.apache.org/viewvc?rev=692337&view=rev
Log:
be more spring-xml-config-friendly

Modified:
    velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/CompoundConfiguration.java
    velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/Configuration.java
    velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java
    velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java

Modified: velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/CompoundConfiguration.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/CompoundConfiguration.java?rev=692337&r1=692336&r2=692337&view=diff
==============================================================================
--- velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/CompoundConfiguration.java
(original)
+++ velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/CompoundConfiguration.java
Thu Sep  4 22:10:08 2008
@@ -71,7 +71,7 @@
         return !children.isEmpty();
     }
 
-    protected SortedSet<C> getChildren()
+    protected Collection<C> getChildren()
     {
         return children;
     }

Modified: velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/Configuration.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/Configuration.java?rev=692337&r1=692336&r2=692337&view=diff
==============================================================================
--- velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/Configuration.java
(original)
+++ velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/Configuration.java
Thu Sep  4 22:10:08 2008
@@ -110,6 +110,14 @@
         return map;
     }
 
+    public void setPropertyMap(Map<String,Object> props)
+    {
+        for (Map.Entry<String,Object> entry : props.entrySet())
+        {
+            setProperty(entry.getKey(), entry.getValue());
+        }
+    }
+
     public void setProperties(Collection<Property> props)
     {
         for (Property newProp : props)

Modified: velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java?rev=692337&r1=692336&r2=692337&view=diff
==============================================================================
--- velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java
(original)
+++ velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java
Thu Sep  4 22:10:08 2008
@@ -91,6 +91,23 @@
     }
 
     /**
+     * Returns the original source of this particular instance.
+     */
+    public String getSource()
+    {
+        return this.sources.get(0);
+    }
+
+    /**
+     * Sets the name of the original source of this particular instance.
+     * This does not affect subsequently added sources.
+     */
+    public void setSource(String source)
+    {
+        this.sources.set(0, source);
+    }
+
+    /**
      * Returns the list of sources for this configuration info in
      * order starting from the source name given to this instance
      * (if any) and going to the most recently added source.
@@ -184,7 +201,7 @@
         return null;
     }
 
-    public SortedSet<ToolboxConfiguration> getToolboxes()
+    public Collection<ToolboxConfiguration> getToolboxes()
     {
         return getChildren();
     }

Modified: velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java?rev=692337&r1=692336&r2=692337&view=diff
==============================================================================
--- velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java
(original)
+++ velocity/tools/trunk/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java
Thu Sep  4 22:10:08 2008
@@ -92,7 +92,7 @@
         return null;
     }
 
-    public SortedSet<ToolConfiguration> getTools()
+    public Collection<ToolConfiguration> getTools()
     {
         return getChildren();
     }



Mime
View raw message