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
ConstructorDescriptionApplicationContextAccessor
(org.springframework.context.ApplicationContext actualApplicationContext) -
Method Summary
Modifier and TypeMethodDescription<T> T
protected org.springframework.context.ApplicationContext
void
setApplicationContext
(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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
get
-
get
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
-