eXo Kernel :: Container 2.5.0-GA

org.exoplatform.container.configuration
Interface ConfigurationManager

All Known Implementing Classes:
ConfigurationManagerImpl, MockConfigurationManagerImpl

public interface ConfigurationManager

The ConfigurationManager is the component allowing to access to the configuration of a given eXo container. We have one instance of ConfigurationManager per eXo container. All the url provided in String format can use the next prefixes:


Field Summary
static boolean LOG_DEBUG
          Constant that indicates whether the logger of the configuration must be in debug more or not.
static String LOG_DEBUG_PROPERTY
          The name of the system property that indicates whether the logger of the configuration must be in debug more or not.
 
Method Summary
 void addConfiguration(Collection<URL> urls)
          Adds a collection URL corresponding to the location of the configuration files to add
 void addConfiguration(String url)
          Adds a new location of a configuration file
 void addConfiguration(URL url)
          Adds a new location of a configuration file
 Component getComponent(Class<?> clazz)
          Gives the component configuration of a given service
 Component getComponent(String service)
          Gives the component configuration of a given service
 Collection<Component> getComponents()
          Gives the configuration of all the registered components
 Configuration getConfiguration()
          Gives the entire configuration
 InputStream getInputStream(String url)
          Gives the InputStream of the resource file corresponding to the url provided in String format
 InputStream getInputStream(String url, String defaultURL)
          Gives the InputStream of the resource file corresponding to the url provided in String format
 URL getResource(String url)
          Gives the URL of the resource file corresponding to the url provided in String format
 URL getResource(String url, String defaultURL)
          Gives the URL of the resource file corresponding to the url provided in String format
 URL getURL(String uri)
          This method is equivalent to getResource(String)
 

Field Detail

LOG_DEBUG_PROPERTY

static final String LOG_DEBUG_PROPERTY
The name of the system property that indicates whether the logger of the configuration must be in debug more or not.

See Also:
Constant Field Values

LOG_DEBUG

static final boolean LOG_DEBUG
Constant that indicates whether the logger of the configuration must be in debug more or not.

Method Detail

getConfiguration

Configuration getConfiguration()
Gives the entire configuration


getComponent

Component getComponent(String service)
Gives the component configuration of a given service

Parameters:
service - the FQN of the service for which we want the configuration

getComponent

Component getComponent(Class<?> clazz)
Gives the component configuration of a given service

Parameters:
clazz - the Class of the service for which we want the configuration

getComponents

Collection<Component> getComponents()
Gives the configuration of all the registered components


addConfiguration

void addConfiguration(String url)
                      throws Exception
Adds a new location of a configuration file

Parameters:
url - the url of the configuration to add, that we want to resolve
Throws:
Exception - if the configuration could not be found or the url in String format could not be resolved

addConfiguration

void addConfiguration(Collection<URL> urls)
Adds a collection URL corresponding to the location of the configuration files to add

Parameters:
urls - the URLs of configuration files to add

addConfiguration

void addConfiguration(URL url)
Adds a new location of a configuration file

Parameters:
url - the url of the configuration to add

getResource

URL getResource(String url,
                String defaultURL)
                throws Exception
Gives the URL of the resource file corresponding to the url provided in String format

Parameters:
url - the url to resolve
defaultURL - The default URL to use in case the parameter url is null.
Returns:
The URL representing the String url to resolve
Throws:
Exception - if the String url could not be resolved

getResource

URL getResource(String url)
                throws Exception
Gives the URL of the resource file corresponding to the url provided in String format

Parameters:
url - the url to resolve
Returns:
The URL representing the String url to resolve
Throws:
Exception - if the String url could not be resolved

getInputStream

InputStream getInputStream(String url,
                           String defaultURL)
                           throws Exception
Gives the InputStream of the resource file corresponding to the url provided in String format

Parameters:
url - the url to resolve
defaultURL - The default URL to use in case the parameter url is null.
Returns:
The InputStream of the resource file
Throws:
Exception - if the String url could not be resolved

getInputStream

InputStream getInputStream(String url)
                           throws Exception
Gives the InputStream of the resource file corresponding to the url provided in String format

Parameters:
url - the url to resolve
Returns:
The InputStream of the resource file
Throws:
Exception - if the String url could not be resolved

getURL

URL getURL(String uri)
           throws Exception
This method is equivalent to getResource(String)

Throws:
Exception

eXo Kernel :: Container 2.5.0-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.