This patch implements the getInitParameterNames method in MailetConfigImpl as 
required by the Mailet api contract.

regards
  Søren
-- 
Søren Hilmer, M.Sc.
R&D manager             Phone:  +45 70 27 64 00
TietoEnator IT+ A/S     Fax:    +45 70 27 64 40
Ved Lunden 12           Direct: +45 87 46 64 57
DK-8230 Åbyhøj          Email:  [EMAIL PROTECTED]
Index: src/java/org/apache/james/core/MailetConfigImpl.java
===================================================================
RCS file: /home/cvspublic/jakarta-james/src/java/org/apache/james/core/MailetConfigImpl.java,v
retrieving revision 1.8
diff -u -w -b -r1.8 MailetConfigImpl.java
--- src/java/org/apache/james/core/MailetConfigImpl.java	17 Jun 2003 16:03:14 -0000	1.8
+++ src/java/org/apache/james/core/MailetConfigImpl.java	24 Jun 2003 11:48:33 -0000
@@ -128,13 +128,28 @@
     }
 
     /**
-     * Returns an iterator over the set of configuration parameter names.
-     *
-     * @throws UnsupportedOperationException in all cases, as this is not implemented
+     * @return an iterator over the set of configuration parameter names.
      */
     public Iterator getInitParameterNames() {
-        throw new UnsupportedOperationException("Not yet implemented");
-        //return params.keySet().iterator();
+        return new Iterator () {
+                Configuration[] children;
+                int count = 0;
+                {
+                    children = configuration.getChildren();
+                }
+                
+                public boolean hasNext() {
+                    return count < children.length;
+                }
+
+                public Object next() {
+                    return children[count++].getName();
+                }
+                
+                public void remove() {
+                    throw new UnsupportedOperationException ("remove not supported");
+                }
+            };
     }
 
     /**

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to