org.apache.commons.configuration.beanutils
Class ConfigurationDynaBean

java.lang.Object
  extended byorg.apache.commons.configuration.beanutils.ConfigurationDynaBean
All Implemented Interfaces:
org.apache.commons.beanutils.DynaBean

public class ConfigurationDynaBean
extends Object
implements org.apache.commons.beanutils.DynaBean

The ConfigurationDynaBean dynamically reads and writes configurations properties from a wrapped configuration-collection 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 always throws an exception.

Since:
1.0-rc1
Version:
$Revision: 1.7 $, $Date: 2004/09/21 17:58:10 $
Author:
Ricardo Gladwell

Field Summary
(package private)  Configuration configuration
           
 
Constructor Summary
ConfigurationDynaBean(Configuration configuration)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

Configuration configuration
Constructor Detail

ConfigurationDynaBean

public ConfigurationDynaBean(Configuration configuration)
Method Detail

set

public void set(String name,
                Object value)
Specified by:
set in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.set(java.lang.String, java.lang.Object)

get

public Object get(String name)
Specified by:
get in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.get(java.lang.String)

contains

public boolean contains(String name,
                        String key)
Specified by:
contains in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.contains(java.lang.String, java.lang.String)

get

public Object get(String name,
                  int index)
Specified by:
get in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.get(java.lang.String, int)

get

public Object get(String name,
                  String key)
Specified by:
get in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.get(java.lang.String, java.lang.String)

getDynaClass

public org.apache.commons.beanutils.DynaClass getDynaClass()
Specified by:
getDynaClass in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.getDynaClass()

remove

public void remove(String name,
                   String key)
Specified by:
remove in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.remove(java.lang.String, java.lang.String)

set

public void set(String name,
                int index,
                Object value)
Specified by:
set in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.set(java.lang.String, int, java.lang.Object)

set

public void set(String name,
                String key,
                Object value)
Specified by:
set in interface org.apache.commons.beanutils.DynaBean
See Also:
DynaBean.set(java.lang.String, java.lang.String, java.lang.Object)


Copyright © 2001-2004 The Apache Software Foundation. All Rights Reserved.