Class ApplicationContextProvider

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class ApplicationContextProvider
    extends java.lang.Object
    implements org.springframework.context.ApplicationContextAware
    An implementation of ApplicationContextAware that statically holds the application context.
    Since:
    3.0.0.
    • Constructor Detail

      • ApplicationContextProvider

        public ApplicationContextProvider()
    • Method Detail

      • getApplicationContext

        public static org.springframework.context.ApplicationContext getApplicationContext()
      • processBeanInjections

        public static void processBeanInjections​(java.lang.Object bean)
        Process bean injections.
        Parameters:
        bean - the bean
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext context)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
      • getMultifactorAuthenticationPrincipalResolvers

        public static java.util.List<org.apereo.cas.authentication.MultifactorAuthenticationPrincipalResolver> getMultifactorAuthenticationPrincipalResolvers()
        Gets multifactor authentication principal resolvers.
        Returns:
        the multifactor authentication principal resolvers
      • holdApplicationContext

        public static void holdApplicationContext​(org.springframework.context.ApplicationContext ctx)
        Hold application context statically.
        Parameters:
        ctx - the ctx
      • registerBeanIntoApplicationContext

        public static <T> T registerBeanIntoApplicationContext​(org.springframework.context.ConfigurableApplicationContext applicationContext,
                                                               java.lang.Class<T> beanClazz,
                                                               java.lang.String beanId)
        Register bean into application context.
        Type Parameters:
        T - the type parameter
        Parameters:
        applicationContext - the application context
        beanClazz - the bean clazz
        beanId - the bean id
        Returns:
        the type registered
      • registerBeanIntoApplicationContext

        public static <T> T registerBeanIntoApplicationContext​(org.springframework.context.ConfigurableApplicationContext applicationContext,
                                                               T beanInstance,
                                                               java.lang.String beanId)
        Register bean into application context t.
        Type Parameters:
        T - the type parameter
        Parameters:
        applicationContext - the application context
        beanInstance - the bean instance
        beanId - the bean id
        Returns:
        the t
      • getCasConfigurationProperties

        public static java.util.Optional<org.apereo.cas.configuration.CasConfigurationProperties> getCasConfigurationProperties()
        Gets cas properties.
        Returns:
        the cas properties
      • getAttributeRepository

        public static java.util.Optional<org.apereo.services.persondir.IPersonAttributeDao> getAttributeRepository()
        Gets attribute repository.
        Returns:
        the attribute repository
      • getConfigurableApplicationContext

        public static org.springframework.context.ConfigurableApplicationContext getConfigurableApplicationContext()
        Gets configurable application context.
        Returns:
        the configurable application context
      • getAttributeDefinitionStore

        public static java.util.Optional<org.apereo.cas.authentication.attribute.AttributeDefinitionStore> getAttributeDefinitionStore()
        Gets attribute definition store.
        Returns:
        the attribute definition store
      • getPrincipalAttributesRepository

        public static java.util.Optional<org.apereo.cas.authentication.principal.RegisteredServicePrincipalAttributesRepository> getPrincipalAttributesRepository()
        Gets principal attributes repository.
        Returns:
        the principal attributes repository
      • getPrincipalAttributesRepositoryCache

        public static java.util.Optional<org.apereo.cas.authentication.principal.PrincipalAttributesRepositoryCache> getPrincipalAttributesRepositoryCache()
        Gets principal attributes repository cache.
        Returns:
        the principal attributes repository cache
      • getMessagSanitizer

        public static java.util.Optional<MessageSanitizer> getMessagSanitizer()
        Gets messag sanitizer.
        Returns:
        the messag sanitizer