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 viaMidpointFunctionsAPI.) *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.ApplicationContextgetApplicationContext()static <T> TgetBean(Class<T> aClass)static <T> TgetBean(String name, Class<T> aClass)voidsetApplicationContext(@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:
setApplicationContextin 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)
-
-