org.hippoecm.hst.core.container
Interface ContainerConfiguration

All Known Implementing Classes:
ContainerConfigurationImpl, MockContainerConfiguration

public interface ContainerConfiguration

Container Configuration Retrieve basic data types from the container configuration(s). This is a subset of Commons Configuration functionality.

Version:
$Id: ContainerConfiguration.java 32892 2012-02-04 06:00:46Z wko $

Method Summary
 boolean containsKey(String key)
          Check if the configuration contains the specified key.
 boolean getBoolean(String key)
          Get a boolean associated with the given configuration key.
 boolean getBoolean(String key, boolean defaultValue)
          Get a boolean associated with the given configuration key.
 double getDouble(String key)
          Get a double associated with the given configuration key.
 double getDouble(String key, double defaultValue)
          Get a Double associated with the given configuration key.
 float getFloat(String key)
          Get a float associated with the given configuration key.
 float getFloat(String key, float defaultValue)
          Get a Float associated with the given configuration key.
 int getInt(String key)
          Get a int associated with the given configuration key.
 int getInt(String key, int defaultValue)
          Get a int associated with the given configuration key.
 Iterator getKeys()
          Get the list of the keys contained in the configuration.
 List getList(String key)
          Get a List of strings associated with the given configuration key.
 long getLong(String key)
          Get a long associated with the given configuration key.
 long getLong(String key, long defaultValue)
          Get a long associated with the given configuration key.
 String getString(String key)
          Get a string associated with the given configuration key.
 String getString(String key, String defaultValue)
          Get a string associated with the given configuration key.
 String[] getStringArray(String key)
          Get an array of strings associated with the given configuration key.
 boolean isDevelopmentMode()
          Checks if the container is running under development mode
 boolean isEmpty()
          Check if the configuration is empty.
 Properties toProperties()
          Convert a ContainerConfiguration class into a Properties class.
 

Method Detail

isEmpty

boolean isEmpty()
Check if the configuration is empty.

Returns:
true if the configuration contains no property, false otherwise.

containsKey

boolean containsKey(String key)
Check if the configuration contains the specified key.

Parameters:
key - the key whose presence in this configuration is to be tested
Returns:
true if the configuration contains a value for this key, false otherwise

getBoolean

boolean getBoolean(String key)
Get a boolean associated with the given configuration key.

Parameters:
key -
Returns:

getBoolean

boolean getBoolean(String key,
                   boolean defaultValue)
Get a boolean associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.

Parameters:
key -
defaultValue -
Returns:

getString

String getString(String key)
Get a string associated with the given configuration key.

Parameters:
key -
Returns:

getString

String getString(String key,
                 String defaultValue)
Get a string associated with the given configuration key.

Parameters:
key -
defaultValue -
Returns:

getDouble

double getDouble(String key)
Get a double associated with the given configuration key.

Parameters:
key -
Returns:

getDouble

double getDouble(String key,
                 double defaultValue)
Get a Double associated with the given configuration key.

Parameters:
key -
defaultValue -
Returns:

getFloat

float getFloat(String key)
Get a float associated with the given configuration key.

Parameters:
key -
Returns:

getFloat

float getFloat(String key,
               float defaultValue)
Get a Float associated with the given configuration key.

Parameters:
key -
defaultValue -
Returns:

getInt

int getInt(String key)
Get a int associated with the given configuration key.

Parameters:
key -
Returns:

getInt

int getInt(String key,
           int defaultValue)
Get a int associated with the given configuration key.

Parameters:
key -
defaultValue -
Returns:

getList

List getList(String key)
Get a List of strings associated with the given configuration key.

Parameters:
key -
Returns:

getLong

long getLong(String key)
Get a long associated with the given configuration key.

Parameters:
key -
Returns:

getLong

long getLong(String key,
             long defaultValue)
Get a long associated with the given configuration key.

Parameters:
key -
defaultValue -
Returns:

getStringArray

String[] getStringArray(String key)
Get an array of strings associated with the given configuration key.

Parameters:
key -
Returns:

getKeys

Iterator getKeys()
Get the list of the keys contained in the configuration.

Returns:

isDevelopmentMode

boolean isDevelopmentMode()
Checks if the container is running under development mode

Returns:

toProperties

Properties toProperties()
Convert a ContainerConfiguration class into a Properties class. List properties are joined into a string using the delimiter of the configuration.

Returns:
Properties created from the Configuration


Copyright © 2008-2012 Hippo. All Rights Reserved.