Package org.alfresco.repo.tenant
Class AbstractTenantRoutingContentStore
- java.lang.Object
-
- org.alfresco.repo.content.AbstractRoutingContentStore
-
- org.alfresco.repo.tenant.AbstractTenantRoutingContentStore
-
- All Implemented Interfaces:
ContentStore,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 Summary
Fields Modifier and Type Field Description protected TenantServicetenantService-
Fields inherited from interface org.alfresco.repo.content.ContentStore
NEW_CONTENT_CONTEXT, PROTOCOL_DELIMITER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTenantRoutingContentStore()Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddestroy()List<ContentStore>getAllStores()StringgetRootLocation()longgetSpaceFree()longgetSpaceTotal()voidinit()protected abstract ContentStoreinitContentStore(org.springframework.context.ApplicationContext ctx, String contentRoot)voidonDisableTenant()voidonEnableTenant()protected ContentStoreselectWriteStore(ContentContext ctx)Get a content store based on the context provided.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetRootLocation(String defaultRootDirectory)voidsetTenantAdminDAO(TenantAdminDAO tenantAdminDAO)voidsetTenantService(TenantService tenantService)voidsetTransactionService(TransactionService transactionService)-
Methods inherited from class org.alfresco.repo.content.AbstractRoutingContentStore
delete, exists, getReader, getWriter, getWriter, isContentUrlSupported, isWriteSupported, setStoresCache
-
-
-
-
Field Detail
-
tenantService
protected TenantService tenantService
-
-
Method Detail
-
setRootLocation
public void setRootLocation(String defaultRootDirectory)
-
setTenantService
public void setTenantService(TenantService tenantService)
-
setTenantAdminDAO
public void setTenantAdminDAO(TenantAdminDAO tenantAdminDAO)
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
getRootLocation
public String getRootLocation()
- Specified by:
getRootLocationin interfaceContentStore- Specified by:
getRootLocationin interfaceTenantRoutingContentStore- Overrides:
getRootLocationin classAbstractRoutingContentStore- Returns:
- Returns . always
-
selectWriteStore
protected ContentStore selectWriteStore(ContentContext ctx)
Description copied from class:AbstractRoutingContentStoreGet 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:
selectWriteStorein classAbstractRoutingContentStore- 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 List<ContentStore> getAllStores()
- Specified by:
getAllStoresin classAbstractRoutingContentStore- Returns:
- Returns a list of all possible stores available for reading or writing
-
init
public void init()
- Specified by:
initin interfaceTenantDeployer
-
destroy
public void destroy()
- Specified by:
destroyin interfaceTenantDeployer
-
onEnableTenant
public void onEnableTenant()
- Specified by:
onEnableTenantin interfaceTenantDeployer
-
onDisableTenant
public void onDisableTenant()
- Specified by:
onDisableTenantin interfaceTenantDeployer
-
getSpaceFree
public long getSpaceFree()
- Specified by:
getSpaceFreein interfaceContentStore- Overrides:
getSpaceFreein classAbstractRoutingContentStore- Returns:
- Returns -1 always
-
getSpaceTotal
public long getSpaceTotal()
- Specified by:
getSpaceTotalin interfaceContentStore- Overrides:
getSpaceTotalin classAbstractRoutingContentStore- Returns:
- Returns -1 always
-
initContentStore
protected abstract ContentStore initContentStore(org.springframework.context.ApplicationContext ctx, String contentRoot)
-
-