public class DefaultConfiguration extends Object implements Configuration
Modifier and Type | Field and Description |
---|---|
static Map<String,Object> |
BOOTSTRAP_CONSTANTS |
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) |
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 ContainerProviderConfigurationException
- in case of any configuration errorsprotected ActionContext setContext(Container cont)
protected Container createBootstrapContainer(List<ContainerProvider> providers)
public static ContainerBuilder bootstrapFactories(ContainerBuilder builder)
public static ContainerBuilder bootstrapTypeConverters(ContainerBuilder builder)
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–2024 Apache Software Foundation. All rights reserved.