Class SpringRegistry

  • All Implemented Interfaces:
    Registry, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware

    public class SpringRegistry
    extends Object
    implements Registry, org.springframework.beans.factory.BeanFactoryAware
    Class that bridges the Registry interface to a Spring ListableBeanFactory. You simply need to declare a Spring bean like this:

    or, even easier, using the globalContext tag in the http://openehealth.org/schema/ipf-commons-core extension namespace:
         
     
    Then the "stateful" Groovy Extension Modules will access the Spring registry.
    Since:
    2.5
    • Constructor Detail

      • SpringRegistry

        public SpringRegistry()
    • Method Detail

      • bean

        public <T> T bean​(Class<T> requiredType)
        Specified by:
        bean in interface Registry
      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
        Stores the beanFactory and initialized the ContextFacade.
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
        Throws:
        org.springframework.beans.BeansException
        See Also:
        BeanFactoryAware.setBeanFactory(org.springframework.beans.factory.BeanFactory)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object