org.alfresco.repo.content
Class TenantRoutingFileContentStore

java.lang.Object
  extended by org.alfresco.repo.content.AbstractRoutingContentStore
      extended by org.alfresco.repo.content.TenantRoutingFileContentStore
All Implemented Interfaces:
ContentStore, org.alfresco.repo.tenant.TenantDeployer, org.springframework.context.ApplicationContextAware

public class TenantRoutingFileContentStore
extends AbstractRoutingContentStore
implements org.alfresco.repo.tenant.TenantDeployer, org.springframework.context.ApplicationContextAware

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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.content.ContentStore
ContentStore.ContentUrlHandler
 
Field Summary
 
Fields inherited from interface org.alfresco.repo.content.ContentStore
NEW_CONTENT_CONTEXT, PROTOCOL_DELIMITER
 
Constructor Summary
TenantRoutingFileContentStore()
           
 
Method Summary
 void destroy()
           
 java.util.List getAllStores()
           
 java.lang.String getDefaultRootDir()
           
 void init()
           
 void onDisableTenant()
           
 void onEnableTenant()
           
protected  ContentStore selectWriteStore(ContentContext ctx)
          Get a content store based on the context provided.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setDefaultRootDir(java.lang.String defaultRootDirectory)
           
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 
Methods inherited from class org.alfresco.repo.content.AbstractRoutingContentStore
delete, exists, getReader, getRootLocation, getSpaceFree, getSpaceTotal, getSpaceUsed, getTotalSize, getUrls, getUrls, getWriter, getWriter, isContentUrlSupported, isWriteSupported, setStoresCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TenantRoutingFileContentStore

public TenantRoutingFileContentStore()
Method Detail

setDefaultRootDir

public void setDefaultRootDir(java.lang.String defaultRootDirectory)

setTenantService

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

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

selectWriteStore

protected ContentStore selectWriteStore(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 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

getDefaultRootDir

public java.lang.String getDefaultRootDir()


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