public interface ConfigurationManager
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:
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
static final String LOG_DEBUG_PROPERTY
static final boolean LOG_DEBUG
Configuration getConfiguration()
Component getComponent(String service)
service - the FQN of the service for which we want the configurationComponent getComponent(Class<?> clazz)
clazz - the Class of the service for which we want the configurationCollection<Component> getComponents()
void addConfiguration(String url) throws Exception
url - the url of the configuration to add, that we want to resolveException - if the configuration could not be found
or the url in String format could not be resolvedvoid addConfiguration(Collection<URL> urls)
URL corresponding to the location of the
configuration files to addurls - the URLs of configuration files to addvoid addConfiguration(URL url)
url - the url of the configuration to addURL getResource(String url, String defaultURL) throws Exception
URL of the resource file corresponding to the url provided in
String formatURL getResource(String url) throws Exception
URL of the resource file corresponding to the url provided in
String formatInputStream getInputStream(String url, String defaultURL) throws Exception
InputStream of the resource file corresponding to the url provided in
String formaturl - the url to resolvedefaultURL - The default URL to use in case the parameter url is null.InputStream of the resource fileException - if the String url could not be resolvedInputStream getInputStream(String url) throws Exception
InputStream of the resource file corresponding to the url provided in
String formaturl - the url to resolveInputStream of the resource fileException - if the String url could not be resolvedURL getURL(String uri) throws Exception
getResource(String)ExceptionCopyright © 2018 eXo Platform SAS. All Rights Reserved.