org.apache.commons.configuration
public class JNDIConfiguration extends AbstractConfiguration
Version: $Id: JNDIConfiguration.java 497181 2007-01-17 21:35:28Z oheger $
Field Summary | |
---|---|
Context | baseContext The base JNDI context. |
Set | clearedProperties The Set of keys that have been virtually cleared. |
Context | context The initial JNDI context. |
String | prefix The prefix of the context. |
Constructor Summary | |
---|---|
JNDIConfiguration()
Creates a JNDIConfiguration using the default initial context as the
root of the properties.
| |
JNDIConfiguration(String prefix)
Creates a JNDIConfiguration using the default initial context, shifted
with the specified prefix, as the root of the properties.
| |
JNDIConfiguration(Context context)
Creates a JNDIConfiguration using the specified initial context as the
root of the properties.
| |
JNDIConfiguration(Context context, String prefix)
Creates a JNDIConfiguration using the specified initial context shifted
by the specified prefix as the root of the properties.
|
Method Summary | |
---|---|
protected void | addPropertyDirect(String key, Object obj) This operation is not supported and will throw an UnsupportedOperationException. |
void | clearProperty(String key)
Removes the specified property.
|
boolean | containsKey(String key)
Checks whether the specified key is contained in this configuration.
|
Context | getBaseContext()
Return the base context with the prefix applied.
|
Context | getContext(List path, Context context)
Because JNDI is based on a tree configuration, we need to filter down the
tree, till we find the Context specified by the key to start from.
|
Context | getContext()
Return the initial context used by this configuration. |
Iterator | getKeys()
Returns an iterator with all property keys stored in this configuration.
|
Iterator | getKeys(String prefix)
Returns an iterator with all property keys starting with the given
prefix.
|
String | getPrefix()
Returns the prefix. |
Object | getProperty(String key)
Returns the value of the specified property.
|
boolean | isEmpty()
Returns a flag whether this configuration is empty.
|
void | recursiveGetKeys(Set keys, Context context, String prefix)
This method recursive traverse the JNDI tree, looking for Context objects.
|
void | setContext(Context context)
Set the initial context of the configuration.
|
void | setPrefix(String prefix)
Sets the prefix.
|
void | setProperty(String key, Object value) This operation is not supported and will throw an UnsupportedOperationException. |
Throws: NamingException thrown if an error occurs when initializing the default context
Parameters: prefix the prefix
Throws: NamingException thrown if an error occurs when initializing the default context
Parameters: context the initial context
Parameters: context the initial context prefix the prefix
This operation is not supported and will throw an UnsupportedOperationException.
Parameters: key the key obj the value
Throws: UnsupportedOperationException
Parameters: key the key of the property to remove
Parameters: key the key to check
Returns: a flag whether this key is stored in this configuration
Returns: the base context
Throws: NamingException if an error occurs
Parameters: path the path of keys to traverse in order to find the context context the context to start from
Returns: The context at that key's location in the JNDI tree, or null if not found
Throws: NamingException if JNDI has an issue
Returns: the initial context
Returns: an iterator with all keys
Parameters: prefix the prefix
Returns: an iterator with the selected keys
Returns: the prefix
Parameters: key the key of the property
Returns: the value of this property
Returns: the empty flag
Parameters: keys All the keys that have been found. context The parent context prefix What prefix we are building on.
Throws: NamingException If JNDI has an issue.
Parameters: context the context
Parameters: prefix The prefix to set
This operation is not supported and will throw an UnsupportedOperationException.
Parameters: key the key value the value
Throws: UnsupportedOperationException