|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration
public class DefaultRuntimeSpringConfiguration
A programmable runtime Spring configuration that allows a spring ApplicationContext to be constructed at runtime. Credit must go to Solomon Duskis and the article: http://jroller.com/page/Solomon?entry=programmatic_configuration_in_spring
Field Summary | |
---|---|
protected java.util.Map |
aliases
|
protected ListableBeanFactory |
beanFactory
|
protected java.lang.ClassLoader |
classLoader
|
protected GenericApplicationContext |
context
|
protected ApplicationContext |
parent
|
Constructor Summary | |
DefaultRuntimeSpringConfiguration()
|
|
DefaultRuntimeSpringConfiguration(ApplicationContext parent)
|
|
DefaultRuntimeSpringConfiguration(ApplicationContext parent, java.lang.ClassLoader cl)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected java.util.Map aliases
protected ListableBeanFactory beanFactory
protected java.lang.ClassLoader classLoader
protected GenericApplicationContext context
protected ApplicationContext parent
Constructor Detail |
---|
public DefaultRuntimeSpringConfiguration()
public DefaultRuntimeSpringConfiguration(ApplicationContext parent)
public DefaultRuntimeSpringConfiguration(ApplicationContext parent, java.lang.ClassLoader cl)
Method Detail |
---|
public BeanConfiguration addAbstractBean(java.lang.String name)
public void addAlias(java.lang.String alias, java.lang.String beanName)
public void addBeanConfiguration(java.lang.String beanName, BeanConfiguration beanConfiguration)
public void addBeanDefinition(java.lang.String name, BeanDefinition bd)
public BeanConfiguration addPrototypeBean(java.lang.String name, @SuppressWarnings("rawtypes") java.lang.Class clazz)
public BeanConfiguration addPrototypeBean(java.lang.String name)
public BeanConfiguration addSingletonBean(java.lang.String name, @SuppressWarnings("rawtypes") java.lang.Class clazz)
public BeanConfiguration addSingletonBean(java.lang.String name)
@SuppressWarnings("rawtypes") public BeanConfiguration addSingletonBean(java.lang.String name, java.lang.Class clazz, java.util.Collection args)
public boolean containsBean(java.lang.String name)
protected GenericApplicationContext createApplicationContext(ApplicationContext parentCtx)
parent
- The parent ApplicationContext instance. Can be null.
public AbstractBeanDefinition createBeanDefinition(java.lang.String name)
public BeanConfiguration createPrototypeBean(java.lang.String name)
public BeanConfiguration createSingletonBean(@SuppressWarnings("rawtypes") java.lang.Class clazz)
@SuppressWarnings("rawtypes") public BeanConfiguration createSingletonBean(java.lang.Class clazz, java.util.Collection constructorArguments)
public BeanConfiguration createSingletonBean(java.lang.String name)
public ApplicationContext getApplicationContext()
public BeanConfiguration getBeanConfig(java.lang.String name)
public BeanDefinition getBeanDefinition(java.lang.String beanName)
public java.util.List getBeanNames()
public ApplicationContext getUnrefreshedApplicationContext()
protected void initialiseApplicationContext()
public void registerBeansWithConfig(RuntimeSpringConfiguration targetSpringConfig)
public void registerBeansWithContext(GenericApplicationContext applicationContext)
public void registerBeansWithRegistry(BeanDefinitionRegistry registry)
public void registerPostProcessor(BeanFactoryPostProcessor processor)
public void setBeanFactory(ListableBeanFactory beanFactory)
Groovy Documentation