public final class SpringContextService extends Object implements PluginEventListener
Modifier and Type | Method and Description |
---|---|
static <T> T |
getBean(String strName)
Return an instance, which may be shared or independent, of the given bean
name.
|
static <T> List<T> |
getBeansOfType(Class<T> classDef)
Returns a list of bean among all that implements a given interface or extends
a given class
|
static org.springframework.context.ApplicationContext |
getContext()
Gets the application context
|
static Object |
getPluginBean(String strPluginName,
String strName)
Deprecated.
use
getBean(String) instead |
static void |
init(javax.servlet.ServletContext servletContext)
Initialize a global Application Context containing all beans (core + plugins)
Now uses GenericApplicationContext for better performances.
|
static boolean |
isBeanEnabled(String strBeanName)
Indicates if a bean, referenced by its name, is part of an enabled plugin.
|
void |
processPluginEvent(PluginEvent event)
Process a plugin event
|
static void |
shutdown()
Closes the Spring context
|
public static <T> T getBean(String strName)
T
- the generic typestrName
- The bean's name@Deprecated public static Object getPluginBean(String strPluginName, String strName)
getBean(String)
insteadstrPluginName
- The Plugin's namestrName
- The bean's namepublic static boolean isBeanEnabled(String strBeanName)
strBeanName
- The bean's nametrue
if the bean is part of an enabled plugin,
false
otherwisepublic static void init(javax.servlet.ServletContext servletContext) throws LuteceInitException
servletContext
- The servlet contextLuteceInitException
- The lutece init exceptionpublic static org.springframework.context.ApplicationContext getContext()
public static <T> List<T> getBeansOfType(Class<T> classDef)
T
- The class typeclassDef
- The class typepublic void processPluginEvent(PluginEvent event)
processPluginEvent
in interface PluginEventListener
event
- The event to processpublic static void shutdown()
Copyright © 2020 City of Paris. All rights reserved.