Groovy Documentation

org.codehaus.griffon.runtime.spring
[Java] Class GriffonApplicationContext

java.lang.Object
  org.springframework.core.io.DefaultResourceLoader
      org.springframework.context.support.AbstractApplicationContext
          org.springframework.context.support.GenericApplicationContext
              org.codehaus.griffon.runtime.spring.GriffonApplicationContext
All Implemented Interfaces:
GroovyObject

public class GriffonApplicationContext
extends org.springframework.context.support.GenericApplicationContext

An ApplicationContext that extends StaticApplicationContext and implements GroovyObject such that beans can be retrieved with the dot de-reference syntax instead of using getBean('name')

Authors:
Graeme Rocher
Since:
1.0

Created: Nov 23, 2007


Field Summary
private org.springframework.beans.BeanWrapper ctxBean

protected MetaClass metaClass

private org.springframework.ui.context.ThemeSource themeSource

 
Fields inherited from class org.springframework.context.support.GenericApplicationContext
MESSAGE_SOURCE_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, APPLICATION_EVENT_MULTICASTER_BEAN_NAME, CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, FACTORY_BEAN_PREFIX, CLASSPATH_ALL_URL_PREFIX, CLASSPATH_URL_PREFIX
 
Fields inherited from class org.springframework.context.support.AbstractApplicationContext
MESSAGE_SOURCE_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, APPLICATION_EVENT_MULTICASTER_BEAN_NAME, CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, FACTORY_BEAN_PREFIX, CLASSPATH_ALL_URL_PREFIX, CLASSPATH_URL_PREFIX
 
Constructor Summary
GriffonApplicationContext(org.springframework.beans.factory.support.DefaultListableBeanFactory defaultListableBeanFactory)

GriffonApplicationContext(org.springframework.beans.factory.support.DefaultListableBeanFactory defaultListableBeanFactory, org.springframework.context.ApplicationContext applicationContext)

GriffonApplicationContext(org.springframework.context.ApplicationContext parent)

GriffonApplicationContext()

 
Method Summary
MetaClass getMetaClass()

Object getProperty(String property)

org.springframework.ui.context.Theme getTheme(String themeName)

Object invokeMethod(String name, Object args)

protected void onRefresh()

Initialize the theme capability.

void registerPrototype(String name, Class clazz)

Register a prototype bean with the underlying bean factory.

void registerPrototype(String name, Class clazz, org.springframework.beans.MutablePropertyValues pvs)

Register a prototype bean with the underlying bean factory.

void registerSingleton(String name, Class clazz)

Register a singleton bean with the underlying bean factory.

void registerSingleton(String name, Class clazz, org.springframework.beans.MutablePropertyValues pvs)

Register a singleton bean with the underlying bean factory.

void setMetaClass(MetaClass metaClass)

