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 via
MidpointFunctions
API.)
*USE AT YOUR OWN RISK.*-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.springframework.context.ApplicationContext
static <T> T
static <T> T
void
setApplicationContext
(@NotNull org.springframework.context.ApplicationContext ctx)
-
Constructor Details
-
SpringApplicationContextHolder
public SpringApplicationContextHolder()
-
-
Method Details
-
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
-
getBean
-