Package org.apache.struts2.config.impl
Class MockConfiguration
java.lang.Object
org.apache.struts2.config.impl.MockConfiguration
- All Implemented Interfaces:
- Serializable,- Configuration
Simple configuration used for unit testing
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPackageConfig(String name, PackageConfig packageContext) voiddestroy()Allow the Configuration to clean up any resources that have been used.getPackageConfig(String name) The current runtime configuration.voidreloadContainer(List<ContainerProvider> containerProviders) removePackageConfig(String name) Removes a package from the the list of packages.voidvoidsetUnknownHandlerStack(List<UnknownHandlerConfig> unknownHandlerStack) 
- 
Field Details- 
unknownHandlerStack
 
- 
- 
Constructor Details- 
MockConfigurationpublic MockConfiguration()
 
- 
- 
Method Details- 
selfRegisterpublic void selfRegister()
- 
getPackageConfig- Specified by:
- getPackageConfigin interface- Configuration
 
- 
getPackageConfigNames- Specified by:
- getPackageConfigNamesin interface- Configuration
 
- 
getPackageConfigs- Specified by:
- getPackageConfigsin interface- Configuration
 
- 
getRuntimeConfigurationDescription copied from interface:ConfigurationThe 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:
- getRuntimeConfigurationin interface- Configuration
- Returns:
- the current runtime configuration
 
- 
addPackageConfig- Specified by:
- addPackageConfigin interface- Configuration
 
- 
destroypublic void destroy()Description copied from interface:ConfigurationAllow the Configuration to clean up any resources that have been used.- Specified by:
- destroyin interface- Configuration
 
- 
rebuildRuntimeConfigurationpublic void rebuildRuntimeConfiguration()- Specified by:
- rebuildRuntimeConfigurationin interface- Configuration
 
- 
removePackageConfigDescription copied from interface:ConfigurationRemoves a package from the the list of packages. Changes to the configuration won't take effect until buildRuntimeConfiguration is called.- Specified by:
- removePackageConfigin interface- Configuration
- Parameters:
- name- the name of the package to remove
- Returns:
- the package removed (if any)
 
- 
getContainer- Specified by:
- getContainerin interface- Configuration
- Returns:
- the container
 
- 
getLoadedFileNames- Specified by:
- getLoadedFileNamesin interface- Configuration
 
- 
reloadContainerpublic List<PackageProvider> reloadContainer(List<ContainerProvider> containerProviders) throws ConfigurationException - Specified by:
- reloadContainerin interface- Configuration
- Parameters:
- containerProviders- list of container providers
- Returns:
- list of package providers
- Throws:
- ConfigurationException- in case of any configuration errors
 
- 
getUnknownHandlerStack- Specified by:
- getUnknownHandlerStackin interface- Configuration
- Returns:
- list of unknown handlers
 
- 
setUnknownHandlerStack- Specified by:
- setUnknownHandlerStackin interface- Configuration
- Parameters:
- unknownHandlerStack- list of unknown handlers
 
 
-