| org.apache.commons.configuration.AbstractConfiguration org.apache.commons.configuration.DataConfiguration
DataConfiguration | public class DataConfiguration extends AbstractConfiguration implements Serializable(Code) | | Decorator providing additional getters for any Configuration. This extended
Configuration supports more types: URL, Locale, Date, Calendar, Color, as
well as lists and arrays for all types.
Let us know if you find this useful, the most frequently used getters
are likely to be integrated in the Configuration interface in a future
version.
author: Emmanuel Bourg version: $Revision: 439648 $, $Date: 2006-09-02 22:42:10 +0200 (Sa, 02 Sep 2006) $ since: 1.1 |
Constructor Summary | |
public | DataConfiguration(Configuration configuration) Creates a new instance of DataConfiguration and sets the
wrapped configuration. |
Method Summary | |
protected void | addPropertyDirect(String key, Object obj) | public void | clearProperty(String key) | public boolean | containsKey(String key) | public BigDecimal[] | getBigDecimalArray(String key) Get an array of BigDecimals associated with the given
configuration key. | public BigDecimal[] | getBigDecimalArray(String key, BigDecimal[] defaultValue) Get an array of BigDecimals associated with the given
configuration key. | public List | getBigDecimalList(String key) Get a list of BigDecimals associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getBigDecimalList(String key, List defaultValue) Get a list of BigDecimals associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public BigInteger[] | getBigIntegerArray(String key) Get an array of BigIntegers associated with the given
configuration key. | public BigInteger[] | getBigIntegerArray(String key, BigInteger[] defaultValue) Get an array of BigIntegers associated with the given
configuration key. | public List | getBigIntegerList(String key) Get a list of BigIntegers associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getBigIntegerList(String key, List defaultValue) Get a list of BigIntegers associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public boolean[] | getBooleanArray(String key) Get an array of boolean primitives associated with the given
configuration key. | public boolean[] | getBooleanArray(String key, boolean[] defaultValue) Get an array of boolean primitives associated with the given
configuration key. | public List | getBooleanList(String key) Get a list of Boolean objects associated with the given
configuration key. | public List | getBooleanList(String key, List defaultValue) Get a list of Boolean objects associated with the given
configuration key. | public byte[] | getByteArray(String key) Get an array of byte primitives associated with the given
configuration key. | public byte[] | getByteArray(String key, byte[] defaultValue) Get an array of byte primitives associated with the given
configuration key. | public List | getByteList(String key) Get a list of Byte objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getByteList(String key, List defaultValue) Get a list of Byte objects associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public Calendar | getCalendar(String key) Get a Calendar associated with the given configuration key. | public Calendar | getCalendar(String key, String format) Get a Calendar associated with the given configuration key. | public Calendar | getCalendar(String key, Calendar defaultValue) Get a Calendar associated with the given configuration key. | public Calendar | getCalendar(String key, Calendar defaultValue, String format) Get a Calendar associated with the given configuration key. | public Calendar[] | getCalendarArray(String key) Get an array of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. | public Calendar[] | getCalendarArray(String key, String format) Get an array of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public Calendar[] | getCalendarArray(String key, Calendar[] defaultValue) Get an array of Calendars associated with the given configuration key. | public Calendar[] | getCalendarArray(String key, Calendar[] defaultValue, String format) Get an array of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public List | getCalendarList(String key) Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getCalendarList(String key, String format) Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public List | getCalendarList(String key, List defaultValue) Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public List | getCalendarList(String key, List defaultValue, String format) Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public Color | getColor(String key) Get a Color associated with the given configuration key.
Parameters: key - The configuration key. | public Color | getColor(String key, Color defaultValue) Get a Color associated with the given configuration key.
If the key doesn't map to an existing object, the default value
is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public Color[] | getColorArray(String key) Get an array of Colors associated with the given
configuration key. | public Color[] | getColorArray(String key, Color[] defaultValue) Get an array of Colors associated with the given
configuration key. | public List | getColorList(String key) Get a list of Colors associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getColorList(String key, List defaultValue) Get a list of Colors associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public Configuration | getConfiguration() Return the configuration decorated by this DataConfiguration. | public Date | getDate(String key) Get a Date associated with the given configuration key. | public Date | getDate(String key, String format) Get a Date associated with the given configuration key. | public Date | getDate(String key, Date defaultValue) Get a Date associated with the given configuration key. | public Date | getDate(String key, Date defaultValue, String format) Get a Date associated with the given configuration key. | public Date[] | getDateArray(String key) Get an array of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. | public Date[] | getDateArray(String key, String format) Get an array of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public Date[] | getDateArray(String key, Date[] defaultValue) Get an array of Dates associated with the given configuration key. | public Date[] | getDateArray(String key, Date[] defaultValue, String format) Get an array of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public List | getDateList(String key) Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getDateList(String key, String format) Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public List | getDateList(String key, List defaultValue) Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public List | getDateList(String key, List defaultValue, String format) Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. | public double[] | getDoubleArray(String key) Get an array of double primitives associated with the given
configuration key. | public double[] | getDoubleArray(String key, double[] defaultValue) Get an array of double primitives associated with the given
configuration key. | public List | getDoubleList(String key) Get a list of Double objects associated with the given
configuration key. | public List | getDoubleList(String key, List defaultValue) Get a list of Double objects associated with the given
configuration key. | public float[] | getFloatArray(String key) Get an array of float primitives associated with the given
configuration key. | public float[] | getFloatArray(String key, float[] defaultValue) Get an array of float primitives associated with the given
configuration key. | public List | getFloatList(String key) Get a list of Float objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getFloatList(String key, List defaultValue) Get a list of Float objects associated with the given
configuration key. | public int[] | getIntArray(String key) Get an array of int primitives associated with the given
configuration key. | public int[] | getIntArray(String key, int[] defaultValue) Get an array of int primitives associated with the given
configuration key. | public List | getIntegerList(String key) Get a list of Integer objects associated with the given
configuration key. | public List | getIntegerList(String key, List defaultValue) Get a list of Integer objects associated with the given
configuration key. | public Iterator | getKeys() | public Locale | getLocale(String key) Get a Locale associated with the given configuration key.
Parameters: key - The configuration key. | public Locale | getLocale(String key, Locale defaultValue) Get a Locale associated with the given configuration key.
If the key doesn't map to an existing object, the default value
is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public Locale[] | getLocaleArray(String key) Get an array of Locales associated with the given
configuration key. | public Locale[] | getLocaleArray(String key, Locale[] defaultValue) Get an array of Locales associated with the given
configuration key. | public List | getLocaleList(String key) Get a list of Locales associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getLocaleList(String key, List defaultValue) Get a list of Locales associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public long[] | getLongArray(String key) Get an array of long primitives associated with the given
configuration key. | public long[] | getLongArray(String key, long[] defaultValue) Get an array of long primitives associated with the given
configuration key. | public List | getLongList(String key) Get a list of Long objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getLongList(String key, List defaultValue) Get a list of Long objects associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public Object | getProperty(String key) | public short[] | getShortArray(String key) Get an array of short primitives associated with the given
configuration key. | public short[] | getShortArray(String key, short[] defaultValue) Get an array of short primitives associated with the given
configuration key. | public List | getShortList(String key) Get a list of Short objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getShortList(String key, List defaultValue) Get a list of Short objects associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public URL | getURL(String key) Get an URL associated with the given configuration key.
Parameters: key - The configuration key. | public URL | getURL(String key, URL defaultValue) Get an URL associated with the given configuration key.
If the key doesn't map to an existing object, the default value
is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public URL[] | getURLArray(String key) Get an array of URLs associated with the given configuration key.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. | public URL[] | getURLArray(String key, URL[] defaultValue) Get an array of URLs associated with the given configuration key. | public List | getURLList(String key) Get a list of URLs associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. | public List | getURLList(String key, List defaultValue) Get a list of URLs associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. | public boolean | isEmpty() |
DATE_FORMAT_KEY | final public static String DATE_FORMAT_KEY(Code) | | The key of the property storing the user defined date format.
|
DEFAULT_DATE_FORMAT | final public static String DEFAULT_DATE_FORMAT(Code) | | The default format for dates.
|
DataConfiguration | public DataConfiguration(Configuration configuration)(Code) | | Creates a new instance of DataConfiguration and sets the
wrapped configuration.
Parameters: configuration - the wrapped configuration |
getBigDecimalArray | public BigDecimal[] getBigDecimalArray(String key)(Code) | | Get an array of BigDecimals associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated BigDecimal array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigDecimals. |
getBigDecimalArray | public BigDecimal[] getBigDecimalArray(String key, BigDecimal[] defaultValue)(Code) | | Get an array of BigDecimals associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated BigDecimal array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigDecimals. |
getBigDecimalList | public List getBigDecimalList(String key)(Code) | | Get a list of BigDecimals associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated BigDecimal list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigDecimals. |
getBigDecimalList | public List getBigDecimalList(String key, List defaultValue)(Code) | | Get a list of BigDecimals associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of BigDecimals. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigDecimals. |
getBigIntegerArray | public BigInteger[] getBigIntegerArray(String key)(Code) | | Get an array of BigIntegers associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated BigInteger array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigIntegers. |
getBigIntegerArray | public BigInteger[] getBigIntegerArray(String key, BigInteger[] defaultValue)(Code) | | Get an array of BigIntegers associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated BigInteger array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigIntegers. |
getBigIntegerList | public List getBigIntegerList(String key)(Code) | | Get a list of BigIntegers associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated BigInteger list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigIntegers. |
getBigIntegerList | public List getBigIntegerList(String key, List defaultValue)(Code) | | Get a list of BigIntegers associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of BigIntegers. throws: ConversionException - is thrown if the key maps to anobject that is not a list of BigIntegers. |
getBooleanArray | public boolean[] getBooleanArray(String key)(Code) | | Get an array of boolean primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated boolean array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of booleans. |
getBooleanArray | public boolean[] getBooleanArray(String key, boolean[] defaultValue)(Code) | | Get an array of boolean primitives associated with the given
configuration key. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated boolean array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of booleans. |
getBooleanList | public List getBooleanList(String key)(Code) | | Get a list of Boolean objects associated with the given
configuration key. If the key doesn't map to an existing object
an empty list is returned.
Parameters: key - The configuration key. The associated Boolean list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of booleans. |
getBooleanList | public List getBooleanList(String key, List defaultValue)(Code) | | Get a list of Boolean objects associated with the given
configuration key. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of strings. throws: ConversionException - is thrown if the key maps to anobject that is not a list of booleans. |
getByteArray | public byte[] getByteArray(String key)(Code) | | Get an array of byte primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated byte array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of bytes. |
getByteArray | public byte[] getByteArray(String key, byte[] defaultValue)(Code) | | Get an array of byte primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated byte array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of bytes. |
getByteList | public List getByteList(String key)(Code) | | Get a list of Byte objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Byte list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of bytes. |
getByteList | public List getByteList(String key, List defaultValue)(Code) | | Get a list of Byte objects associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Bytes. throws: ConversionException - is thrown if the key maps to anobject that is not a list of bytes. |
getCalendar | public Calendar getCalendar(String key, String format)(Code) | | Get a Calendar associated with the given configuration key. If the
property is a String, it will be parsed with the specified format
pattern.
Parameters: key - The configuration key. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Calendar throws: ConversionException - is thrown if the key maps to anobject that is not a Calendar. |
getCalendar | public Calendar getCalendar(String key, Calendar defaultValue)(Code) | | Get a Calendar associated with the given configuration key. If the
property is a String, it will be parsed with the format defined by the
user in the
DataConfiguration.DATE_FORMAT_KEY property, or if it's not defined
with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern. If the key doesn't map
to an existing object, the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated Calendar. throws: ConversionException - is thrown if the key maps to anobject that is not a Calendar. |
getCalendar | public Calendar getCalendar(String key, Calendar defaultValue, String format)(Code) | | Get a Calendar associated with the given configuration key. If the
property is a String, it will be parsed with the specified format
pattern. If the key doesn't map to an existing object, the default
value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Calendar. throws: ConversionException - is thrown if the key maps to anobject that is not a Calendar. |
getCalendarArray | public Calendar[] getCalendarArray(String key)(Code) | | Get an array of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. The associated Calendar array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getCalendarArray | public Calendar[] getCalendarArray(String key, String format)(Code) | | Get an array of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Calendar array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getCalendarArray | public Calendar[] getCalendarArray(String key, Calendar[] defaultValue)(Code) | | Get an array of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated Calendar array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getCalendarArray | public Calendar[] getCalendarArray(String key, Calendar[] defaultValue, String format)(Code) | | Get an array of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Calendar array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getCalendarList | public List getCalendarList(String key)(Code) | | Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Calendar list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getCalendarList | public List getCalendarList(String key, String format)(Code) | | Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object
an empty list is returned.
Parameters: key - The configuration key. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Calendar list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getCalendarList | public List getCalendarList(String key, List defaultValue)(Code) | | Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated Calendar list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getCalendarList | public List getCalendarList(String key, List defaultValue, String format)(Code) | | Get a list of Calendars associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Calendar list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Calendars. |
getColor | public Color getColor(String key)(Code) | | Get a Color associated with the given configuration key.
Parameters: key - The configuration key. The associated Color. throws: ConversionException - is thrown if the key maps to anobject that is not a Color. |
getColor | public Color getColor(String key, Color defaultValue)(Code) | | Get a Color associated with the given configuration key.
If the key doesn't map to an existing object, the default value
is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated Color. throws: ConversionException - is thrown if the key maps to anobject that is not a Color. |
getColorArray | public Color[] getColorArray(String key)(Code) | | Get an array of Colors associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated Color array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Colors. |
getColorArray | public Color[] getColorArray(String key, Color[] defaultValue)(Code) | | Get an array of Colors associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated Color array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Colors. |
getColorList | public List getColorList(String key)(Code) | | Get a list of Colors associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Color list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Colors. |
getColorList | public List getColorList(String key, List defaultValue)(Code) | | Get a list of Colors associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Colors. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Colors. |
getConfiguration | public Configuration getConfiguration()(Code) | | Return the configuration decorated by this DataConfiguration.
the wrapped configuration |
getDate | public Date getDate(String key, String format)(Code) | | Get a Date associated with the given configuration key. If the property
is a String, it will be parsed with the specified format pattern.
Parameters: key - The configuration key. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Date throws: ConversionException - is thrown if the key maps to anobject that is not a Date. |
getDate | public Date getDate(String key, Date defaultValue)(Code) | | Get a Date associated with the given configuration key. If the property
is a String, it will be parsed with the format defined by the user in
the
DataConfiguration.DATE_FORMAT_KEY property, or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an
existing object, the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated Date. throws: ConversionException - is thrown if the key maps to anobject that is not a Date. |
getDate | public Date getDate(String key, Date defaultValue, String format)(Code) | | Get a Date associated with the given configuration key. If the property
is a String, it will be parsed with the specified format pattern.
If the key doesn't map to an existing object, the default value
is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Date. throws: ConversionException - is thrown if the key maps to anobject that is not a Date. |
getDateArray | public Date[] getDateArray(String key)(Code) | | Get an array of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. The associated Date array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDateArray | public Date[] getDateArray(String key, String format)(Code) | | Get an array of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Date array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDateArray | public Date[] getDateArray(String key, Date[] defaultValue)(Code) | | Get an array of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated Date array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDateArray | public Date[] getDateArray(String key, Date[] defaultValue, String format)(Code) | | Get an array of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Date array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDateList | public List getDateList(String key)(Code) | | Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Date list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDateList | public List getDateList(String key, String format)(Code) | | Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object
an empty list is returned.
Parameters: key - The configuration key. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Date list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDateList | public List getDateList(String key, List defaultValue)(Code) | | Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
format defined by the user in the
DataConfiguration.DATE_FORMAT_KEY property,
or if it's not defined with the
DataConfiguration.DEFAULT_DATE_FORMAT pattern.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated Date list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDateList | public List getDateList(String key, List defaultValue, String format)(Code) | | Get a list of Dates associated with the given configuration key.
If the property is a list of Strings, they will be parsed with the
specified format pattern. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. Parameters: format - The non-localized java.text.DateFormat pattern. The associated Date list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Dates. |
getDoubleArray | public double[] getDoubleArray(String key)(Code) | | Get an array of double primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated double array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of doubles. |
getDoubleArray | public double[] getDoubleArray(String key, double[] defaultValue)(Code) | | Get an array of double primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated double array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of doubles. |
getDoubleList | public List getDoubleList(String key)(Code) | | Get a list of Double objects associated with the given
configuration key. If the key doesn't map to an existing object
an empty list is returned.
Parameters: key - The configuration key. The associated Double list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of doubles. |
getDoubleList | public List getDoubleList(String key, List defaultValue)(Code) | | Get a list of Double objects associated with the given
configuration key. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Doubles. throws: ConversionException - is thrown if the key maps to anobject that is not a list of doubles. |
getFloatArray | public float[] getFloatArray(String key)(Code) | | Get an array of float primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated float array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of floats. |
getFloatArray | public float[] getFloatArray(String key, float[] defaultValue)(Code) | | Get an array of float primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated float array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of floats. |
getFloatList | public List getFloatList(String key)(Code) | | Get a list of Float objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Float list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of floats. |
getFloatList | public List getFloatList(String key, List defaultValue)(Code) | | Get a list of Float objects associated with the given
configuration key. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Floats. throws: ConversionException - is thrown if the key maps to anobject that is not a list of floats. |
getIntArray | public int[] getIntArray(String key)(Code) | | Get an array of int primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated int array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of integers. |
getIntArray | public int[] getIntArray(String key, int[] defaultValue)(Code) | | Get an array of int primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated int array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of integers. |
getIntegerList | public List getIntegerList(String key)(Code) | | Get a list of Integer objects associated with the given
configuration key. If the key doesn't map to an existing object
an empty list is returned.
Parameters: key - The configuration key. The associated Integer list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of integers. |
getIntegerList | public List getIntegerList(String key, List defaultValue)(Code) | | Get a list of Integer objects associated with the given
configuration key. If the key doesn't map to an existing object,
the default value is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Integers. throws: ConversionException - is thrown if the key maps to anobject that is not a list of integers. |
getLocale | public Locale getLocale(String key)(Code) | | Get a Locale associated with the given configuration key.
Parameters: key - The configuration key. The associated Locale. throws: ConversionException - is thrown if the key maps to anobject that is not a Locale. |
getLocale | public Locale getLocale(String key, Locale defaultValue)(Code) | | Get a Locale associated with the given configuration key.
If the key doesn't map to an existing object, the default value
is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated Locale. throws: ConversionException - is thrown if the key maps to anobject that is not a Locale. |
getLocaleArray | public Locale[] getLocaleArray(String key)(Code) | | Get an array of Locales associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated Locale array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Locales. |
getLocaleArray | public Locale[] getLocaleArray(String key, Locale[] defaultValue)(Code) | | Get an array of Locales associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated Locale array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Locales. |
getLocaleList | public List getLocaleList(String key)(Code) | | Get a list of Locales associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Locale list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Locales. |
getLocaleList | public List getLocaleList(String key, List defaultValue)(Code) | | Get a list of Locales associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Locales. throws: ConversionException - is thrown if the key maps to anobject that is not a list of Locales. |
getLongArray | public long[] getLongArray(String key)(Code) | | Get an array of long primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated long array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of longs. |
getLongArray | public long[] getLongArray(String key, long[] defaultValue)(Code) | | Get an array of long primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated long array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of longs. |
getLongList | public List getLongList(String key)(Code) | | Get a list of Long objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Long list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of longs. |
getLongList | public List getLongList(String key, List defaultValue)(Code) | | Get a list of Long objects associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Longs. throws: ConversionException - is thrown if the key maps to anobject that is not a list of longs. |
getShortArray | public short[] getShortArray(String key)(Code) | | Get an array of short primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. The associated short array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of shorts. |
getShortArray | public short[] getShortArray(String key, short[] defaultValue)(Code) | | Get an array of short primitives associated with the given
configuration key. If the key doesn't map to an existing object
an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated short array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of shorts. |
getShortList | public List getShortList(String key)(Code) | | Get a list of Short objects associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated Short list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of shorts. |
getShortList | public List getShortList(String key, List defaultValue)(Code) | | Get a list of Short objects associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of Shorts. throws: ConversionException - is thrown if the key maps to anobject that is not a list of shorts. |
getURL | public URL getURL(String key)(Code) | | Get an URL associated with the given configuration key.
Parameters: key - The configuration key. The associated URL. throws: ConversionException - is thrown if the key maps to anobject that is not an URL. |
getURL | public URL getURL(String key, URL defaultValue)(Code) | | Get an URL associated with the given configuration key.
If the key doesn't map to an existing object, the default value
is returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated URL. throws: ConversionException - is thrown if the key maps to anobject that is not an URL. |
getURLArray | public URL[] getURLArray(String key)(Code) | | Get an array of URLs associated with the given configuration key.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. The associated URL array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of URLs. |
getURLArray | public URL[] getURLArray(String key, URL[] defaultValue)(Code) | | Get an array of URLs associated with the given configuration key.
If the key doesn't map to an existing object an empty array is returned.
Parameters: key - The configuration key. Parameters: defaultValue - the default value, which will be returned if the property is not found The associated URL array if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of URLs. |
getURLList | public List getURLList(String key)(Code) | | Get a list of URLs associated with the given configuration key.
If the key doesn't map to an existing object an empty list is returned.
Parameters: key - The configuration key. The associated URL list if the key is found. throws: ConversionException - is thrown if the key maps to anobject that is not a list of URLs. |
getURLList | public List getURLList(String key, List defaultValue)(Code) | | Get a list of URLs associated with the given configuration key.
If the key doesn't map to an existing object, the default value is
returned.
Parameters: key - The configuration key. Parameters: defaultValue - The default value. The associated List of URLs. throws: ConversionException - is thrown if the key maps to anobject that is not a list of URLs. |
isEmpty | public boolean isEmpty()(Code) | | |
Methods inherited from org.apache.commons.configuration.AbstractConfiguration | public void addErrorLogListener()(Code)(Java Doc) public void addProperty(String key, Object value)(Code)(Java Doc) abstract protected void addPropertyDirect(String key, Object value)(Code)(Java Doc) public void clear()(Code)(Java Doc) public void clearProperty(String key)(Code)(Java Doc) protected void clearPropertyDirect(String key)(Code)(Java Doc) abstract public boolean containsKey(String key)(Code)(Java Doc) protected ConfigurationInterpolator createInterpolator()(Code)(Java Doc) public BigDecimal getBigDecimal(String key)(Code)(Java Doc) public BigDecimal getBigDecimal(String key, BigDecimal defaultValue)(Code)(Java Doc) public BigInteger getBigInteger(String key)(Code)(Java Doc) public BigInteger getBigInteger(String key, BigInteger defaultValue)(Code)(Java Doc) public boolean getBoolean(String key)(Code)(Java Doc) public boolean getBoolean(String key, boolean defaultValue)(Code)(Java Doc) public Boolean getBoolean(String key, Boolean defaultValue)(Code)(Java Doc) public byte getByte(String key)(Code)(Java Doc) public byte getByte(String key, byte defaultValue)(Code)(Java Doc) public Byte getByte(String key, Byte defaultValue)(Code)(Java Doc) public static char getDefaultListDelimiter()(Code)(Java Doc) public static char getDelimiter()(Code)(Java Doc) public double getDouble(String key)(Code)(Java Doc) public double getDouble(String key, double defaultValue)(Code)(Java Doc) public Double getDouble(String key, Double defaultValue)(Code)(Java Doc) public float getFloat(String key)(Code)(Java Doc) public float getFloat(String key, float defaultValue)(Code)(Java Doc) public Float getFloat(String key, Float defaultValue)(Code)(Java Doc) public int getInt(String key)(Code)(Java Doc) public int getInt(String key, int defaultValue)(Code)(Java Doc) public Integer getInteger(String key, Integer defaultValue)(Code)(Java Doc) public ConfigurationInterpolator getInterpolator()(Code)(Java Doc) abstract public Iterator getKeys()(Code)(Java Doc) public Iterator getKeys(String prefix)(Code)(Java Doc) public List getList(String key)(Code)(Java Doc) public List getList(String key, List defaultValue)(Code)(Java Doc) public char getListDelimiter()(Code)(Java Doc) public Log getLogger()(Code)(Java Doc) public long getLong(String key)(Code)(Java Doc) public long getLong(String key, long defaultValue)(Code)(Java Doc) public Long getLong(String key, Long defaultValue)(Code)(Java Doc) public Properties getProperties(String key)(Code)(Java Doc) public Properties getProperties(String key, Properties defaults)(Code)(Java Doc) public short getShort(String key)(Code)(Java Doc) public short getShort(String key, short defaultValue)(Code)(Java Doc) public Short getShort(String key, Short defaultValue)(Code)(Java Doc) public String getString(String key)(Code)(Java Doc) public String getString(String key, String defaultValue)(Code)(Java Doc) public String[] getStringArray(String key)(Code)(Java Doc) public synchronized StrSubstitutor getSubstitutor()(Code)(Java Doc) protected String interpolate(String base)(Code)(Java Doc) protected Object interpolate(Object value)(Code)(Java Doc) protected String interpolateHelper(String base, List priorVariables)(Code)(Java Doc) public boolean isDelimiterParsingDisabled()(Code)(Java Doc) abstract public boolean isEmpty()(Code)(Java Doc) public boolean isThrowExceptionOnMissing()(Code)(Java Doc) protected Object resolveContainerStore(String key)(Code)(Java Doc) public static void setDefaultListDelimiter(char delimiter)(Code)(Java Doc) public static void setDelimiter(char delimiter)(Code)(Java Doc) public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled)(Code)(Java Doc) public void setListDelimiter(char listDelimiter)(Code)(Java Doc) public void setLogger(Log log)(Code)(Java Doc) public void setProperty(String key, Object value)(Code)(Java Doc) public void setThrowExceptionOnMissing(boolean throwExceptionOnMissing)(Code)(Java Doc) public Configuration subset(String prefix)(Code)(Java Doc)
|
|
|