void setProperty(String property, Object newValue)

 
Methods inherited from class org.springframework.context.support.GenericApplicationContext
org.springframework.context.support.GenericApplicationContext#getResource(java.lang.String), org.springframework.context.support.GenericApplicationContext#getResources(java.lang.String), org.springframework.context.support.GenericApplicationContext#setParent(org.springframework.context.ApplicationContext), org.springframework.context.support.GenericApplicationContext#setResourceLoader(org.springframework.core.io.ResourceLoader), org.springframework.context.support.GenericApplicationContext#setId(java.lang.String), org.springframework.context.support.GenericApplicationContext#getBeanDefinition(java.lang.String), org.springframework.context.support.GenericApplicationContext#getBeanFactory(), org.springframework.context.support.GenericApplicationContext#removeBeanDefinition(java.lang.String), org.springframework.context.support.GenericApplicationContext#registerBeanDefinition(java.lang.String, org.springframework.beans.factory.config.BeanDefinition), org.springframework.context.support.GenericApplicationContext#registerAlias(java.lang.String, java.lang.String), org.springframework.context.support.GenericApplicationContext#getDefaultListableBeanFactory(), org.springframework.context.support.GenericApplicationContext#setAllowBeanDefinitionOverriding(boolean), org.springframework.context.support.GenericApplicationContext#setAllowCircularReferences(boolean), org.springframework.context.support.GenericApplicationContext#isBeanNameInUse(java.lang.String), org.springframework.context.support.GenericApplicationContext#removeAlias(java.lang.String), org.springframework.context.support.GenericApplicationContext#isAlias(java.lang.String), org.springframework.context.support.GenericApplicationContext#toString(), org.springframework.context.support.GenericApplicationContext#getParent(), org.springframework.context.support.GenericApplicationContext#getMessage(java.lang.String, [Ljava.lang.Object;, java.lang.String, java.util.Locale), org.springframework.context.support.GenericApplicationContext#getMessage(org.springframework.context.MessageSourceResolvable, java.util.Locale), org.springframework.context.support.GenericApplicationContext#getMessage(java.lang.String, [Ljava.lang.Object;, java.util.Locale), org.springframework.context.support.GenericApplicationContext#start(), org.springframework.context.support.GenericApplicationContext#stop(), org.springframework.context.support.GenericApplicationContext#destroy(), org.springframework.context.support.GenericApplicationContext#getId(), org.springframework.context.support.GenericApplicationContext#close(), org.springframework.context.support.GenericApplicationContext#getType(java.lang.String), org.springframework.context.support.GenericApplicationContext#registerShutdownHook(), org.springframework.context.support.GenericApplicationContext#getDisplayName(), org.springframework.context.support.GenericApplicationContext#getAliases(java.lang.String), org.springframework.context.support.GenericApplicationContext#refresh(), org.springframework.context.support.GenericApplicationContext#getEnvironment(), org.springframework.context.support.GenericApplicationContext#getEnvironment(), org.springframework.context.support.GenericApplicationContext#setEnvironment(org.springframework.core.env.ConfigurableEnvironment), org.springframework.context.support.GenericApplicationContext#getApplicationName(), org.springframework.context.support.GenericApplicationContext#isRunning(), org.springframework.context.support.GenericApplicationContext#isActive(), org.springframework.context.support.GenericApplicationContext#setDisplayName(java.lang.String), org.springframework.context.support.GenericApplicationContext#getBeanDefinitionNames(), org.springframework.context.support.GenericApplicationContext#containsBean(java.lang.String), org.springframework.context.support.GenericApplicationContext#isSingleton(java.lang.String), org.springframework.context.support.GenericApplicationContext#getBean(java.lang.String, java.lang.Class), org.springframework.context.support.GenericApplicationContext#getBean(java.lang.String), org.springframework.context.support.GenericApplicationContext#getBean(java.lang.Class), org.springframework.context.support.GenericApplicationContext#getBean(java.lang.String, [Ljava.lang.Object;), org.springframework.context.support.GenericApplicationContext#addBeanFactoryPostProcessor(org.springframework.beans.factory.config.BeanFactoryPostProcessor), org.springframework.context.support.GenericApplicationContext#containsBeanDefinition(java.lang.String), org.springframework.context.support.GenericApplicationContext#getStartupDate(), org.springframework.context.support.GenericApplicationContext#getAutowireCapableBeanFactory(), org.springframework.context.support.GenericApplicationContext#getBeanDefinitionCount(), org.springframework.context.support.GenericApplicationContext#getBeanNamesForType(java.lang.Class), org.springframework.context.support.GenericApplicationContext#getBeanNamesForType(java.lang.Class, boolean, boolean), org.springframework.context.support.GenericApplicationContext#getBeansOfType(java.lang.Class), org.springframework.context.support.GenericApplicationContext#getBeansOfType(java.lang.Class, boolean, boolean), org.springframework.context.support.GenericApplicationContext#getBeansWithAnnotation(java.lang.Class), org.springframework.context.support.GenericApplicationContext#findAnnotationOnBean(java.lang.String, java.lang.Class), org.springframework.context.support.GenericApplicationContext#isPrototype(java.lang.String), org.springframework.context.support.GenericApplicationContext#isTypeMatch(java.lang.String, java.lang.Class), org.springframework.context.support.GenericApplicationContext#getParentBeanFactory(), org.springframework.context.support.GenericApplicationContext#containsLocalBean(java.lang.String), org.springframework.context.support.GenericApplicationContext#publishEvent(org.springframework.context.ApplicationEvent), org.springframework.context.support.GenericApplicationContext#getBeanFactoryPostProcessors(), org.springframework.context.support.GenericApplicationContext#addApplicationListener(org.springframework.context.ApplicationListener), org.springframework.context.support.GenericApplicationContext#getApplicationListeners(), org.springframework.context.support.GenericApplicationContext#getClassLoader(), org.springframework.context.support.GenericApplicationContext#setClassLoader(java.lang.ClassLoader), org.springframework.context.support.GenericApplicationContext#wait(), org.springframework.context.support.GenericApplicationContext#wait(long), org.springframework.context.support.GenericApplicationContext#wait(long, int), org.springframework.context.support.GenericApplicationContext#equals(java.lang.Object), org.springframework.context.support.GenericApplicationContext#hashCode(), org.springframework.context.support.GenericApplicationContext#getClass(), org.springframework.context.support.GenericApplicationContext#notify(), org.springframework.context.support.GenericApplicationContext#notifyAll()
 
