webwork.config
Class CachingConfiguration

java.lang.Object
  extended bywebwork.config.Configuration
      extended bywebwork.config.DefaultConfiguration
          extended bywebwork.config.CachingConfiguration

public class CachingConfiguration
extends DefaultConfiguration

This is a caching implementation of Configuration. This class can be used instead of the DefaultConfiguration to make your configuration lookups more efficient. At startup it iterates through all the configuration settings returned by DefaultConfiguration and stores them in a Map.

Version:
$Revision: 1.1 $
Author:
Dick Zetterberg (dick@transitor.se)

Field Summary
protected  java.util.Map configurationMap
           
 
Constructor Summary
CachingConfiguration()
           
 
Method Summary
protected  java.util.Map getConfigurationMap(Configuration configObject)
          Create and return a Map with configuration key/values
 java.lang.Object getImpl(java.lang.String aName)
          Get a named setting.
 java.util.Iterator listImpl()
          List setting names
 void setImpl(java.lang.String aName, java.lang.Object aValue)
          Set a named setting
 
Methods inherited from class webwork.config.Configuration
get, getConfiguration, getLocale, getString, list, set, setConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configurationMap

protected java.util.Map configurationMap
Constructor Detail

CachingConfiguration

public CachingConfiguration()
Method Detail

getConfigurationMap

protected java.util.Map getConfigurationMap(Configuration configObject)
Create and return a Map with configuration key/values


getImpl

public java.lang.Object getImpl(java.lang.String aName)
                         throws java.lang.IllegalArgumentException
Get a named setting.

Overrides:
getImpl in class DefaultConfiguration
Throws:
java.lang.IllegalArgumentException

setImpl

public void setImpl(java.lang.String aName,
                    java.lang.Object aValue)
Set a named setting

Overrides:
setImpl in class DefaultConfiguration

listImpl

public java.util.Iterator listImpl()
List setting names

Overrides:
listImpl in class DefaultConfiguration


Copyright © 2001-2003 WebWork All Rights Reserved.