org.broadleafcommerce.common.util
Class ApplicationContextHolder

java.lang.Object
  extended by org.broadleafcommerce.common.util.ApplicationContextHolder
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component(value="blApplicationContextHolder")
public class ApplicationContextHolder
extends Object
implements org.springframework.context.ApplicationContextAware

Convenient class to hold the Spring application context. Note that this holds the root application context as opposed to an individual servlet context.

Author:
Phillip Verheyden (phillipuniverse)

Field Summary
protected static org.springframework.context.ApplicationContext context
           
 
Constructor Summary
ApplicationContextHolder()
           
 
Method Summary
static org.springframework.context.ApplicationContext getApplicationContext()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected static org.springframework.context.ApplicationContext context
Constructor Detail

ApplicationContextHolder

public ApplicationContextHolder()
Method Detail

getApplicationContext

public static org.springframework.context.ApplicationContext getApplicationContext()

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2013. All Rights Reserved.