org.apache.shindig.config
Interface ContainerConfig
- All Known Implementing Classes:
- AbstractContainerConfig, JsonContainerConfig
public interface ContainerConfig
Represents a container configuration.
Container configurations are used to support multiple, independent configurations in the same
server instance. Global configuration values are handled via traditional mechanisms such as
properties files or command-line flags bound through Guice's @Named annotation.
The default container configuration implementation is intended to be shared with the code found
in the PHP implementation of Shindig. It uses a simple JSON format inteded for easy readability.
get* can take either a simple property name (foo), or an EL expression (${foo.bar}).
DEFAULT_CONTAINER
static final String DEFAULT_CONTAINER
- See Also:
- Constant Field Values
getContainers
Collection<String> getContainers()
- Returns:
- The set of all containers that are currently registered.
getProperties
Map<String,Object> getProperties(String container)
- Fetch all properties for the given container configuration.
getProperty
Object getProperty(String container,
String name)
- Returns:
- The configuration property stored under the given name for the given container.
getString
String getString(String container,
String name)
- Returns:
- The configuration property stored under the given name for the given container, or null
if it is not defined or not a string.
getInt
int getInt(String container,
String name)
- Returns:
- The configuration property stored under the given name for the given container, or 0
if it is not defined or not a number.
getBool
boolean getBool(String container,
String name)
- Returns:
- The configuration property stored under the given name for the given container, or
false if it is not defined or not a boolean.
getList
<T> List<T> getList(String container,
String name)
- Returns:
- The configuration property stored under the given name for the given container, or an
empty list if it is not defined or not a list.
getMap
<T> Map<String,T> getMap(String container,
String name)
- Returns:
- The configuration property stored under the given name for the given container, or an
empty map if it is not defined or not a map.
Copyright © 2007-2012. All Rights Reserved.