Class AbstractContentStoreMapProvider

  • All Implemented Interfaces:
    java.util.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 Summary

      Fields 
      Modifier and Type Field Description
      protected org.alfresco.repo.content.ContentStore contentStore  
      protected java.util.Map<java.lang.String,​org.alfresco.repo.content.ContentStore> storeMap  
      • Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean

        log
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      org.alfresco.repo.content.ContentStore checkAndGetStore​(java.lang.String storeName)
      Check that the given store name is in the list.
      org.alfresco.repo.content.ContentStore getContentStore()  
      java.util.Map<java.lang.String,​org.alfresco.repo.content.ContentStore> 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​(org.alfresco.repo.content.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 org.alfresco.repo.content.ContentStore contentStore
      • storeMap

        protected java.util.Map<java.lang.String,​org.alfresco.repo.content.ContentStore> 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 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 org.alfresco.repo.content.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
      • getContentStore

        public org.alfresco.repo.content.ContentStore getContentStore()
      • setContentStore

        public void setContentStore​(org.alfresco.repo.content.ContentStore contentStore)