de.mud.jta
Class PluginConfig
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--java.util.Properties
|
+--de.mud.jta.PluginConfig
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- public class PluginConfig
- extends java.util.Properties
Plugin configuration container. This class extends the Properties
to allow specific duplications of plugins. To get the value of a
property for a plugin simply call getProperty() with the plugin name,
the unique id (which may be null) and the key you look for. A fallback
value will be returned if it exists.
Maintainer: Matthias L. Jugel
- Version:
- $Id: PluginConfig.java,v 2.5 2002/05/06 07:24:20 leo Exp $
- Author:
- Matthias L. Jugel, Marcus Meißner
- See Also:
- Serialized Form
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Fields inherited from class java.util.Properties |
defaults |
Constructor Summary |
PluginConfig(java.util.Properties props)
|
Method Summary |
java.lang.String |
getProperty(java.lang.String plugin,
java.lang.String key)
Get the property value for a certain plugin. |
java.lang.String |
getProperty(java.lang.String plugin,
java.lang.String id,
java.lang.String key)
Get property value for a certain plugin with the specified id. |
void |
setProperty(java.lang.String plugin,
java.lang.String key,
java.lang.String value)
Set the property value for a certain plugin. |
void |
setProperty(java.lang.String plugin,
java.lang.String id,
java.lang.String key,
java.lang.String value)
Set the property value for a certain plugin and id. |
Methods inherited from class java.util.Properties |
getProperty, list, list, load, propertyNames, save, setProperty, store |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
PluginConfig
public PluginConfig(java.util.Properties props)
getProperty
public java.lang.String getProperty(java.lang.String plugin,
java.lang.String id,
java.lang.String key)
- Get property value for a certain plugin with the specified id.
This method will return the default value if no value for the specified
id exists.
- Parameters:
plugin
- the plugin to get the setup forid
- plugin id as specified in the config filekey
- the property key to search for- Returns:
- the property value or null
getProperty
public java.lang.String getProperty(java.lang.String plugin,
java.lang.String key)
- Get the property value for a certain plugin.
- Overrides:
getProperty
in class java.util.Properties
- Parameters:
plugin
- the plugin to get setup forkey
- the property key to search for
setProperty
public void setProperty(java.lang.String plugin,
java.lang.String id,
java.lang.String key,
java.lang.String value)
- Set the property value for a certain plugin and id.
- Parameters:
plugin
- the name of the pluginid
- the unique id of the pluginkey
- the property keyvalue
- the new value
setProperty
public void setProperty(java.lang.String plugin,
java.lang.String key,
java.lang.String value)
- Set the property value for a certain plugin.
- Parameters:
plugin
- the name of the pluginkey
- the property keyvalue
- the new value