com.opensymphony.xwork2.config.impl
Class MockConfiguration
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
unknownHandlerStack
protected List<UnknownHandlerConfig> unknownHandlerStack
MockConfiguration
public MockConfiguration()
selfRegister
public void selfRegister()
getPackageConfig
public PackageConfig getPackageConfig(String name)
- Specified by:
getPackageConfig
in interface Configuration
getPackageConfigNames
public Set<String> getPackageConfigNames()
- Specified by:
getPackageConfigNames
in interface Configuration
getPackageConfigs
public Map<String,PackageConfig> 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 PackageConfig removePackageConfig(String name)
- Description copied from interface:
Configuration
- Removes a package from the the list of packages. Changes to the configuration won't take effect until buildRuntimeConfiguration
is called.
- Specified by:
removePackageConfig
in interface Configuration
- Parameters:
name
- the name of the package to remove
- Returns:
- the package removed (if any)
getContainer
public Container getContainer()
- Specified by:
getContainer
in interface Configuration
- Returns:
- the container
getLoadedFileNames
public Set<String> getLoadedFileNames()
- Specified by:
getLoadedFileNames
in interface Configuration
reloadContainer
public List<PackageProvider> reloadContainer(List<ContainerProvider> containerProviders)
throws ConfigurationException
- Specified by:
reloadContainer
in interface Configuration
- Throws:
ConfigurationException
getUnknownHandlerStack
public List<UnknownHandlerConfig> getUnknownHandlerStack()
- Specified by:
getUnknownHandlerStack
in interface Configuration
- Returns:
- list of unknown handlers
setUnknownHandlerStack
public void setUnknownHandlerStack(List<UnknownHandlerConfig> unknownHandlerStack)
- Specified by:
setUnknownHandlerStack
in interface Configuration
Copyright © 2009 OpenSymphony. All Rights Reserved.