Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.opensymphony.xwork2.config
Class ConfigurationManager

    java.lang.Object
      com.opensymphony.xwork2.config.ConfigurationManager

    public class ConfigurationManager

extends java.lang.Object

ConfigurationManager - central for XWork Configuration management, including its ConfigurationProvider.

Version:
  $Date: 2011-02-02 22:13:23 +0100 (Wed, 02 Feb 2011) $ $Id: ConfigurationManager.java 1066628 2011-02-02 21:13:23Z jafl $
Author:
  Jason Carreira, tm_jee

Field Summary
`protected Configuration` | `configuration`
`protected java.lang.String` | `defaultFrameworkBeanName`
`protected static Logger` | `LOG`
`protected java.util.concurrent.locks.Lock` | `providerLock`

Constructor Summary
`ConfigurationManager()`
`ConfigurationManager(java.lang.String name)`

Method Summary
`void` | `addConfigurationProvider(ConfigurationProvider provider)` Deprecated. Since 2.1, use `#addContainerProvider()`
`void` | `addContainerProvider(ContainerProvider provider)` adds a configuration provider to the List of ConfigurationProviders.
`void` | `clearConfigurationProviders()` Deprecated. Since 2.1, use `clearContainerProviders()`
`void` | `clearContainerProviders()`
`void` | `conditionalReload()` Reloads the Configuration files if the configuration files indicate that they need to be reloaded.
`protected Configuration` | `createConfiguration(java.lang.String beanName)`
`void` | `destroyConfiguration()` Destroy its managing Configuration instance
`Configuration` | `getConfiguration()` Get the current XWork configuration object.
`java.util.List<ConfigurationProvider>` | `getConfigurationProviders()` Deprecated. Since 2.1, use `getContainerProviders()`
`java.util.List<ContainerProvider>` | `getContainerProviders()` Get the current list of ConfigurationProviders.
`void` | `reload()`
`void` | `setConfiguration(Configuration configuration)`
`void` | `setConfigurationProviders(java.util.List<ConfigurationProvider> configurationProviders)` Deprecated. Since 2.1, use `#setContainerProvider()`
`void` | `setContainerProviders(java.util.List<ContainerProvider> containerProviders)` Set the list of configuration providers

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LOG

    protected static final Logger LOG

### configuration

    protected Configuration configuration

### providerLock

    protected java.util.concurrent.locks.Lock providerLock

### defaultFrameworkBeanName

    protected java.lang.String defaultFrameworkBeanName

Constructor Detail

### ConfigurationManager

    public ConfigurationManager()

### ConfigurationManager

    public ConfigurationManager(java.lang.String name)

Method Detail

### getConfiguration

    public Configuration getConfiguration()

  Get the current XWork configuration object. By default an instance of DefaultConfiguration will be returned

  See Also:
    `DefaultConfiguration`

### createConfiguration

    protected Configuration createConfiguration(java.lang.String beanName)

### setConfiguration

    public void setConfiguration(Configuration configuration)

### getConfigurationProviders

    @Deprecated
    public java.util.List<ConfigurationProvider> getConfigurationProviders()

  Deprecated. Since 2.1, use `getContainerProviders()`

  Get the current list of ConfigurationProviders. If no custom ConfigurationProviders have been added, this method will return a list containing only the default ConfigurationProvider, XMLConfigurationProvider. if a custom ConfigurationProvider has been added, then the XmlConfigurationProvider must be added by hand.

  WARNING: This returns only ContainerProviders that can be cast into ConfigurationProviders

  Returns:
    the list of registered ConfigurationProvider objects
  See Also:
    `ConfigurationProvider`

### getContainerProviders

    public java.util.List<ContainerProvider> getContainerProviders()

  Get the current list of ConfigurationProviders. If no custom ConfigurationProviders have been added, this method will return a list containing only the default ConfigurationProvider, XMLConfigurationProvider. if a custom ConfigurationProvider has been added, then the XmlConfigurationProvider must be added by hand.

  TODO: the lazy instantiation of XmlConfigurationProvider should be refactored to be elsewhere. the behavior described above seems unintuitive.

  Returns:
    the list of registered ConfigurationProvider objects
  See Also:
    `ConfigurationProvider`

### setConfigurationProviders

    @Deprecated
    public void setConfigurationProviders(java.util.List<ConfigurationProvider> configurationProviders)

  Deprecated. Since 2.1, use `#setContainerProvider()`

  Set the list of configuration providers

  Parameters:
    `configurationProviders` -

### setContainerProviders

    public void setContainerProviders(java.util.List<ContainerProvider> containerProviders)

  Set the list of configuration providers

  Parameters:
    `containerProviders` -

### addConfigurationProvider

    @Deprecated
    public void addConfigurationProvider(ConfigurationProvider provider)

  Deprecated. Since 2.1, use `#addContainerProvider()`

  adds a configuration provider to the List of ConfigurationProviders. a given ConfigurationProvider may be added more than once

  Parameters:
    `provider` - the ConfigurationProvider to register

### addContainerProvider

    public void addContainerProvider(ContainerProvider provider)

  adds a configuration provider to the List of ConfigurationProviders. a given ConfigurationProvider may be added more than once

  Parameters:
    `provider` - the ConfigurationProvider to register

### clearConfigurationProviders

    @Deprecated
    public void clearConfigurationProviders()

  Deprecated. Since 2.1, use `clearContainerProviders()`

  clears the registered ConfigurationProviders. this method will call destroy() on each of the registered ConfigurationProviders

  See Also:
    `ContainerProvider.destroy()`

### clearContainerProviders

    public void clearContainerProviders()

### destroyConfiguration

    public void destroyConfiguration()

  Destroy its managing Configuration instance

### conditionalReload

    public void conditionalReload()

  Reloads the Configuration files if the configuration files indicate that they need to be reloaded.

### reload

    public void reload()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.