SourceForge.net Logo

de.mindmatters.faces.spring.factory.support
Class AbstractFacesWebApplicationContext

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 byde.mindmatters.faces.spring.factory.support.AbstractFacesWebApplicationContext
All Implemented Interfaces:
ApplicationContext, ApplicationEventPublisher, BeanFactory, ConfigurableApplicationContext, ConfigurableWebApplicationContext, DisposableBean, HierarchicalBeanFactory, ListableBeanFactory, MessageSource, ResourceLoader, ResourcePatternResolver, ThemeSource, WebApplicationContext
Direct Known Subclasses:
DefaultConfigWebApplicationContext, DefaultFacesWebApplicationContext

public abstract class AbstractFacesWebApplicationContext
extends XmlWebApplicationContext

Enables plug'n'play features for registering InstantiationProcessors for BeanFactories.

Uses DefaultConfigurableBeanFactory or subclasses as internal BeanFactory.

Based on XmlWebApplicationContext

Author:
Andreas Kuhrwahl
See Also:
InstantiationProcessor, ConfigurableBeanFactory

Field Summary
 
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_ALL_URL_PREFIX, CLASSPATH_URL_PREFIX
 
Constructor Summary
AbstractFacesWebApplicationContext()
           
 
Method Summary
protected  DefaultListableBeanFactory createBeanFactory()
          
protected abstract  DefaultConfigurableBeanFactory createConfigurableBeanFactory()
          Create the bean factory for this context.
protected  ConfigurableBeanFactory getConfigurableBeanFactory()
          Returns the internal bean factory.
protected  void postProcessBeanFactory(ConfigurableBeanFactory beanFactory)
          Hook method for postprocessing the internal bean factory.
protected  void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
          Registers the plugged instantiation processors.
 
Methods inherited from class org.springframework.web.context.support.XmlWebApplicationContext
getDefaultConfigLocations, initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions
 
Methods inherited from class org.springframework.web.context.support.AbstractRefreshableWebApplicationContext
getConfigLocations, getNamespace, getResourceByPath, getResourcePatternResolver, getServletContext, getTheme, onRefresh, refresh, setConfigLocations, setNamespace, setServletContext, toString
 
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext
getBeanFactory, refreshBeanFactory
 
Methods inherited from class org.springframework.context.support.AbstractApplicationContext
addBeanFactoryPostProcessor, addListener, close, containsBean, containsBeanDefinition, containsLocalBean, destroy, getAliases, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, 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, setClassLoader
 
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, 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
 

Constructor Detail

AbstractFacesWebApplicationContext

public AbstractFacesWebApplicationContext()
Method Detail

createBeanFactory

protected final DefaultListableBeanFactory createBeanFactory()


createConfigurableBeanFactory

protected abstract DefaultConfigurableBeanFactory createConfigurableBeanFactory()
Create the bean factory for this context.

Returns:
the bean factory for this context
See Also:
DefaultConfigurableBeanFactory, AbstractApplicationContext.getInternalParentBeanFactory()

getConfigurableBeanFactory

protected final ConfigurableBeanFactory getConfigurableBeanFactory()
Returns the internal bean factory.

Returns:
this application context's internal bean factory
Throws:
java.lang.IllegalStateException - if the context does not hold an internal bean factory yet (usually if refresh has never been called)
See Also:
AbstractApplicationContext.getBeanFactory()

postProcessBeanFactory

protected final void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
Registers the plugged instantiation processors.

Parameters:
beanFactory - the bean factory used by this application context
See Also:
#postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory)

postProcessBeanFactory

protected void postProcessBeanFactory(ConfigurableBeanFactory beanFactory)
Hook method for postprocessing the internal bean factory.

Parameters:
beanFactory - the bean factory used by this application context
Throws:
BeansException - in case of errors
See Also:
ConfigurableBeanFactory

SourceForge.net Logo

Copyright © 2002 mindmatters GmbH & Co. KG