Methods inherited from class org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.AbstractApplicationContext#toString(), org.springframework.context.support.AbstractApplicationContext#getResources(java.lang.String), org.springframework.context.support.AbstractApplicationContext#getParent(), org.springframework.context.support.AbstractApplicationContext#getMessage(java.lang.String, [Ljava.lang.Object;, java.lang.String, java.util.Locale), org.springframework.context.support.AbstractApplicationContext#getMessage(org.springframework.context.MessageSourceResolvable, java.util.Locale), org.springframework.context.support.AbstractApplicationContext#getMessage(java.lang.String, [Ljava.lang.Object;, java.util.Locale), org.springframework.context.support.AbstractApplicationContext#start(), org.springframework.context.support.AbstractApplicationContext#stop(), org.springframework.context.support.AbstractApplicationContext#destroy(), org.springframework.context.support.AbstractApplicationContext#getId(), org.springframework.context.support.AbstractApplicationContext#close(), org.springframework.context.support.AbstractApplicationContext#getType(java.lang.String), org.springframework.context.support.AbstractApplicationContext#setParent(org.springframework.context.ApplicationContext), org.springframework.context.support.AbstractApplicationContext#registerShutdownHook(), org.springframework.context.support.AbstractApplicationContext#getDisplayName(), org.springframework.context.support.AbstractApplicationContext#getAliases(java.lang.String), org.springframework.context.support.AbstractApplicationContext#refresh(), org.springframework.context.support.AbstractApplicationContext#getEnvironment(), org.springframework.context.support.AbstractApplicationContext#getEnvironment(), org.springframework.context.support.AbstractApplicationContext#setEnvironment(org.springframework.core.env.ConfigurableEnvironment), org.springframework.context.support.AbstractApplicationContext#getApplicationName(), org.springframework.context.support.AbstractApplicationContext#isRunning(), org.springframework.context.support.AbstractApplicationContext#isActive(), org.springframework.context.support.AbstractApplicationContext#setDisplayName(java.lang.String), org.springframework.context.support.AbstractApplicationContext#setId(java.lang.String), org.springframework.context.support.AbstractApplicationContext#getBeanDefinitionNames(), org.springframework.context.support.AbstractApplicationContext#containsBean(java.lang.String), org.springframework.context.support.AbstractApplicationContext#getBeanFactory(), org.springframework.context.support.AbstractApplicationContext#isSingleton(java.lang.String), org.springframework.context.support.AbstractApplicationContext#getBean(java.lang.String, java.lang.Class), org.springframework.context.support.AbstractApplicationContext#getBean(java.lang.String), org.springframework.context.support.AbstractApplicationContext#getBean(java.lang.Class), org.springframework.context.support.AbstractApplicationContext#getBean(java.lang.String, [Ljava.lang.Object;), org.springframework.context.support.AbstractApplicationContext#addBeanFactoryPostProcessor(org.springframework.beans.factory.config.BeanFactoryPostProcessor), org.springframework.context.support.AbstractApplicationContext#containsBeanDefinition(java.lang.String), org.springframework.context.support.AbstractApplicationContext#getStartupDate(), org.springframework.context.support.AbstractApplicationContext#getAutowireCapableBeanFactory(), org.springframework.context.support.AbstractApplicationContext#getBeanDefinitionCount(), org.springframework.context.support.AbstractApplicationContext#getBeanNamesForType(java.lang.Class), org.springframework.context.support.AbstractApplicationContext#getBeanNamesForType(java.lang.Class, boolean, boolean), org.springframework.context.support.AbstractApplicationContext#getBeansOfType(java.lang.Class), org.springframework.context.support.AbstractApplicationContext#getBeansOfType(java.lang.Class, boolean, boolean), org.springframework.context.support.AbstractApplicationContext#getBeansWithAnnotation(java.lang.Class), org.springframework.context.support.AbstractApplicationContext#findAnnotationOnBean(java.lang.String, java.lang.Class), org.springframework.context.support.AbstractApplicationContext#isPrototype(java.lang.String), org.springframework.context.support.AbstractApplicationContext#isTypeMatch(java.lang.String, java.lang.Class), org.springframework.context.support.AbstractApplicationContext#getParentBeanFactory(), org.springframework.context.support.AbstractApplicationContext#containsLocalBean(java.lang.String), org.springframework.context.support.AbstractApplicationContext#publishEvent(org.springframework.context.ApplicationEvent), org.springframework.context.support.AbstractApplicationContext#getBeanFactoryPostProcessors(), org.springframework.context.support.AbstractApplicationContext#addApplicationListener(org.springframework.context.ApplicationListener), org.springframework.context.support.AbstractApplicationContext#getApplicationListeners(), org.springframework.context.support.AbstractApplicationContext#getClassLoader(), org.springframework.context.support.AbstractApplicationContext#getResource(java.lang.String), org.springframework.context.support.AbstractApplicationContext#setClassLoader(java.lang.ClassLoader), org.springframework.context.support.AbstractApplicationContext#wait(), org.springframework.context.support.AbstractApplicationContext#wait(long), org.springframework.context.support.AbstractApplicationContext#wait(long, int), org.springframework.context.support.AbstractApplicationContext#equals(java.lang.Object), org.springframework.context.support.AbstractApplicationContext#hashCode(), org.springframework.context.support.AbstractApplicationContext#getClass(), org.springframework.context.support.AbstractApplicationContext#notify(), org.springframework.context.support.AbstractApplicationContext#notifyAll()
 

