|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.event.EventSource
org.apache.commons.configuration.AbstractConfiguration
org.apache.commons.configuration.web.BaseWebConfiguration
org.apache.commons.configuration.web.ServletConfiguration
A configuration wrapper around a ServletConfig
. This configuration
is read only, adding or removing a property will throw an
UnsupportedOperationException.
Field Summary | |
protected ServletConfig |
config
Stores a reference to the wrapped ServletConfig . |
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN |
Constructor Summary | |
ServletConfiguration(Servlet servlet)
Create a ServletConfiguration using the initialization parameter of the specified servlet. |
|
ServletConfiguration(ServletConfig config)
Create a ServletConfiguration using the servlet initialization parameters. |
Method Summary | |
protected void |
addPropertyDirect(String key,
Object obj)
Adds a property to this configuration. |
void |
clearProperty(String key)
Removes the property with the given key. |
boolean |
containsKey(String key)
Checks whether the specified key is stored in this configuration. |
Iterator |
getKeys()
Get the list of the keys contained in the configuration. The returned iterator can be used to obtain all defined keys. Note that the exact behavior of the iterator's remove() method is specific to
a concrete implementation. It may remove the corresponding
property from the configuration, but this is not guaranteed. In any case
it is no replacement for calling
for this property. So it is
highly recommended to avoid using the iterator's remove()
method. |
Object |
getProperty(String key)
Gets a property from the configuration. |
boolean |
isEmpty()
Checks if this configuration is empty. |
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration |
addProperty, clear, clearPropertyDirect, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getListDelimiter, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, interpolate, interpolate, interpolateHelper, isDelimiterParsingDisabled, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setProperty, setThrowExceptionOnMissing, subset |
Methods inherited from class org.apache.commons.configuration.event.EventSource |
addConfigurationListener, clearConfigurationListeners, createEvent, fireEvent, getConfigurationListeners, isDetailEvents, removeConfigurationListener, setDetailEvents |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ServletConfig config
ServletConfig
.
Constructor Detail |
public ServletConfiguration(Servlet servlet)
servlet
- the servletpublic ServletConfiguration(ServletConfig config)
config
- the servlet configurationMethod Detail |
public Object getProperty(String key)
Configuration
Configuration
interface the other get methods (that
return specific data types) will internally make use of this method. On
this level variable substitution is not yet performed. The returned
object is an internal representation of the property value for the passed
in key. It is owned by the Configuration
object. So a caller
should not modify this object. It cannot be guaranteed that this object
will stay constant over time (i.e. further update operations on the
configuration may change its internal state).
key
- property to retrieve
public Iterator getKeys()
AbstractConfiguration
remove()
method is specific to
a concrete implementation. It may remove the corresponding
property from the configuration, but this is not guaranteed. In any case
it is no replacement for calling
Configuration.clearProperty(String)
for this property. So it is
highly recommended to avoid using the iterator's remove()
method.
getKeys
in interface Configuration
getKeys
in class AbstractConfiguration
public boolean isEmpty()
getKeys()
method (which must be defined by concrete
sub classes) to find out whether properties exist.
isEmpty
in interface Configuration
isEmpty
in class AbstractConfiguration
public boolean containsKey(String key)
containsKey
in interface Configuration
containsKey
in class AbstractConfiguration
key
- the key
public void clearProperty(String key)
clearProperty
in interface Configuration
clearProperty
in class AbstractConfiguration
key
- the key of the property to be removed
UnsupportedOperationException
- because this operation is not
allowedprotected void addPropertyDirect(String key, Object obj)
addPropertyDirect
in class AbstractConfiguration
key
- the key of the propertyobj
- the value to be added
UnsupportedOperationException
- because this operation is not
allowed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |