Class AbstractTenantRoutingContentStore

  • All Implemented Interfaces:
    org.alfresco.repo.content.ContentStore, org.alfresco.repo.tenant.TenantDeployer, TenantRoutingContentStore, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
    Direct Known Subclasses:
    TenantRoutingFileContentStore

    public abstract class AbstractTenantRoutingContentStore
    extends AbstractRoutingContentStore
    implements org.springframework.context.ApplicationContextAware, TenantRoutingContentStore
    Content Store that supports tenant routing, if multi-tenancy is enabled. Note: Need to initialise before the dictionary service, in the case that models are dynamically loaded for the tenant.
    • Field Detail

      • tenantService

        protected org.alfresco.repo.tenant.TenantService tenantService
    • Constructor Detail

      • AbstractTenantRoutingContentStore

        protected AbstractTenantRoutingContentStore()
        Default constructor
    • Method Detail

      • setRootLocation

        public void setRootLocation​(java.lang.String defaultRootDirectory)
      • setTenantService

        public void setTenantService​(org.alfresco.repo.tenant.TenantService tenantService)
      • setTenantAdminDAO

        public void setTenantAdminDAO​(TenantAdminDAO tenantAdminDAO)
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • setTransactionService

        public void setTransactionService​(TransactionService transactionService)
      • selectWriteStore

        protected org.alfresco.repo.content.ContentStore selectWriteStore​(org.alfresco.repo.content.ContentContext ctx)
        Description copied from class: AbstractRoutingContentStore
        Get a content store based on the context provided. The applicability of the context and even the types of context allowed are up to the implementation, but normally there should be a fallback case for when the parameters are not adequate to make a decision.
        Specified by:
        selectWriteStore in class AbstractRoutingContentStore
        Parameters:
        ctx - the context to use to make the choice
        Returns:
        Returns the store most appropriate for the given context and never null
      • getAllStores

        public java.util.List<org.alfresco.repo.content.ContentStore> getAllStores()
        Specified by:
        getAllStores in class AbstractRoutingContentStore
        Returns:
        Returns a list of all possible stores available for reading or writing
      • init

        public void init()
        Specified by:
        init in interface org.alfresco.repo.tenant.TenantDeployer
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.alfresco.repo.tenant.TenantDeployer
      • onEnableTenant

        public void onEnableTenant()
        Specified by:
        onEnableTenant in interface org.alfresco.repo.tenant.TenantDeployer
      • onDisableTenant

        public void onDisableTenant()
        Specified by:
        onDisableTenant in interface org.alfresco.repo.tenant.TenantDeployer
      • getSpaceFree

        public long getSpaceFree()
        Specified by:
        getSpaceFree in interface org.alfresco.repo.content.ContentStore
        Overrides:
        getSpaceFree in class AbstractRoutingContentStore
        Returns:
        Returns -1 always
      • getSpaceTotal

        public long getSpaceTotal()
        Specified by:
        getSpaceTotal in interface org.alfresco.repo.content.ContentStore
        Overrides:
        getSpaceTotal in class AbstractRoutingContentStore
        Returns:
        Returns -1 always
      • initContentStore

        protected abstract org.alfresco.repo.content.ContentStore initContentStore​(org.springframework.context.ApplicationContext ctx,
                                                                                   java.lang.String contentRoot)