Class AbstractContentStoreMapProvider
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.repo.bulkimport.impl.stores.AbstractContentStoreMapProvider
-
- All Implemented Interfaces:
EventListener,ContentStoreMapProvider,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
- Direct Known Subclasses:
DefaultContentStoreMapProvider
public abstract class AbstractContentStoreMapProvider extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements ContentStoreMapProvider
Common elements of the role of aContentStoreMapProvider. Extending classes should implementsetUpStoreMap()to initialize theMap.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentStorecontentStoreprotected Map<String,ContentStore>storeMap
-
Constructor Summary
Constructors Constructor Description AbstractContentStoreMapProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ContentStorecheckAndGetStore(String storeName)Check that the given store name is in the list.ContentStoregetContentStore()Map<String,ContentStore>getStoreMap()protected voidonBootstrap(org.springframework.context.ApplicationEvent event)set up the map on startup.protected voidonShutdown(org.springframework.context.ApplicationEvent event)voidsetContentStore(ContentStore contentStore)protected abstract voidsetUpStoreMap()
-
-
-
Field Detail
-
contentStore
protected ContentStore contentStore
-
storeMap
protected Map<String,ContentStore> storeMap
-
-
Method Detail
-
setUpStoreMap
protected abstract void setUpStoreMap()
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
set up the map on startup. seesetUpStoreMap().- Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
checkAndGetStore
public ContentStore checkAndGetStore(String storeName)
Check that the given store name is in the list. Also check it's an instance ofFileContentStore. If it's not, output a warning as non-file-based implementations have not been tested and may be unsupported.- Specified by:
checkAndGetStorein interfaceContentStoreMapProvider- Parameters:
storeName- the store name to check- Returns:
- the corresponding
ContentStore
-
getStoreMap
public Map<String,ContentStore> getStoreMap()
- Specified by:
getStoreMapin interfaceContentStoreMapProvider- Returns:
- a
Map
-
getContentStore
public ContentStore getContentStore()
-
setContentStore
public void setContentStore(ContentStore contentStore)
-
-