org.alfresco.repo.bulkimport.impl.stores
Class AbstractContentStoreMapProvider

java.lang.Object
  extended by org.springframework.extensions.surf.util.AbstractLifecycleBean
      extended by org.alfresco.repo.bulkimport.impl.stores.AbstractContentStoreMapProvider
All Implemented Interfaces:
java.util.EventListener, ContentStoreMapProvider, 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 a ContentStoreMapProvider. Extending classes should implement AbstractContentStoreMapProvider.setUpStoreMap() to initialize the Map.

Since:
4.0

Field Summary
protected  ContentStore contentStore
           
protected  java.util.Map storeMap
           
 
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log
 
Constructor Summary
AbstractContentStoreMapProvider()
           
 
Method Summary
 ContentStore checkAndGetStore(java.lang.String storeName)
          Check that the given store name is in the list.
 ContentStore getContentStore()
           
 java.util.Map getStoreMap()
          see ContentStoreMapProvider.getStoreMap()
protected  void onBootstrap(org.springframework.context.ApplicationEvent event)
          set up the map on startup.
protected  void onShutdown(org.springframework.context.ApplicationEvent event)
           
 void setContentStore(ContentStore contentStore)
           
protected abstract  void setUpStoreMap()
           
 
Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contentStore

protected ContentStore contentStore

storeMap

protected java.util.Map storeMap
Constructor Detail

AbstractContentStoreMapProvider

public AbstractContentStoreMapProvider()
Method Detail

setUpStoreMap

protected abstract void setUpStoreMap()

onBootstrap

protected void onBootstrap(org.springframework.context.ApplicationEvent event)
set up the map on startup. see AbstractContentStoreMapProvider.setUpStoreMap().

Specified by:
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean

onShutdown

protected void onShutdown(org.springframework.context.ApplicationEvent event)
Specified by:
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean

checkAndGetStore

public ContentStore checkAndGetStore(java.lang.String storeName)
Check that the given store name is in the list. Also check it's an instance of FileContentStore. If it's not, output a warning as non-file-based implementations have not been tested and may be unsupported.

Specified by:
checkAndGetStore in interface ContentStoreMapProvider
Parameters:
storeName - the store name to check
Returns:
the corresponding ContentStore

getStoreMap

public java.util.Map getStoreMap()
see ContentStoreMapProvider.getStoreMap()

Specified by:
getStoreMap in interface ContentStoreMapProvider
Returns:
a Map

getContentStore

public ContentStore getContentStore()

setContentStore

public void setContentStore(ContentStore contentStore)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.