com.opensymphony.webwork.config
Class DelegatingConfiguration

java.lang.Object
  extended bycom.opensymphony.webwork.config.Configuration
      extended bycom.opensymphony.webwork.config.DelegatingConfiguration

public class DelegatingConfiguration
extends Configuration

A Configuration implementation which stores an internal list of configuration objects. Each time a config method is called (get, set, list, etc..) this class will go through the list of configurations and call the method until successful.

Author:
Rickard ?berg, Jason Carreira, Bill Lynch (docs)

Constructor Summary
DelegatingConfiguration(Configuration[] aConfigList)
          Creates a new DelegatingConfiguration object given a list of Configuration implementations.
 
Method Summary
 Object getImpl(String name)
          Gets the specified property - calls getImpl(String) method on config objects in config list until successful.
 boolean isSetImpl(String aName)
          Determines if a paramter has been set - calls the isSetImpl(String) method on each config object in config list.
 Iterator listImpl()
          Returns a list of all property names - returns a list of all property names in all config objects in config list.
 void setImpl(String name, Object value)
          Sets the given property - calls setImpl(String, Object) method on config objects in the config list until successful.
 
Methods inherited from class com.opensymphony.webwork.config.Configuration
get, getConfiguration, getLocale, getString, isSet, list, set, setConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingConfiguration

public DelegatingConfiguration(Configuration[] aConfigList)
Creates a new DelegatingConfiguration object given a list of Configuration implementations.

Parameters:
aConfigList - a list of Configuration implementations.
Method Detail

setImpl

public void setImpl(String name,
                    Object value)
             throws IllegalArgumentException,
                    UnsupportedOperationException
Sets the given property - calls setImpl(String, Object) method on config objects in the config list until successful.

Overrides:
setImpl in class Configuration
Throws:
IllegalArgumentException
UnsupportedOperationException
See Also:
Configuration.set(String, Object)

getImpl

public Object getImpl(String name)
               throws IllegalArgumentException
Gets the specified property - calls getImpl(String) method on config objects in config list until successful.

Overrides:
getImpl in class Configuration
Throws:
IllegalArgumentException
See Also:
Configuration.get(String)

isSetImpl

public boolean isSetImpl(String aName)
Determines if a paramter has been set - calls the isSetImpl(String) method on each config object in config list. Returns true when one of the config implementations returns true. Returns false otherwise.

Overrides:
isSetImpl in class Configuration
See Also:
Configuration.isSet(String)

listImpl

public Iterator listImpl()
Returns a list of all property names - returns a list of all property names in all config objects in config list.

Overrides:
listImpl in class Configuration
See Also:
Configuration.list()

WebWork Project Page