Class ApplicationContextAccessor
java.lang.Object
org.craftercms.commons.spring.context.ApplicationContextAccessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class ApplicationContextAccessor
extends Object
implements org.springframework.context.ApplicationContextAware
Wraps an instance of
ApplicationContext and provides simple access to beans for Groovy & Freemarker- Since:
- 4.0
- Author:
- joseross
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationContextAccessor(org.springframework.context.ApplicationContext actualApplicationContext) -
Method Summary
Modifier and TypeMethodDescription<T> Tprotected org.springframework.context.ApplicationContextvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
ApplicationContextAccessor
public ApplicationContextAccessor() -
ApplicationContextAccessor
public ApplicationContextAccessor(org.springframework.context.ApplicationContext actualApplicationContext)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
get
-
get
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
-