| java.lang.Object com.opensymphony.webwork.config.Configuration
All known Subclasses: com.opensymphony.webwork.config.TestConfiguration, com.opensymphony.webwork.config.DefaultConfiguration, com.opensymphony.webwork.config.PropertiesConfiguration, com.opensymphony.webwork.config.DelegatingConfiguration,
Configuration | public class Configuration (Code) | | Handles all WebWork2 config properties. Implementation of this class is pluggable (the
default implementation is
DefaultConfiguration ). This gives developers to ability to customize how
WebWork2 properties are set and retrieved. As an example, a developer may wish to check a separate property
store before delegating to the WebWork one.
Key methods:
Key methods for subclassers:
author: Rickard �berg author: Jason Carreira author: Bill Lynch (docs) |
get | public static Object get(String name) throws IllegalArgumentException(Code) | | Returns a property as an Object. This will throw an IllegalArgumentException if an error occurs
while retrieveing the property or if the property doesn't exist.
Parameters: name - the name of the property to get. the property as an Object. throws: IllegalArgumentException - if an error occurs retrieveing the property or the property does not exist. |
getConfiguration | public static Configuration getConfiguration()(Code) | | Gets the current configuration implementation.
the current configuration implementation. |
getLocale | public static Locale getLocale()(Code) | | Returns the WebWork2 locale. Keys off the property webwork.locale which should be set
as the Java
java.util.Locale.toString toString() representation of a Locale object (i.e.,
"en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr_MAC", etc).
If no locale is specified then the default VM locale is used (
java.util.Locale.getDefault ).
the WebWork2 locale if specified or the VM default locale. |
getString | public static String getString(String name) throws IllegalArgumentException(Code) | | Returns a property as a String. This will throw an IllegalArgumentException if an error occurs
while retrieveing the property or if the property doesn't exist.
Parameters: name - the name of the property to get. the property as a String throws: IllegalArgumentException - if an error occurs retrieveing the property or the property does not exist. |
isSet | public static boolean isSet(String name)(Code) | | Determines whether or not a value has been set. Useful for testing for the existance of parameter without
throwing an IllegalArgumentException.
Parameters: name - the name of the property to test. true if the property exists and has a value, false otherwise. |
list | public static Iterator list()(Code) | | Returns an Iterator of all properties names.
an Iterator of all properties names. |
reset | public static void reset()(Code) | | |
setConfiguration | public static void setConfiguration(Configuration config) throws IllegalStateException(Code) | | Sets the current configuration implementation. Can only be called once.
Parameters: config - a Configuration implementation throws: IllegalStateException - if an error occurs when setting the configuration implementation. |
|
|