org.apache.struts2.config
Class DelegatingSettings

java.lang.Object
  extended by org.apache.struts2.config.Settings
      extended by org.apache.struts2.config.DelegatingSettings

public class DelegatingSettings
extends Settings

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


Constructor Summary
DelegatingSettings(Settings[] aConfigList)
          Creates a new DelegatingSettings object given a list of Settings implementations.
 
Method Summary
 java.lang.String getImpl(java.lang.String name)
          Gets the specified property - calls getImpl(String) method on config objects in config list until successful.
 boolean isSetImpl(java.lang.String aName)
          Determines if a paramter has been set - calls the isSetImpl(String) method on each config object in config list.
 java.util.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(java.lang.String name, java.lang.String value)
          Sets the given property - calls setImpl(String, Object) method on config objects in the config list until successful.
 
Methods inherited from class org.apache.struts2.config.Settings
get, getInstance, getLocale, isSet, list, reset, set, setInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingSettings

public DelegatingSettings(Settings[] aConfigList)
Creates a new DelegatingSettings object given a list of Settings implementations.

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

setImpl

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

Overrides:
setImpl in class Settings
Throws:
java.lang.IllegalArgumentException
java.lang.UnsupportedOperationException
See Also:
Settings.set(String, String)

getImpl

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

Overrides:
getImpl in class Settings
Throws:
java.lang.IllegalArgumentException
See Also:
Settings.get(String)

isSetImpl

public boolean isSetImpl(java.lang.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 Settings
See Also:
Settings.isSet(String)

listImpl

public java.util.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 Settings
See Also:
Settings.list()


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.