Class AbstractRepositoryPopulatorFactoryBean

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
org.springframework.data.repository.init.AbstractRepositoryPopulatorFactoryBean
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<ResourceReaderRepositoryPopulator>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Direct Known Subclasses:
Jackson2RepositoryPopulatorFactoryBean, UnmarshallerRepositoryPopulatorFactoryBean

public abstract class AbstractRepositoryPopulatorFactoryBean extends org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator> implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.context.ApplicationContextAware
Base class for FactoryBeans creating ResourceReaderRepositoryPopulators. Sub-classes have to provide a ResourceReader to hand into the RepositoryPopulator instance created.
Author:
Oliver Gierke, Christoph Strobl, Johannes Englmeier
  • Constructor Details

    • AbstractRepositoryPopulatorFactoryBean

      public AbstractRepositoryPopulatorFactoryBean()
  • Method Details

    • setResources

      public void setResources(org.springframework.core.io.Resource[] resources)
      Configures the Resources to be used to load objects from and initialize the repositories eventually.
      Parameters:
      resources - must not be null.
    • setApplicationContext

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

      @NonNull public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<ResourceReaderRepositoryPopulator>
      Specified by:
      getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
    • createInstance

      protected ResourceReaderRepositoryPopulator createInstance()
      Specified by:
      createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
    • getResourceReader

      protected abstract ResourceReader getResourceReader()
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
      Throws:
      Exception