eXo Kernel :: Container 2.5.0-GA

org.exoplatform.container.configuration
Class ConfigurationManagerImpl

java.lang.Object
  extended by org.exoplatform.container.configuration.ConfigurationManagerImpl
All Implemented Interfaces:
ConfigurationManager
Direct Known Subclasses:
MockConfigurationManagerImpl

public class ConfigurationManagerImpl
extends Object
implements ConfigurationManager

Jul 19, 2004


Field Summary
protected  Configuration configurations_
           
static String WAR_CONF_LOCATION
           
 
Fields inherited from interface org.exoplatform.container.configuration.ConfigurationManager
LOG_DEBUG, LOG_DEBUG_PROPERTY
 
Constructor Summary
ConfigurationManagerImpl()
           
ConfigurationManagerImpl(ClassLoader loader, Set<String> profiles)
           
ConfigurationManagerImpl(javax.servlet.ServletContext context, Set<String> profiles)
           
ConfigurationManagerImpl(Set<String> profiles)
           
ConfigurationManagerImpl(Set<String> profiles, boolean logEnabled)
           
 
Method Summary
 void addConfiguration(Collection<URL> urls)
          Adds a collection URL corresponding to the location of the configuration files to add
 void addConfiguration(javax.servlet.ServletContext context, String url)
           
 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
static URL getCurrentURL()
          Returns the URL of the current document being unmarshalled or null.
 InputStream getInputStream(String uri)
          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 uri)
          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 url)
          This method is equivalent to ConfigurationManager.getResource(String)
 boolean isValidateSchema()
           
 void processRemoveConfiguration()
           
protected  String removePrefix(String prefix, String url)
           
 void setValidateSchema(boolean validateSchema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAR_CONF_LOCATION

public static final String WAR_CONF_LOCATION
See Also:
Constant Field Values

configurations_

protected Configuration configurations_
Constructor Detail

ConfigurationManagerImpl

public ConfigurationManagerImpl()

ConfigurationManagerImpl

public ConfigurationManagerImpl(Set<String> profiles)

ConfigurationManagerImpl

public ConfigurationManagerImpl(Set<String> profiles,
                                boolean logEnabled)

ConfigurationManagerImpl

public ConfigurationManagerImpl(javax.servlet.ServletContext context,
                                Set<String> profiles)

ConfigurationManagerImpl

public ConfigurationManagerImpl(ClassLoader loader,
                                Set<String> profiles)
Method Detail

getCurrentURL

public static URL getCurrentURL()
Returns the URL of the current document being unmarshalled or null.

Returns:
the URL

getConfiguration

public Configuration getConfiguration()
Description copied from interface: ConfigurationManager
Gives the entire configuration

Specified by:
getConfiguration in interface ConfigurationManager

addConfiguration

public void addConfiguration(javax.servlet.ServletContext context,
                             String url)
                      throws Exception
Throws:
Exception

addConfiguration

public void addConfiguration(String url)
                      throws Exception
Description copied from interface: ConfigurationManager
Adds a new location of a configuration file

Specified by:
addConfiguration in interface ConfigurationManager
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

public void addConfiguration(Collection<URL> urls)
Description copied from interface: ConfigurationManager
Adds a collection URL corresponding to the location of the configuration files to add

Specified by:
addConfiguration in interface ConfigurationManager
Parameters:
urls - the URLs of configuration files to add

addConfiguration

public void addConfiguration(URL url)
Description copied from interface: ConfigurationManager
Adds a new location of a configuration file

Specified by:
addConfiguration in interface ConfigurationManager
Parameters:
url - the url of the configuration to add

processRemoveConfiguration

public void processRemoveConfiguration()

getComponent

public Component getComponent(String service)
Description copied from interface: ConfigurationManager
Gives the component configuration of a given service

Specified by:
getComponent in interface ConfigurationManager
Parameters:
service - the FQN of the service for which we want the configuration

getComponent

public Component getComponent(Class<?> clazz)
Description copied from interface: ConfigurationManager
Gives the component configuration of a given service

Specified by:
getComponent in interface ConfigurationManager
Parameters:
clazz - the Class of the service for which we want the configuration

getComponents

public Collection<Component> getComponents()
Description copied from interface: ConfigurationManager
Gives the configuration of all the registered components

Specified by:
getComponents in interface ConfigurationManager

isValidateSchema

public boolean isValidateSchema()

setValidateSchema

public void setValidateSchema(boolean validateSchema)

getResource

public URL getResource(String url,
                       String defaultURL)
                throws Exception
Description copied from interface: ConfigurationManager
Gives the URL of the resource file corresponding to the url provided in String format

Specified by:
getResource in interface ConfigurationManager
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

public URL getResource(String uri)
                throws Exception
Description copied from interface: ConfigurationManager
Gives the URL of the resource file corresponding to the url provided in String format

Specified by:
getResource in interface ConfigurationManager
Parameters:
uri - the url to resolve
Returns:
The URL representing the String url to resolve
Throws:
Exception - if the String url could not be resolved

getInputStream

public InputStream getInputStream(String url,
                                  String defaultURL)
                           throws Exception
Description copied from interface: ConfigurationManager
Gives the InputStream of the resource file corresponding to the url provided in String format

Specified by:
getInputStream in interface ConfigurationManager
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

public InputStream getInputStream(String uri)
                           throws Exception
Description copied from interface: ConfigurationManager
Gives the InputStream of the resource file corresponding to the url provided in String format

Specified by:
getInputStream in interface ConfigurationManager
Parameters:
uri - the url to resolve
Returns:
The InputStream of the resource file
Throws:
Exception - if the String url could not be resolved

getURL

public URL getURL(String url)
           throws Exception
Description copied from interface: ConfigurationManager
This method is equivalent to ConfigurationManager.getResource(String)

Specified by:
getURL in interface ConfigurationManager
Throws:
Exception

removePrefix

protected String removePrefix(String prefix,
                              String url)

eXo Kernel :: Container 2.5.0-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.