org.apache.cocoon.spring
Class CocoonApplicationContext

java.lang.Object
  extended byorg.springframework.core.io.DefaultResourceLoader
      extended byorg.springframework.context.support.AbstractApplicationContext
          extended byorg.springframework.context.support.AbstractRefreshableApplicationContext
              extended byorg.springframework.web.context.support.AbstractRefreshableWebApplicationContext
                  extended byorg.springframework.web.context.support.XmlWebApplicationContext
                      extended byorg.apache.cocoon.spring.CocoonApplicationContext
All Implemented Interfaces:
org.springframework.context.ApplicationContext, org.springframework.context.ApplicationEventPublisher, org.springframework.beans.factory.BeanFactory, org.springframework.context.ConfigurableApplicationContext, org.springframework.web.context.ConfigurableWebApplicationContext, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.beans.factory.ListableBeanFactory, org.springframework.context.MessageSource, org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver, org.springframework.ui.context.ThemeSource, org.springframework.web.context.WebApplicationContext

public class CocoonApplicationContext
extends org.springframework.web.context.support.XmlWebApplicationContext

The application context implementation. By default we search the configuration at "conf/applicationContext.xml" in the sitemap directory.

Version:
$Id: CocoonApplicationContext.java 227209 2005-08-03 12:26:42Z cziegeler $

Field Summary
protected  String baseURL
           
static String DEFAULT_SPRING_CONFIG
           
protected  SourceResolver resolver
           
 
Fields inherited from class org.springframework.web.context.support.XmlWebApplicationContext
DEFAULT_CONFIG_LOCATION, DEFAULT_CONFIG_LOCATION_PREFIX, DEFAULT_CONFIG_LOCATION_SUFFIX
 
Fields inherited from class org.springframework.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME
 
Fields inherited from interface org.springframework.web.context.ConfigurableWebApplicationContext
CONFIG_LOCATION_DELIMITERS
 
Fields inherited from interface org.springframework.web.context.WebApplicationContext
ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
 
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
 
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_URL_PREFIX
 
Constructor Summary
CocoonApplicationContext()
           
 
Method Summary
protected  String[] getDefaultConfigLocations()
          The default location for the context is "conf/applicationContext.xml" which is searched relative to the current sitemap.
protected  org.springframework.core.io.Resource getResourceByPath(String path)
          Resolve file paths beneath the root of the web application.
 void setEnvironmentHelper(EnvironmentHelper eh)
           
 void setSourceResolver(SourceResolver aResolver)
           
 
Methods inherited from class org.springframework.web.context.support.XmlWebApplicationContext
initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions
 
Methods inherited from class org.springframework.web.context.support.AbstractRefreshableWebApplicationContext
getConfigLocations, getNamespace, getResourcePatternResolver, getServletContext, getTheme, onRefresh, postProcessBeanFactory, refresh, setConfigLocations, setNamespace, setServletContext, toString
 
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext
createBeanFactory, getBeanFactory, refreshBeanFactory
 
Methods inherited from class org.springframework.context.support.AbstractApplicationContext
addBeanFactoryPostProcessor, addListener, close, containsBean, containsBeanDefinition, getAliases, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, getBeansOfType, getBeansOfType, getDisplayName, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResources, getStartupDate, getType, isSingleton, publishEvent, setDisplayName, setParent
 
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
getClassLoader, getResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.context.ApplicationContext
getDisplayName, getParent, getStartupDate, publishEvent
 
Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory
containsBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames, getBeanNamesForType, getBeansOfType, getBeansOfType
 
Methods inherited from interface org.springframework.beans.factory.BeanFactory
containsBean, getAliases, getBean, getBean, getType, isSingleton
 
Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory
getParentBeanFactory
 
Methods inherited from interface org.springframework.context.MessageSource
getMessage, getMessage, getMessage
 
Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver
getResources
 
Methods inherited from interface org.springframework.core.io.ResourceLoader
getResource
 
Methods inherited from interface org.springframework.context.ConfigurableApplicationContext
addBeanFactoryPostProcessor, close, getBeanFactory, setParent
 

Field Detail

DEFAULT_SPRING_CONFIG

public static final String DEFAULT_SPRING_CONFIG
See Also:
Constant Field Values

resolver

protected SourceResolver resolver

baseURL

protected String baseURL
Constructor Detail

CocoonApplicationContext

public CocoonApplicationContext()
Method Detail

setSourceResolver

public void setSourceResolver(SourceResolver aResolver)

setEnvironmentHelper

public void setEnvironmentHelper(EnvironmentHelper eh)

getResourceByPath

protected org.springframework.core.io.Resource getResourceByPath(String path)
Resolve file paths beneath the root of the web application.

Note: Even if a given path starts with a slash, it will get interpreted as relative to the web application root directory (which is the way most servlet containers handle such paths).

See Also:
ServletContextResource

getDefaultConfigLocations

protected String[] getDefaultConfigLocations()
The default location for the context is "conf/applicationContext.xml" which is searched relative to the current sitemap.

Returns:
The default config locations if they exist otherwise an empty array.


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.