de.mud.jta

Class PluginConfig


public class PluginConfig
extends 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 499 2005-09-29 08:24:54Z leo $
Author:
Matthias L. Jugel, Marcus Mei???ner

Constructor Summary

PluginConfig(Properties props)

Method Summary

String
getProperty(String plugin, String key)
Get the property value for a certain plugin.
String
getProperty(String plugin, String id, String key)
Get property value for a certain plugin with the specified id.
void
setProperty(String plugin, String key, String value)
Set the property value for a certain plugin.
void
setProperty(String plugin, String id, String key, String value)
Set the property value for a certain plugin and id.

Constructor Details

PluginConfig

public PluginConfig(Properties props)

Method Details

getProperty

public String getProperty(String plugin,
                          String key)
Get the property value for a certain plugin.
Parameters:
plugin - the plugin to get setup for
key - the property key to search for

getProperty

public String getProperty(String plugin,
                          String id,
                          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 for
id - plugin id as specified in the config file
key - the property key to search for
Returns:
the property value or null

setProperty

public void setProperty(String plugin,
                        String key,
                        String value)
Set the property value for a certain plugin.
Parameters:
plugin - the name of the plugin
key - the property key
value - the new value

setProperty

public void setProperty(String plugin,
                        String id,
                        String key,
                        String value)
Set the property value for a certain plugin and id.
Parameters:
plugin - the name of the plugin
id - the unique id of the plugin
key - the property key
value - the new value