javawebparts.listener
Class AppConfig

java.lang.Object
  |
  +--javawebparts.listener.AppConfig

public class AppConfig
extends java.lang.Object

This class holds configuration information. It is a simple implementation that is the default for this listener if a custom class is not specified. Note that this does NOT support multiple elements with the same name, nor does it support anything but a flat config file format!

Author:
Frank W. Zammetti.

Field Summary
private static java.util.HashMap configMap
          The configuration map.
private  javawebparts.core.org.apache.commons.digester.Digester digester
          Reference to Digester populating this object.
 
Constructor Summary
AppConfig()
           
 
Method Summary
static java.lang.String get(java.lang.String key)
          The configuration map.
 void set(java.lang.String val)
          Set an item in the configMap.
 void setDigester(javawebparts.core.org.apache.commons.digester.Digester inDigester)
          This must be called before the object can be populated.
 java.lang.String toString()
          Overriden toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

configMap

private static java.util.HashMap configMap
The configuration map.


digester

private javawebparts.core.org.apache.commons.digester.Digester digester
Reference to Digester populating this object.

Constructor Detail

AppConfig

public AppConfig()
Method Detail

setDigester

public void setDigester(javawebparts.core.org.apache.commons.digester.Digester inDigester)
This must be called before the object can be populated. It stores a reference to the Digester populating it. Needed to get element names.

Parameters:
inDigester - Reference to Digester populating this object.

set

public void set(java.lang.String val)
Set an item in the configMap.

Parameters:
val - The value to store.

get

public static java.lang.String get(java.lang.String key)
The configuration map.

Parameters:
key - The key of the value to retrieve, null if not found.
Returns:
The value for the requested key, or null if key not found.

toString

public java.lang.String toString()
Overriden toString method.

Overrides:
toString in class java.lang.Object
Returns:
A reflexively-built string representation of this bean.


Copyright © 2005 Frank W. Zammetti