Package org.apache.struts2.config.impl
Class DefaultConfiguration
java.lang.Object
org.apache.struts2.config.impl.DefaultConfiguration
- All Implemented Interfaces:
- Serializable,- Configuration
DefaultConfiguration
- Author:
- Jason Carreira Created Feb 24, 2003 7:38:06 AM
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Containerprotected Stringprotected static final org.apache.logging.log4j.Loggerprotected Map<String,PackageConfig> protected RuntimeConfigurationprotected List<UnknownHandlerConfig>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPackageConfig(String name, PackageConfig packageContext) static ContainerBuilderbootstrapFactories(ContainerBuilder builder) static ContainerBuilderbootstrapTypeConverters(ContainerBuilder builder) protected RuntimeConfigurationThis builds the internal runtime configuration used by Xwork for finding and configuring Actions from the programmatic configuration data structures.protected ContainercreateBootstrapContainer(List<ContainerProvider> providers) voiddestroy()Allows the configuration to clean up any resources usedgetPackageConfig(String name) The current runtime configuration.voidreloadContainer(List<ContainerProvider> providers) Calls the ConfigurationProviderFactory.getConfig() to tell it to reload the configuration and then calls buildRuntimeConfiguration().removePackageConfig(String packageName) Removes a package from the the list of packages.protected ActionContextsetContext(Container cont) voidsetUnknownHandlerStack(List<UnknownHandlerConfig> unknownHandlerStack) 
- 
Field Details- 
BOOTSTRAP_CONSTANTS
- 
LOGprotected static final org.apache.logging.log4j.Logger LOG
- 
packageContexts
- 
runtimeConfiguration
- 
container
- 
defaultFrameworkBeanName
- 
loadedFileNames
- 
unknownHandlerStack
 
- 
- 
Constructor Details- 
DefaultConfigurationpublic DefaultConfiguration()
- 
DefaultConfiguration
 
- 
- 
Method Details- 
getPackageConfig- Specified by:
- getPackageConfigin interface- Configuration
 
- 
getUnknownHandlerStack- Specified by:
- getUnknownHandlerStackin interface- Configuration
- Returns:
- list of unknown handlers
 
- 
setUnknownHandlerStack- Specified by:
- setUnknownHandlerStackin interface- Configuration
- Parameters:
- unknownHandlerStack- list of unknown handlers
 
- 
getPackageConfigNames- Specified by:
- getPackageConfigNamesin interface- Configuration
 
- 
getPackageConfigs- Specified by:
- getPackageConfigsin interface- Configuration
 
- 
getLoadedFileNames- Specified by:
- getLoadedFileNamesin 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
 
- 
getContainer- Specified by:
- getContainerin interface- Configuration
- Returns:
- the container
 
- 
addPackageConfig- Specified by:
- addPackageConfigin 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:
- packageName- the name of the package to remove
- Returns:
- the package removed (if any)
 
- 
destroypublic void destroy()Allows the configuration to clean up any resources used- Specified by:
- destroyin interface- Configuration
 
- 
rebuildRuntimeConfigurationpublic void rebuildRuntimeConfiguration()- Specified by:
- rebuildRuntimeConfigurationin interface- Configuration
 
- 
reloadContainerpublic List<PackageProvider> reloadContainer(List<ContainerProvider> providers) throws ConfigurationException Calls the ConfigurationProviderFactory.getConfig() to tell it to reload the configuration and then calls buildRuntimeConfiguration().- Specified by:
- reloadContainerin interface- Configuration
- Parameters:
- providers- list of ContainerProvider
- Returns:
- list of package providers
- Throws:
- ConfigurationException- in case of any configuration errors
 
- 
setContext
- 
createBootstrapContainer
- 
bootstrapFactories
- 
bootstrapTypeConverters
- 
buildRuntimeConfigurationThis builds the internal runtime configuration used by Xwork for finding and configuring Actions from the programmatic configuration data structures. All of the old runtime configuration will be discarded and rebuilt. It basically flattens the data structures to make the information easier to access. It will take an ActionConfigand combine its data with all inherited dast. For example, if theActionConfigis in a package that contains a global result and it also contains a result, the resultingActionConfigwill have two results.- Returns:
- runtime configuration
- Throws:
- ConfigurationException- in case of any configuration errors
 
 
-