commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From germu...@apache.org
Subject svn commit: r315059 - /jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/impl/CatalogBase.java
Date Wed, 12 Oct 2005 21:52:39 GMT
Author: germuska
Date: Wed Oct 12 14:52:37 2005
New Revision: 315059

URL: http://svn.apache.org/viewcvs?rev=315059&view=rev
Log:
add constructor which takes an already built map of commands, for easier use in dependency-injection
environments

Modified:
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/impl/CatalogBase.java

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/impl/CatalogBase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/impl/CatalogBase.java?rev=315059&r1=315058&r2=315059&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/impl/CatalogBase.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/impl/CatalogBase.java
Wed Oct 12 14:52:37 2005
@@ -47,6 +47,20 @@
     protected Map commands = Collections.synchronizedMap(new HashMap());
 
 
+    // --------------------------------------------------------- Constructors
+
+    public CatalogBase() { }
+
+    /**
+     * <p>Create a catalog whose commands are those specified in the given <code>Map</code>.
+     * All Map keys should be <code>String</code> and all values should be <code>Command</code>.</p>
+     *  
+     * @param commands
+     */
+    public CatalogBase( Map commands ) {
+        this.commands = Collections.synchronizedMap(commands);
+    }
+    
     // --------------------------------------------------------- Public Methods
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message