com.pietschy.command.configuration.impl
Class ConfigurationCache

java.lang.Object
  extended by com.pietschy.command.configuration.impl.ConfigurationCache

 class ConfigurationCache
extends java.lang.Object

Manages Configuration instances.


Constructor Summary
ConfigurationCache()
          Creates a new cache instance.
 
Method Summary
protected  Configuration getConfigFor(Command command)
          Gets the configuration instance for the specified command.
protected  Configuration getConfigFor(java.lang.String id)
          Gets the config for the command with the specified id.
protected  Configuration getOrCreateConfig(PropertyKey key)
          Gets the configuration object represented by the specified PropertyKey.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationCache

public ConfigurationCache()
Creates a new cache instance.

Method Detail

getConfigFor

protected Configuration getConfigFor(Command command)
Gets the configuration instance for the specified command.

Parameters:
command - the command.
Returns:
the configuration instance for the command.
Throws:
java.lang.NullPointerException - if the command is null.
java.lang.IllegalArgumentException - if the command is anonymous.

getConfigFor

protected Configuration getConfigFor(java.lang.String id)
Gets the config for the command with the specified id.

Parameters:
id - the command id.
Returns:
the configuration for the command with the specified id.
Throws:
java.lang.NullPointerException - if the id is null.

getOrCreateConfig

protected Configuration getOrCreateConfig(PropertyKey key)
Gets the configuration object represented by the specified PropertyKey.

Parameters:
key - the property key.
Returns:
the configuration object for the command represented by the property key.


Copyright © 2006 - 2007 Andrew Pietsch