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 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 interface org.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)
    • getBean

      public static <T> T getBean(String name, Class<T> aClass)