Field Detail

ctxBean

private org.springframework.beans.BeanWrapper ctxBean


metaClass

protected MetaClass metaClass


themeSource

private org.springframework.ui.context.ThemeSource themeSource


 
Constructor Detail

GriffonApplicationContext

public GriffonApplicationContext(org.springframework.beans.factory.support.DefaultListableBeanFactory defaultListableBeanFactory)


GriffonApplicationContext

public GriffonApplicationContext(org.springframework.beans.factory.support.DefaultListableBeanFactory defaultListableBeanFactory, org.springframework.context.ApplicationContext applicationContext)


GriffonApplicationContext

public GriffonApplicationContext(org.springframework.context.ApplicationContext parent)


GriffonApplicationContext

public GriffonApplicationContext()


 
Method Detail

getMetaClass

public MetaClass getMetaClass()


getProperty

public Object getProperty(String property)


getTheme

public org.springframework.ui.context.Theme getTheme(String themeName)


invokeMethod

public Object invokeMethod(String name, Object args)


onRefresh

protected void onRefresh()
Initialize the theme capability.


registerPrototype

public void registerPrototype(String name, Class clazz)
Register a prototype bean with the underlying bean factory.

For more advanced needs, register with the underlying BeanFactory directly.

See Also:
getDefaultListableBeanFactory


registerPrototype

public void registerPrototype(String name, Class clazz, org.springframework.beans.MutablePropertyValues pvs)
Register a prototype bean with the underlying bean factory.

For more advanced needs, register with the underlying BeanFactory directly.

See Also:
getDefaultListableBeanFactory


registerSingleton

public void registerSingleton(String name, Class clazz)
Register a singleton bean with the underlying bean factory.

For more advanced needs, register with the underlying BeanFactory directly.

See Also:
getDefaultListableBeanFactory


registerSingleton

public void registerSingleton(String name, Class clazz, org.springframework.beans.MutablePropertyValues pvs)
Register a singleton bean with the underlying bean factory.

For more advanced needs, register with the underlying BeanFactory directly.

See Also:
getDefaultListableBeanFactory


setMetaClass

public void setMetaClass(MetaClass metaClass)


setProperty

public void setProperty(String property, Object newValue)


 

Groovy Documentation