public class MockContainerConfiguration extends Object implements ContainerConfiguration
Constructor and Description |
---|
MockContainerConfiguration() |
Modifier and Type | Method and Description |
---|---|
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<String> |
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.
|
void |
setProperty(Class<?> valueClass,
String key,
Object value) |
Properties |
toProperties()
Convert a ContainerConfiguration class into a Properties class.
|
public boolean isEmpty()
ContainerConfiguration
isEmpty
in interface ContainerConfiguration
true
if the configuration contains no property,
false
otherwise.public boolean containsKey(String key)
ContainerConfiguration
containsKey
in interface ContainerConfiguration
key
- the key whose presence in this configuration is to be testedpublic boolean getBoolean(String key)
ContainerConfiguration
getBoolean
in interface ContainerConfiguration
public boolean getBoolean(String key, boolean defaultValue)
ContainerConfiguration
getBoolean
in interface ContainerConfiguration
public String getString(String key)
ContainerConfiguration
getString
in interface ContainerConfiguration
public String getString(String key, String defaultValue)
ContainerConfiguration
getString
in interface ContainerConfiguration
public double getDouble(String key)
ContainerConfiguration
getDouble
in interface ContainerConfiguration
public double getDouble(String key, double defaultValue)
ContainerConfiguration
getDouble
in interface ContainerConfiguration
public float getFloat(String key)
ContainerConfiguration
getFloat
in interface ContainerConfiguration
public float getFloat(String key, float defaultValue)
ContainerConfiguration
getFloat
in interface ContainerConfiguration
public int getInt(String key)
ContainerConfiguration
getInt
in interface ContainerConfiguration
public int getInt(String key, int defaultValue)
ContainerConfiguration
getInt
in interface ContainerConfiguration
public List<String> getList(String key)
ContainerConfiguration
getList
in interface ContainerConfiguration
List
of String
s for key
public long getLong(String key)
ContainerConfiguration
getLong
in interface ContainerConfiguration
public long getLong(String key, long defaultValue)
ContainerConfiguration
getLong
in interface ContainerConfiguration
public String[] getStringArray(String key)
ContainerConfiguration
getStringArray
in interface ContainerConfiguration
public Iterator getKeys()
ContainerConfiguration
getKeys
in interface ContainerConfiguration
Iterator
of all the String
keyspublic boolean isDevelopmentMode()
ContainerConfiguration
isDevelopmentMode
in interface ContainerConfiguration
public Properties toProperties()
ContainerConfiguration
toProperties
in interface ContainerConfiguration
Copyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.