|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.webwork.config.Configuration
public class Configuration
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:
Constructor Summary | |
---|---|
Configuration()
|
Method Summary | |
---|---|
static Object |
get(String name)
Returns a property as an Object. |
static Configuration |
getConfiguration()
Gets the current configuration implementation. |
Object |
getImpl(String aName)
Implementation of the get(String) method. |
static Locale |
getLocale()
Returns the WebWork2 locale. |
static String |
getString(String name)
Returns a property as a String. |
static boolean |
isSet(String name)
Determines whether or not a value has been set. |
boolean |
isSetImpl(String name)
Implementation of the isSet(String) method. |
static Iterator |
list()
Returns an Iterator of all properties names. |
Iterator |
listImpl()
Implementation of the list() method. |
static void |
reset()
|
static void |
set(String name,
Object value)
Sets a property. |
static void |
setConfiguration(Configuration config)
Sets the current configuration implementation. |
void |
setImpl(String name,
Object value)
Implementation of the set(String, Object) method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Configuration()
Method Detail |
---|
public static void setConfiguration(Configuration config) throws IllegalStateException
config
- a Configuration implementation
IllegalStateException
- if an error occurs when setting the configuration implementation.public static Configuration getConfiguration()
public static Locale getLocale()
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 (
Locale.getDefault()
).
public static boolean isSet(String name)
name
- the name of the property to test.
public static String getString(String name) throws IllegalArgumentException
name
- the name of the property to get.
IllegalArgumentException
- if an error occurs retrieveing the property or the property does not exist.public static Object get(String name) throws IllegalArgumentException
name
- the name of the property to get.
IllegalArgumentException
- if an error occurs retrieveing the property or the property does not exist.public static Iterator list()
public boolean isSetImpl(String name)
isSet(String)
method.
isSet(String)
public static void set(String name, Object value) throws IllegalArgumentException, UnsupportedOperationException
name
- the name of the property to set.value
- the property to set.
IllegalArgumentException
- if an error occurs when setting the property.
UnsupportedOperationException
- if the config implementation does not support setting properties.public void setImpl(String name, Object value) throws IllegalArgumentException, UnsupportedOperationException
set(String, Object)
method.
IllegalArgumentException
UnsupportedOperationException
set(String, Object)
public Object getImpl(String aName) throws IllegalArgumentException
get(String)
method.
IllegalArgumentException
get(String)
public Iterator listImpl()
list()
method.
list()
public static void reset()
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |