public class DefaultConfiguration extends Object implements Configuration
Modifier and Type | Field and Description |
---|---|
protected Container |
container |
protected String |
defaultFrameworkBeanName |
protected Set<String> |
loadedFileNames |
protected static org.apache.logging.log4j.Logger |
LOG |
protected Map<String,PackageConfig> |
packageContexts |
protected RuntimeConfiguration |
runtimeConfiguration |
protected List<UnknownHandlerConfig> |
unknownHandlerStack |
Constructor and Description |
---|
DefaultConfiguration() |
DefaultConfiguration(String defaultBeanName) |
Modifier and Type | Method and Description |
---|---|
void |
addPackageConfig(String name,
PackageConfig packageContext) |
protected RuntimeConfiguration |
buildRuntimeConfiguration()
This builds the internal runtime configuration used by Xwork for finding and configuring Actions from the
programmatic configuration data structures.
|
protected Container |
createBootstrapContainer(List<ContainerProvider> providers) |
void |
destroy()
Allows the configuration to clean up any resources used
|
Container |
getContainer() |
Set<String> |
getLoadedFileNames() |
PackageConfig |
getPackageConfig(String name) |
Set<String> |
getPackageConfigNames() |
Map<String,PackageConfig> |
getPackageConfigs() |
RuntimeConfiguration |
getRuntimeConfiguration()
The current runtime configuration.
|
List<UnknownHandlerConfig> |
getUnknownHandlerStack() |
void |
rebuildRuntimeConfiguration() |
List<PackageProvider> |
reloadContainer(List<ContainerProvider> providers)
Calls the ConfigurationProviderFactory.getConfig() to tell it to reload the configuration and then calls
buildRuntimeConfiguration().
|
PackageConfig |
removePackageConfig(String packageName)
Removes a package from the the list of packages.
|
protected ActionContext |
setContext(Container cont) |
void |
setUnknownHandlerStack(List<UnknownHandlerConfig> unknownHandlerStack) |
protected static final org.apache.logging.log4j.Logger LOG
protected Map<String,PackageConfig> packageContexts
protected RuntimeConfiguration runtimeConfiguration
protected Container container
protected String defaultFrameworkBeanName
protected List<UnknownHandlerConfig> unknownHandlerStack
public DefaultConfiguration()
public DefaultConfiguration(String defaultBeanName)
public PackageConfig getPackageConfig(String name)
getPackageConfig
in interface Configuration
public List<UnknownHandlerConfig> getUnknownHandlerStack()
getUnknownHandlerStack
in interface Configuration
public void setUnknownHandlerStack(List<UnknownHandlerConfig> unknownHandlerStack)
setUnknownHandlerStack
in interface Configuration
unknownHandlerStack
- list of unknown handlerspublic Set<String> getPackageConfigNames()
getPackageConfigNames
in interface Configuration
public Map<String,PackageConfig> getPackageConfigs()
getPackageConfigs
in interface Configuration
public Set<String> getLoadedFileNames()
getLoadedFileNames
in interface Configuration
public RuntimeConfiguration getRuntimeConfiguration()
Configuration
getRuntimeConfiguration
in interface Configuration
public Container getContainer()
getContainer
in interface Configuration
public void addPackageConfig(String name, PackageConfig packageContext)
addPackageConfig
in interface Configuration
public PackageConfig removePackageConfig(String packageName)
Configuration
removePackageConfig
in interface Configuration
packageName
- the name of the package to removepublic void destroy()
destroy
in interface Configuration
public void rebuildRuntimeConfiguration()
rebuildRuntimeConfiguration
in interface Configuration
public List<PackageProvider> reloadContainer(List<ContainerProvider> providers) throws ConfigurationException
reloadContainer
in interface Configuration
providers
- list of container providersConfigurationException
- in case of any configuration errorsprotected ActionContext setContext(Container cont)
protected Container createBootstrapContainer(List<ContainerProvider> providers)
protected RuntimeConfiguration buildRuntimeConfiguration() throws ConfigurationException
This 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 ActionConfig
and combine its data with all inherited dast. For example, if the ActionConfig
is in a package that contains a global result and it also contains a result, the resulting ActionConfig
will have two results.
ConfigurationException
- in case of any configuration errorsCopyright © 2000–2020 Apache Software Foundation. All rights reserved.