com.opensymphony.xwork2.config.impl
Class MockConfiguration

java.lang.Object
  extended by com.opensymphony.xwork2.config.impl.MockConfiguration
All Implemented Interfaces:
Configuration, Serializable

public class MockConfiguration
extends Object
implements Configuration

Simple configuration used for unit testing

See Also:
Serialized Form

Field Summary
private  Container container
           
private  Set loadedFiles
           
private  Map packages
           
 
Constructor Summary
MockConfiguration()
           
 
Method Summary
 void addPackageConfig(String name, PackageConfig packageContext)
           
 void buildRuntimeConfiguration()
           
 void destroy()
          Allow the Configuration to clean up any resources that have been used.
 Container getContainer()
           
 Set<String> getLoadedFileNames()
           
 PackageConfig getPackageConfig(String name)
           
 Set getPackageConfigNames()
           
 Map getPackageConfigs()
           
 RuntimeConfiguration getRuntimeConfiguration()
          The current runtime configuration.
 void rebuildRuntimeConfiguration()
           
 void reload(List<ConfigurationProvider> providers)
           
 void removePackageConfig(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

packages

private Map packages

loadedFiles

private Set loadedFiles

container

private Container container
Constructor Detail

MockConfiguration

public MockConfiguration()
Method Detail

getPackageConfig

public PackageConfig getPackageConfig(String name)
Specified by:
getPackageConfig in interface Configuration

getPackageConfigNames

public Set getPackageConfigNames()
Specified by:
getPackageConfigNames in interface Configuration

getPackageConfigs

public Map getPackageConfigs()
Specified by:
getPackageConfigs in interface Configuration

getRuntimeConfiguration

public RuntimeConfiguration getRuntimeConfiguration()
Description copied from interface: Configuration
The current runtime configuration. Currently, if changes have been made to the Configuration since the last time buildRuntimeConfiguration() was called, you'll need to make sure to.

Specified by:
getRuntimeConfiguration in interface Configuration
Returns:
the current runtime configuration

addPackageConfig

public void addPackageConfig(String name,
                             PackageConfig packageContext)
Specified by:
addPackageConfig in interface Configuration

buildRuntimeConfiguration

public void buildRuntimeConfiguration()

destroy

public void destroy()
Description copied from interface: Configuration
Allow the Configuration to clean up any resources that have been used.

Specified by:
destroy in interface Configuration

rebuildRuntimeConfiguration

public void rebuildRuntimeConfiguration()
Specified by:
rebuildRuntimeConfiguration in interface Configuration

reload

public void reload(List<ConfigurationProvider> providers)
            throws ConfigurationException
Specified by:
reload in interface Configuration
Throws:
ConfigurationException

removePackageConfig

public void removePackageConfig(String name)
Specified by:
removePackageConfig in interface Configuration

getContainer

public Container getContainer()
Specified by:
getContainer in interface Configuration
Returns:
the container

getLoadedFileNames

public Set<String> getLoadedFileNames()
Specified by:
getLoadedFileNames in interface Configuration


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.