public class ConfigurationDynaBean extends ConfigurationMap implements org.apache.commons.beanutils.DynaBean
Configuration
instance. It also
implements a Map
interface so that it can be used in
JSP 2.0 Expression Language expressions.
The ConfigurationDynaBean
maps nested and mapped properties
to the appropriate Configuration
subset using the
Configuration.subset(java.lang.String)
method. Similarly, indexed properties reference lists of configuration
properties using the
Configuration.getList(String)
method. Setting an indexed property is supported, too.
Note: Some of the methods expect that a dot (".") is used as property delimiter for the wrapped configuration. This is true for most of the default configurations. Hierarchical configurations, for which a specific expression engine is set, may cause problems.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ConfigurationDynaBean(Configuration configuration)
Creates a new instance of
ConfigurationDynaBean and sets
the configuration this bean is associated with. |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String name,
String key) |
Object |
get(String name) |
Object |
get(String name,
int index) |
Object |
get(String name,
String key) |
org.apache.commons.beanutils.DynaClass |
getDynaClass() |
void |
remove(String name,
String key) |
void |
set(String name,
int index,
Object value) |
void |
set(String name,
Object value) |
void |
set(String name,
String key,
Object value) |
entrySet, get, getConfiguration, put
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
public ConfigurationDynaBean(Configuration configuration)
ConfigurationDynaBean
and sets
the configuration this bean is associated with.configuration
- the configurationpublic void set(String name, Object value)
set
in interface org.apache.commons.beanutils.DynaBean
public Object get(String name)
get
in interface org.apache.commons.beanutils.DynaBean
public boolean contains(String name, String key)
contains
in interface org.apache.commons.beanutils.DynaBean
public Object get(String name, int index)
get
in interface org.apache.commons.beanutils.DynaBean
public Object get(String name, String key)
get
in interface org.apache.commons.beanutils.DynaBean
public org.apache.commons.beanutils.DynaClass getDynaClass()
getDynaClass
in interface org.apache.commons.beanutils.DynaBean
public void remove(String name, String key)
remove
in interface org.apache.commons.beanutils.DynaBean
public void set(String name, int index, Object value)
set
in interface org.apache.commons.beanutils.DynaBean
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.