Class Beans


  • public class Beans
    extends java.lang.Object
    A re-usable collection of utility methods for object instantiations and configurations used cross various @Bean creation methods throughout CAS server.
    Since:
    5.0.0
    • Constructor Detail

      • Beans

        public Beans()
    • Method Detail

      • newThreadPoolExecutorFactoryBean

        public static org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean newThreadPoolExecutorFactoryBean​(ConnectionPoolingProperties config)
        New thread pool executor factory bean.
        Parameters:
        config - the config
        Returns:
        the thread pool executor factory bean
      • newThreadPoolExecutorFactoryBean

        public static org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean newThreadPoolExecutorFactoryBean​(long keepAlive,
                                                                                                                               long maxSize)
        New thread pool executor factory bean.
        Parameters:
        keepAlive - the keep alive
        maxSize - the max size
        Returns:
        the thread pool executor factory bean
      • newStubAttributeRepository

        public static org.apereo.services.persondir.IPersonAttributeDao newStubAttributeRepository​(PrincipalAttributesProperties p)
        New attribute repository person attribute dao.
        Parameters:
        p - the properties
        Returns:
        the person attribute dao
      • newDuration

        public static java.time.Duration newDuration​(java.lang.String length)
        New duration. If the provided length is duration, it will be parsed accordingly, or if it's a numeric value it will be pared as a duration assuming it's provided as seconds.
        Parameters:
        length - the length in seconds.
        Returns:
        the duration