Class SpringApplicationContextHolder
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.expr.SpringApplicationContextHolder
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
@Experimental @Component public class SpringApplicationContextHolder extends Object implements org.springframework.context.ApplicationContextAware
Used to obtain arbitrary Spring beans from withing scripts. (To be used only on rare occasions. All the standard beans should be accessible viaMidpointFunctions
API.) *USE AT YOUR OWN RISK.*
-
-
Constructor Summary
Constructors Constructor Description SpringApplicationContextHolder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull org.springframework.context.ApplicationContext
getApplicationContext()
static <T> T
getBean(Class<T> aClass)
static <T> T
getBean(String name, Class<T> aClass)
void
setApplicationContext(@NotNull org.springframework.context.ApplicationContext ctx)
-
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(@NotNull @NotNull org.springframework.context.ApplicationContext ctx) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getApplicationContext
@NotNull public static @NotNull org.springframework.context.ApplicationContext getApplicationContext()
-
getBean
public static <T> T getBean(Class<T> aClass)
-
-