| java.lang.Object net.wastl.webmail.config.ConfigParameter
All known Subclasses: net.wastl.webmail.config.IntegerConfigParameter, net.wastl.webmail.config.StringConfigParameter, net.wastl.webmail.config.ChoiceConfigParameter,
ConfigParameter | abstract public class ConfigParameter (Code) | | An abstraction for a configuration parameter.
Subclasses must implement a method that checks whether a specific value is correct for this
parameter.
ConfigParameters may have ConfigurationListeners that work much like the Listeners in the
Java AWT. All listeners get informed if the value of the parameter has changed.
Each ConfigParameter has a corresponding (unique) key, a default value (if not yet changed
by the user) and a short description for the administrator about what the parameter means.
This is a scheme only, however, ConfigParameters just describe the behaviour of certain
keys in the WebMail configuration, they don't actually store the value itself.
|
ConfigParameter | public ConfigParameter(String name, Object def, String desc)(Code) | | Create a new parameter.
Parameters: name - Unique key of this parameter Parameters: def - Default value for this parameter Parameters: desc - Description for this parameter |
addConfigurationListener | public void addConfigurationListener(ConfigurationListener l)(Code) | | Add a ConfigurationListener for this object that will be informed if the parameter's
value changes.
|
filter | public String filter(String s)(Code) | | Put through some sort of filter.
This method is called when a String value for this parameter is set.
Subclasses should implement this, if they want to change the behaviour
See Also: CryptedStringConfigParameter |
getConfigurationListeners | public Enumeration getConfigurationListeners()(Code) | | Get a list of all configuration listeners.
|
getDefault | public Object getDefault()(Code) | | Return the default value of this parameter.
|
getDescription | public String getDescription()(Code) | | Return the description for this parameter.
|
getKey | public String getKey()(Code) | | Return the key of this parameter.
|
isPossibleValue | abstract public boolean isPossibleValue(Object value)(Code) | | Check whether the value that is passed as the parameter is a valid value for this
ConfigParameter
See Also: ChoiceConfigParameter |
|
|