de.mindmatters.faces.spring.context.support
Class DefaultFacesWebApplicationContext
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.AbstractRefreshableApplicationContext
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext
org.springframework.web.context.support.XmlWebApplicationContext
de.mindmatters.faces.spring.factory.support.AbstractFacesWebApplicationContext
de.mindmatters.faces.spring.context.support.DefaultFacesWebApplicationContext
- All Implemented Interfaces:
- ApplicationContext, ApplicationEventPublisher, BeanFactory, ConfigurableApplicationContext, ConfigurableWebApplicationContext, DisposableBean, FacesWebApplicationContext, HierarchicalBeanFactory, ListableBeanFactory, MessageSource, ResourceLoader, ResourcePatternResolver, ThemeSource, WebApplicationContext
- public class DefaultFacesWebApplicationContext
- extends AbstractFacesWebApplicationContext
- implements FacesWebApplicationContext
Default implementation of the FacesWebApplicationContext interface.
Uses the
ManagedBeanDefinitionParser
and the
ScopedBeanDefinitionParser
for loading the configured BeanDefinitions.
A ScopedBeanStorage
may
also be supplied as a bean in the context, with the name "scopedBeanStorage";
else, scope storage resolution is delegated to a default implementation.
Uses and enables
DelegatingVariableResolver
as JSF VariableResolver. The DelegatingVariableResolver cares about bean
resolution from a view (e.g. a jsp resource).
- Author:
- Andreas Kuhrwahl
- See Also:
ContextLoader
,
ContextLoaderListener
,
ContextLoaderServlet
,
ManagedBeanDefinitionParser
,
ScopedBeanDefinitionParser
,
ManagedBeanFactory
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.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SCOPED_BEAN_STORAGE_BEAN_NAME
public static final java.lang.String SCOPED_BEAN_STORAGE_BEAN_NAME
- Name of the ScopedBeanStorage bean in the factory. If none is supplied,
storage resolution is done by a default implementation.
- See Also:
ScopedBeanStorage
,
Constant Field Values
DefaultFacesWebApplicationContext
public DefaultFacesWebApplicationContext()
createConfigurableBeanFactory
protected final DefaultConfigurableBeanFactory createConfigurableBeanFactory()
- Create the bean factory for this context.
- Specified by:
createConfigurableBeanFactory
in class AbstractFacesWebApplicationContext
- Returns:
- the bean factory for this context
- See Also:
DefaultConfigurableBeanFactory
,
AbstractApplicationContext.getInternalParentBeanFactory()
initBeanDefinitionReader
protected final void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader)
- Sets the parser-class of the
beanDefinitionReader
to the
ManagedBeanDefinitionParser
class.
- Parameters:
beanDefinitionReader
- the reader to initialize- See Also:
#initBeanDefinitionReader(org.springframework.beans.factory.xml.XmlBeanDefinitionReader)
,
ManagedBeanDefinitionParser
setFacesSpringConfigLocations
public final void setFacesSpringConfigLocations(java.lang.String[] facesSpringConfigLocations)
- Sets the config locations. Should be config files compatible with the
"spring-beans.dtd" respectively "jsf-spring-beans.dtd".
- Specified by:
setFacesSpringConfigLocations
in interface FacesWebApplicationContext
- Parameters:
facesSpringConfigLocations
- the config locations
loadBeanDefinitions
protected final void loadBeanDefinitions(XmlBeanDefinitionReader reader)
throws java.io.IOException
-
- Throws:
java.io.IOException
postProcessBeanFactory
protected final void postProcessBeanFactory(ConfigurableBeanFactory beanFactory)
- Hook method for postprocessing the internal bean factory.
- Overrides:
postProcessBeanFactory
in class AbstractFacesWebApplicationContext
- Parameters:
beanFactory
- the bean factory used by this application context- See Also:
ConfigurableBeanFactory
postProcessManagedBeanFactory
protected void postProcessManagedBeanFactory(ManagedBeanFactory managedBeanFactory)
- Hook method for postprocessing the internal used ManagedBeanFactory.
- Parameters:
managedBeanFactory
- internal BeanFactory
setManagedBeanFactoryClass
public final void setManagedBeanFactoryClass(java.lang.Class managedBeanFactoryClass)
- Sets the class for the internal used BeanFactory. The BeanFactory
must implement
ManagedBeanFactory
.
Usually the ManagedBeanFactory will be set by the ContextLoader.
- Specified by:
setManagedBeanFactoryClass
in interface FacesWebApplicationContext
- Parameters:
managedBeanFactoryClass
- the class of the internal BeanFactory- See Also:
ContextLoader.createFacesConfigWebApplicationContext(javax.servlet.ServletContext,
org.springframework.context.ApplicationContext)
Copyright © 2002 mindmatters GmbH & Co. KG