org.codehaus.groovy.grails.commons.spring
Class GrailsWebApplicationContext
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.GenericApplicationContext
org.springframework.context.support.StaticApplicationContext
org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext
- All Implemented Interfaces:
- groovy.lang.GroovyObject, BeanFactory, DisposableBean, HierarchicalBeanFactory, ListableBeanFactory, BeanDefinitionRegistry, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, ResourceLoader, ResourcePatternResolver, ConfigurableWebApplicationContext, WebApplicationContext
public class GrailsWebApplicationContext
- extends StaticApplicationContext
- implements ConfigurableWebApplicationContext, groovy.lang.GroovyObject
A WebApplicationContext that extends StaticApplicationContext to allow for programmatic
configuration at runtime. The code is adapted from StaticWebApplicationContext.
- Since:
- 0.3
- Author:
- Graeme
| Methods inherited from class org.springframework.context.support.GenericApplicationContext |
closeBeanFactory, getBeanDefinition, getBeanFactory, getDefaultListableBeanFactory, getResource, getResources, refreshBeanFactory, registerAlias, registerBeanDefinition, setParent, setResourceLoader |
| Methods inherited from class org.springframework.context.support.AbstractApplicationContext |
addBeanFactoryPostProcessor, addListener, close, containsBean, containsBeanDefinition, containsLocalBean, destroy, doClose, getAliases, getAutowireCapableBeanFactory, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getDisplayName, getInternalParentBeanFactory, getInternalParentMessageSource, getLifecycleBeans, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getStartupDate, getType, isActive, isRunning, isSingleton, isTypeMatch, onClose, publishEvent, refresh, registerShutdownHook, setDisplayName, start, stop, toString |
GrailsWebApplicationContext
public GrailsWebApplicationContext()
throws BeansException
- Throws:
BeansException
GrailsWebApplicationContext
public GrailsWebApplicationContext(ApplicationContext parent)
throws BeansException
- Throws:
BeansException
setServletContext
public void setServletContext(ServletContext servletContext)
- Set the ServletContext that this WebApplicationContext runs in.
- Specified by:
setServletContext in interface ConfigurableWebApplicationContext
getServletContext
public ServletContext getServletContext()
- Specified by:
getServletContext in interface WebApplicationContext
setNamespace
public void setNamespace(String namespace)
- Specified by:
setNamespace in interface ConfigurableWebApplicationContext
getNamespace
public String getNamespace()
setConfigLocations
public void setConfigLocations(String[] configLocations)
- Specified by:
setConfigLocations in interface ConfigurableWebApplicationContext
getConfigLocations
public String[] getConfigLocations()
postProcessBeanFactory
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
- Register ServletContextAwareProcessor.
- Overrides:
postProcessBeanFactory in class AbstractApplicationContext
- See Also:
ServletContextAwareProcessor
getResourceByPath
protected Resource getResourceByPath(String path)
- This implementation supports file paths beneath the root of the ServletContext.
- Overrides:
getResourceByPath in class DefaultResourceLoader
- See Also:
ServletContextResource
getResourcePatternResolver
protected ResourcePatternResolver getResourcePatternResolver()
- This implementation supports pattern matching in unexpanded WARs too.
- Overrides:
getResourcePatternResolver in class AbstractApplicationContext
- See Also:
ServletContextResourcePatternResolver
onRefresh
protected void onRefresh()
- Initialize the theme capability.
- Overrides:
onRefresh in class AbstractApplicationContext
getTheme
public Theme getTheme(String themeName)
setServletConfig
public void setServletConfig(ServletConfig servletConfig)
- Specified by:
setServletConfig in interface ConfigurableWebApplicationContext
getServletConfig
public ServletConfig getServletConfig()
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClass in interface groovy.lang.GroovyObject
getProperty
public Object getProperty(String property)
- Specified by:
getProperty in interface groovy.lang.GroovyObject
invokeMethod
public Object invokeMethod(String name,
Object args)
- Specified by:
invokeMethod in interface groovy.lang.GroovyObject
setMetaClass
public void setMetaClass(groovy.lang.MetaClass metaClass)
- Specified by:
setMetaClass in interface groovy.lang.GroovyObject
setProperty
public void setProperty(String property,
Object newValue)
- Specified by:
setProperty in interface groovy.lang.GroovyObject
Copyright (c) 2005-2006 The Grails project