Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.configuration.beanutils
Class ConfigurationDynaBean  view ConfigurationDynaBean download ConfigurationDynaBean.java

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

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

The ConfigurationDynaBean dynamically reads and writes configurations properties from a wrapped configuration-collection org.apache.commons.configuration.Configuration instance. It also implements a java.util.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)>Configuration.subset(java.lang.String) 55 method. Similarly, indexed properties reference lists of configuration properties using the Configuration.getList(String)>Configuration.getList(String) 55 method. Setting an indexed property always throws an exception.

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

Field Summary
(package private)  org.apache.commons.configuration.Configuration configuration
           
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
ConfigurationDynaBean(org.apache.commons.configuration.Configuration configuration)
           
 
Method Summary
 boolean contains(java.lang.String name, java.lang.String key)
          Does the specified mapped property contain a value for the specified key value?
 java.lang.Object get(java.lang.String name)
          Return the value of a simple property with the specified name.
 java.lang.Object get(java.lang.String name, int index)
          Return the value of an indexed property with the specified name.
 java.lang.Object get(java.lang.String name, java.lang.String key)
          Return the value of a mapped property with the specified name, or null if there is no value for the specified key.
 org.apache.commons.beanutils.DynaClass getDynaClass()
          Return the DynaClass instance that describes the set of properties available for this DynaBean.
 void remove(java.lang.String name, java.lang.String key)
          Remove any existing value for the specified key on the specified mapped property.
 void set(java.lang.String name, int index, java.lang.Object value)
          Set the value of an indexed property with the specified name.
 void set(java.lang.String name, java.lang.Object value)
          Set the value of a simple property with the specified name.
 void set(java.lang.String name, java.lang.String key, java.lang.Object value)
          Set the value of a mapped property with the specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

configuration

org.apache.commons.configuration.Configuration configuration
Constructor Detail

ConfigurationDynaBean

public ConfigurationDynaBean(org.apache.commons.configuration.Configuration configuration)
Method Detail

set

public void set(java.lang.String name,
                java.lang.Object value)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Set the value of a simple property with the specified name.

Specified by:
set in interface org.apache.commons.beanutils.DynaBean

get

public java.lang.Object get(java.lang.String name)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Return the value of a simple property with the specified name.

Specified by:
get in interface org.apache.commons.beanutils.DynaBean

contains

public boolean contains(java.lang.String name,
                        java.lang.String key)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Does the specified mapped property contain a value for the specified key value?

Specified by:
contains in interface org.apache.commons.beanutils.DynaBean

get

public java.lang.Object get(java.lang.String name,
                            int index)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Return the value of an indexed property with the specified name.

Specified by:
get in interface org.apache.commons.beanutils.DynaBean

get

public java.lang.Object get(java.lang.String name,
                            java.lang.String key)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Return the value of a mapped property with the specified name, or null if there is no value for the specified key.

Specified by:
get in interface org.apache.commons.beanutils.DynaBean

getDynaClass

public org.apache.commons.beanutils.DynaClass getDynaClass()
Description copied from interface: org.apache.commons.beanutils.DynaBean
Return the DynaClass instance that describes the set of properties available for this DynaBean.

Specified by:
getDynaClass in interface org.apache.commons.beanutils.DynaBean

remove

public void remove(java.lang.String name,
                   java.lang.String key)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Remove any existing value for the specified key on the specified mapped property.

Specified by:
remove in interface org.apache.commons.beanutils.DynaBean

set

public void set(java.lang.String name,
                int index,
                java.lang.Object value)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Set the value of an indexed property with the specified name.

Specified by:
set in interface org.apache.commons.beanutils.DynaBean

set

public void set(java.lang.String name,
                java.lang.String key,
                java.lang.Object value)
Description copied from interface: org.apache.commons.beanutils.DynaBean
Set the value of a mapped property with the specified name.

Specified by:
set in interface org.apache.commons.beanutils.DynaBean