incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: incubator-ftpserver/src/java/org/apache/ftpserver/config PropertiesConfiguration.java XmlConfiguration.java
Date Thu, 06 Oct 2005 06:04:04 GMT
rana_b      2005/10/05 23:04:04

  Modified:    src/java/org/apache/ftpserver/config
                        PropertiesConfiguration.java XmlConfiguration.java
  Log:
  getKeys() method added
  
  Revision  Changes    Path
  1.2       +8 -2      incubator-ftpserver/src/java/org/apache/ftpserver/config/PropertiesConfiguration.java
  
  Index: PropertiesConfiguration.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/config/PropertiesConfiguration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertiesConfiguration.java	7 Sep 2005 05:05:57 -0000	1.1
  +++ PropertiesConfiguration.java	6 Oct 2005 06:04:04 -0000	1.2
  @@ -36,7 +36,6 @@
       
       private Properties m_prop;
       
  -    
       /**
        * Constructor - set the properties input stream.
        */
  @@ -236,4 +235,11 @@
           }
           return conf;
       }
  +    
  +    /**
  +     * Get the configuration keys.
  +     */
  +    public Enumeration getKeys() {
  +        return m_prop.propertyNames();
  +    }
   }
  
  
  
  1.2       +22 -4     incubator-ftpserver/src/java/org/apache/ftpserver/config/XmlConfiguration.java
  
  Index: XmlConfiguration.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/config/XmlConfiguration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XmlConfiguration.java	7 Sep 2005 05:05:57 -0000	1.1
  +++ XmlConfiguration.java	6 Oct 2005 06:04:04 -0000	1.2
  @@ -16,12 +16,14 @@
    */
   package org.apache.ftpserver.config;
   
  -import org.apache.ftpserver.ftplet.Configuration;
  -import org.apache.ftpserver.ftplet.FtpException;
  -
   import java.util.ArrayList;
  +import java.util.Collections;
  +import java.util.Enumeration;
   import java.util.Iterator;
   
  +import org.apache.ftpserver.ftplet.Configuration;
  +import org.apache.ftpserver.ftplet.FtpException;
  +
   /**
    * XML based configuration element.
    * 
  @@ -240,4 +242,20 @@
           }
           return config;
       }
  +    
  +    /**
  +     * Get the configuration keys.
  +     */
  +    public Enumeration getKeys() {
  +        
  +        // add configuration keys
  +        ArrayList keys = new ArrayList();
  +        if(m_children != null) {
  +            for(int i=0; i<m_children.size(); ++i) {
  +                XmlConfiguration child = (XmlConfiguration)m_children.get(i);
  +                keys.add(child.m_name);
  +            }
  +        }
  +        return Collections.enumeration(keys);
  +    }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message