Save This Page
Home » xwork-2.1.5 » com.opensymphony » xwork2 » config » [javadoc | source]
com.opensymphony.xwork2.config
public class: ConfigurationManager [javadoc | source]
java.lang.Object
   com.opensymphony.xwork2.config.ConfigurationManager
ConfigurationManager - central for XWork Configuration management, including its ConfigurationProvider.
Field Summary
protected static final  Logger LOG     
protected  Configuration configuration     
protected  Lock providerLock     
protected  String defaultFrameworkBeanName     
Constructor:
 public ConfigurationManager() 
 public ConfigurationManager(String name) 
Method from com.opensymphony.xwork2.config.ConfigurationManager Summary:
addConfigurationProvider,   addContainerProvider,   clearConfigurationProviders,   clearContainerProviders,   conditionalReload,   destroyConfiguration,   getConfiguration,   getConfigurationProviders,   getContainerProviders,   reload,   setConfiguration,   setConfigurationProviders,   setContainerProviders
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.xwork2.config.ConfigurationManager Detail:
 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
 public  void addContainerProvider(ContainerProvider provider) 
    adds a configuration provider to the List of ConfigurationProviders. a given ConfigurationProvider may be added more than once
 public  void clearConfigurationProviders() 
Deprecated! Since - 2.1, use #clearContainerProviders()

    clears the registered ConfigurationProviders. this method will call destroy() on each of the registered ConfigurationProviders
 public  void clearContainerProviders() 
 public synchronized  void conditionalReload() 
    Reloads the Configuration files if the configuration files indicate that they need to be reloaded.
 public synchronized  void destroyConfiguration() 
    Destroy its managing Configuration instance
 public synchronized Configuration getConfiguration() 
    Get the current XWork configuration object. By default an instance of DefaultConfiguration will be returned
 public 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

 public 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.

 public synchronized  void reload() 
 public synchronized  void setConfiguration(Configuration configuration) 
 public  void setConfigurationProviders(List<ConfigurationProvider> configurationProviders) 
Deprecated! Since - 2.1, use #setContainerProvider()

    Set the list of configuration providers
 public  void setContainerProviders(List<ContainerProvider> containerProviders) 
    Set the list of configuration providers