org.riotfamily.common.beans.config
Class ChildContextLoader

java.lang.Object
  extended by org.riotfamily.common.beans.config.ChildContextLoader
All Implemented Interfaces:
BeanNameAware, InitializingBean, ApplicationContextAware, ServletContextAware

public class ChildContextLoader
extends Object
implements InitializingBean, ApplicationContextAware, ServletContextAware, BeanNameAware

Convenience class that loads a child XmlWebApplicationContext. The loading can be skipped by setting setLoadContext(boolean) to false.

Use this class if you need to perform setup operations in your development environment, like the population of an in-memory database.

Since:
6.4
Author:
Felix Gnass [fgnass at neteye dot de]

Constructor Summary
ChildContextLoader()
           
 
Method Summary
 void afterPropertiesSet()
           
 ApplicationContext getContext()
           
 void setApplicationContext(ApplicationContext applicationContext)
           
 void setBeanName(String name)
           
 void setConfigLocations(String[] configLocations)
           
 void setLoadContext(boolean loadContext)
           
 void setServletContext(ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChildContextLoader

public ChildContextLoader()
Method Detail

setConfigLocations

public void setConfigLocations(String[] configLocations)

setLoadContext

public void setLoadContext(boolean loadContext)

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface ApplicationContextAware

setServletContext

public void setServletContext(ServletContext servletContext)
Specified by:
setServletContext in interface ServletContextAware

setBeanName

public void setBeanName(String name)
Specified by:
setBeanName in interface BeanNameAware

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

getContext

public ApplicationContext getContext()