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/ftplet Configuration.java EmptyConfiguration.java
Date Thu, 06 Oct 2005 06:05:13 GMT
rana_b      2005/10/05 23:05:13

  Modified:    src/java/org/apache/ftpserver/ftplet Configuration.java
                        EmptyConfiguration.java
  Log:
  getKeys() method added
  
  Revision  Changes    Path
  1.2       +8 -1      incubator-ftpserver/src/java/org/apache/ftpserver/ftplet/Configuration.java
  
  Index: Configuration.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/ftplet/Configuration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Configuration.java	7 Sep 2005 05:05:17 -0000	1.1
  +++ Configuration.java	6 Oct 2005 06:05:13 -0000	1.2
  @@ -16,6 +16,8 @@
    */
   package org.apache.ftpserver.ftplet;
   
  +import java.util.Enumeration;
  +
   /**
    * Configuration interface. 
    * 
  @@ -83,4 +85,9 @@
        * Get sub configuration - if not found returns the default value.
        */
       Configuration getConfiguration(String param, Configuration defaultVal);
  +    
  +    /**
  +     * Get the configuration keys.
  +     */
  +    Enumeration getKeys();
   }
  
  
  
  1.2       +21 -1     incubator-ftpserver/src/java/org/apache/ftpserver/ftplet/EmptyConfiguration.java
  
  Index: EmptyConfiguration.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/ftplet/EmptyConfiguration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EmptyConfiguration.java	7 Sep 2005 05:05:17 -0000	1.1
  +++ EmptyConfiguration.java	6 Oct 2005 06:05:13 -0000	1.2
  @@ -16,6 +16,10 @@
    */
   package org.apache.ftpserver.ftplet;
   
  +import java.util.ArrayList;
  +import java.util.Collections;
  +import java.util.Enumeration;
  +
   /**
    * Empty configuration - always returns the default values.
    * 
  @@ -24,6 +28,14 @@
   public 
   class EmptyConfiguration implements Configuration {
   
  +    public final static EmptyConfiguration INSTANCE = new EmptyConfiguration();
  +    
  +    /**
  +     * Private constructor - use INSTANCE static variable.
  +     */
  +    private EmptyConfiguration() {
  +    }
  +    
       /**
        * Throw exception.
        */
  @@ -107,4 +119,12 @@
       public Configuration getConfiguration(String param, Configuration defaultVal) {
           return defaultVal;
       }
  +    
  +    /**
  +     * Get the property keys.
  +     */
  +    public Enumeration getKeys() {
  +        ArrayList empty = new ArrayList(2);
  +        return Collections.enumeration(empty);
  +    }
   }
  
  
  

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


Mime
View raw message