Spring Data Commons

org.springframework.data.repository.init
Class AbstractRepositoryPopulatorFactoryBean

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

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

FactoryBean to set up a ResourceReaderRepositoryPopulator with a JacksonResourceReader.

Author:
Oliver Gierke

Field Summary
 
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
 
Constructor Summary
AbstractRepositoryPopulatorFactoryBean()
           
 
Method Summary
protected  ResourceReaderRepositoryPopulator createInstance()
           
 Class<?> getObjectType()
           
protected abstract  ResourceReader getResourceReader()
           
 void onApplicationEvent(ContextRefreshedEvent event)
           
 void setResources(Resource[] resources)
          Configures the Resources to be used to load objects from and initialize the repositories eventually.
 
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, 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
 

Constructor Detail

AbstractRepositoryPopulatorFactoryBean

public AbstractRepositoryPopulatorFactoryBean()
Method Detail

setResources

public void setResources(Resource[] resources)
Configures the Resources to be used to load objects from and initialize the repositories eventually.

Parameters:
resources - the resources to set

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean<ResourceReaderRepositoryPopulator>
Specified by:
getObjectType in class AbstractFactoryBean<ResourceReaderRepositoryPopulator>

createInstance

protected ResourceReaderRepositoryPopulator createInstance()
                                                    throws Exception
Specified by:
createInstance in class AbstractFactoryBean<ResourceReaderRepositoryPopulator>
Throws:
Exception

onApplicationEvent

public void onApplicationEvent(ContextRefreshedEvent event)
Specified by:
onApplicationEvent in interface ApplicationListener<ContextRefreshedEvent>

getResourceReader

protected abstract ResourceReader getResourceReader()

Spring Data Commons

Copyright © 2012. All Rights Reserved.