org.apache.ftpserver.config
Class XmlConfiguration

java.lang.Object
  extended by org.apache.ftpserver.config.XmlConfiguration
All Implemented Interfaces:
Configuration

public class XmlConfiguration
extends java.lang.Object
implements Configuration

XML based configuration element.


Constructor Summary
XmlConfiguration(java.lang.String name)
          Create a new XmlConfiguration instance.
 
Method Summary
 boolean getBoolean(java.lang.String param)
          Get boolean - if not found throws FtpException.
 boolean getBoolean(java.lang.String param, boolean defaultVal)
          Get boolean - if not found returns the default value.
 double getDouble(java.lang.String param)
          Get double - if not found throws FtpException.
 double getDouble(java.lang.String param, double defaultVal)
          Get double - if not found returns the default value.
 int getInt(java.lang.String param)
          Get integer - if not found throws FtpException.
 int getInt(java.lang.String param, int defaultVal)
          Get integer - if not found returns the default value.
 java.util.Iterator<java.lang.String> getKeys()
          Get the configuration keys.
 long getLong(java.lang.String param)
          Get long - if not found throws FtpException.
 long getLong(java.lang.String param, long defaultVal)
          Get long - if not found returns the default value.
 java.lang.String getString(java.lang.String param)
          Get string - if not found throws FtpException.
 java.lang.String getString(java.lang.String param, java.lang.String defaultVal)
          Get string - if not found returns the default value.
 boolean isEmpty()
          Is empty?
 Configuration subset(java.lang.String param)
          Return the first XmlConfiguration object child of this associated with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlConfiguration

public XmlConfiguration(java.lang.String name)
Create a new XmlConfiguration instance.

Method Detail

isEmpty

public boolean isEmpty()
Is empty?

Specified by:
isEmpty in interface Configuration

getString

public java.lang.String getString(java.lang.String param)
                           throws FtpException
Get string - if not found throws FtpException.

Specified by:
getString in interface Configuration
Throws:
FtpException

getString

public java.lang.String getString(java.lang.String param,
                                  java.lang.String defaultVal)
Get string - if not found returns the default value.

Specified by:
getString in interface Configuration

getInt

public int getInt(java.lang.String param)
           throws FtpException
Get integer - if not found throws FtpException.

Specified by:
getInt in interface Configuration
Throws:
FtpException

getInt

public int getInt(java.lang.String param,
                  int defaultVal)
Get integer - if not found returns the default value.

Specified by:
getInt in interface Configuration

getLong

public long getLong(java.lang.String param)
             throws FtpException
Get long - if not found throws FtpException.

Specified by:
getLong in interface Configuration
Throws:
FtpException

getLong

public long getLong(java.lang.String param,
                    long defaultVal)
Get long - if not found returns the default value.

Specified by:
getLong in interface Configuration

getBoolean

public boolean getBoolean(java.lang.String param)
                   throws FtpException
Get boolean - if not found throws FtpException.

Specified by:
getBoolean in interface Configuration
Throws:
FtpException

getBoolean

public boolean getBoolean(java.lang.String param,
                          boolean defaultVal)
Get boolean - if not found returns the default value.

Specified by:
getBoolean in interface Configuration

getDouble

public double getDouble(java.lang.String param)
                 throws FtpException
Get double - if not found throws FtpException.

Specified by:
getDouble in interface Configuration
Throws:
FtpException

getDouble

public double getDouble(java.lang.String param,
                        double defaultVal)
Get double - if not found returns the default value.

Specified by:
getDouble in interface Configuration

subset

public Configuration subset(java.lang.String param)
Return the first XmlConfiguration object child of this associated with the given name.

Specified by:
subset in interface Configuration

getKeys

public java.util.Iterator<java.lang.String> getKeys()
Get the configuration keys.

Specified by:
getKeys in interface Configuration


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.