org.springframework.data.repository.init

## Class AbstractRepositoryPopulatorFactoryBean

- java.lang.Object
- - org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
  - - org.springframework.data.repository.init.AbstractRepositoryPopulatorFactoryBean

All Implemented Interfaces:
  EventListener, Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<ResourceReaderRepositoryPopulator>, InitializingBean, ApplicationContextAware, ApplicationListener<ContextRefreshedEvent>

Direct Known Subclasses:
  Jackson2RepositoryPopulatorFactoryBean, UnmarshallerRepositoryPopulatorFactoryBean

    public abstract class AbstractRepositoryPopulatorFactoryBean
    extends AbstractFactoryBean<ResourceReaderRepositoryPopulator>
    implements ApplicationListener<ContextRefreshedEvent>, ApplicationContextAware

Base class for `FactoryBean`s creating `ResourceReaderRepositoryPopulator`s. Sub-classes have to provide a `ResourceReader` to hand into the `RepositoryPopulator` instance created.

Author:
  Oliver Gierke, Christoph Strobl

### Field Summary

### Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

`logger`

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

### Constructor Summary

Constructors
Constructor and Description
`AbstractRepositoryPopulatorFactoryBean()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `afterPropertiesSet()`
`protected ResourceReaderRepositoryPopulator` `createInstance()`
`Class<?>` `getObjectType()`
`protected abstract ResourceReader` `getResourceReader()`
`void` `onApplicationEvent(ContextRefreshedEvent event)`
`void` `setApplicationContext(ApplicationContext applicationContext)`
`void` `setResources(Resource[] resources)` Configures the `Resource`s to be used to load objects from and initialize the repositories eventually.

### Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

`destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.context.ApplicationListener

`forPayload`

### Constructor Detail

#### AbstractRepositoryPopulatorFactoryBean

    public AbstractRepositoryPopulatorFactoryBean()

### Method Detail

#### setResources

    public void setResources(Resource[] resources)

Configures the `Resource`s to be used to load objects from and initialize the repositories eventually.

Parameters:
  `resources` - must not be null.

#### setApplicationContext

    public void setApplicationContext(ApplicationContext applicationContext)

Specified by:
  `setApplicationContext` in interface `ApplicationContextAware`

#### getObjectType

    @Nonnull
    public Class<?> getObjectType()

Specified by:
  `getObjectType` in interface `FactoryBean<ResourceReaderRepositoryPopulator>`
Specified by:
  `getObjectType` in class `AbstractFactoryBean<ResourceReaderRepositoryPopulator>`

#### createInstance

    protected ResourceReaderRepositoryPopulator createInstance()

Specified by:
  `createInstance` in class `AbstractFactoryBean<ResourceReaderRepositoryPopulator>`

#### onApplicationEvent

    public void onApplicationEvent(ContextRefreshedEvent event)

Specified by:
  `onApplicationEvent` in interface `ApplicationListener<ContextRefreshedEvent>`

#### getResourceReader

    protected abstract ResourceReader getResourceReader()

#### afterPropertiesSet

    public void afterPropertiesSet()
                            throws Exception

Specified by:
  `afterPropertiesSet` in interface `InitializingBean`
Overrides:
  `afterPropertiesSet` in class `AbstractFactoryBean<ResourceReaderRepositoryPopulator>`
Throws:
  `Exception`