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 a ContentStoreMapProvider. Extending classes should implement setUpStoreMap() to initialize the Map.
Since:
4.0
  • Field Details

  • Constructor Details

    • AbstractContentStoreMapProvider

      public AbstractContentStoreMapProvider()
  • Method Details

    • setUpStoreMap

      protected abstract void setUpStoreMap()
    • onBootstrap

      protected void onBootstrap(org.springframework.context.ApplicationEvent event)
      set up the map on startup. see 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(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 Map<String,ContentStore> getStoreMap()
      Specified by:
      getStoreMap in interface ContentStoreMapProvider
      Returns:
      a Map
    • getContentStore

      public ContentStore getContentStore()
    • setContentStore

      public void setContentStore(ContentStore contentStore)