|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.configuration.AbstractConfiguration org.apache.commons.configuration.JNDIConfiguration
This Configuration class allows you to interface with a JNDI datasource. A JNDIConfiguration is read-only, write operations will throw an UnsupportedOperationException. The clear operations are supported but the underlying JNDI data source is not changed.
Field Summary |
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
END_TOKEN, START_TOKEN |
Constructor Summary | |
JNDIConfiguration()
Creates a JNDIConfiguration using the default initial context 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. |
|
JNDIConfiguration(String prefix)
Creates a JNDIConfiguration using the default initial context, shifted with 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)
Remove a property from the configuration. |
boolean |
containsKey(String key)
Check if the configuration contains the specified key. |
Context |
getBaseContext()
Return the base context with the prefix applied. |
Context |
getContext()
Return the initial context used by this configuration. |
Iterator |
getKeys()
Get the list of the keys contained in the configuration. |
Iterator |
getKeys(String prefix)
Get the list of the keys contained in the configuration that match the specified prefix. |
String |
getPrefix()
|
Object |
getProperty(String key)
Gets a property from the configuration. |
boolean |
isEmpty()
Check if the configuration is empty. |
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. |
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration |
addProperty, clear, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getList, getList, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, interpolate, interpolateHelper, isThrowExceptionOnMissing, resolveContainerStore, setDelimiter, setThrowExceptionOnMissing, subset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JNDIConfiguration() throws NamingException
NamingException
- thrown if an error occurs when initializing the default contextpublic JNDIConfiguration(String prefix) throws NamingException
prefix
-
NamingException
- thrown if an error occurs when initializing the default contextpublic JNDIConfiguration(Context context)
context
- the initial contextpublic JNDIConfiguration(Context context, String prefix)
context
- the initial contextprefix
- Method Detail |
public Iterator getKeys()
getKeys
in interface Configuration
getKeys
in class AbstractConfiguration
public Iterator getKeys(String prefix)
getKeys
in interface Configuration
getKeys
in class AbstractConfiguration
public boolean isEmpty()
isEmpty
in interface Configuration
isEmpty
in class AbstractConfiguration
public void setProperty(String key, Object value)
This operation is not supported and will throw an UnsupportedOperationException.
setProperty
in interface Configuration
setProperty
in class AbstractConfiguration
UnsupportedOperationException
public void clearProperty(String key)
clearProperty
in interface Configuration
clearProperty
in class AbstractConfiguration
public boolean containsKey(String key)
containsKey
in interface Configuration
containsKey
in class AbstractConfiguration
public String getPrefix()
public void setPrefix(String prefix)
prefix
- The prefix to setpublic Object getProperty(String key)
key
- property to retrieve
protected void addPropertyDirect(String key, Object obj)
This operation is not supported and will throw an UnsupportedOperationException.
addPropertyDirect
in class AbstractConfiguration
key
- key to use for mappingobj
- object to store
UnsupportedOperationException
public Context getBaseContext() throws NamingException
NamingException
public Context getContext()
public void setContext(Context context)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |