Package org.alfresco.repo.tenant
Class AbstractTenantRoutingContentStore
- java.lang.Object
-
- org.alfresco.repo.content.AbstractRoutingContentStore
-
- org.alfresco.repo.tenant.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 Summary
Fields Modifier and Type Field Description protected org.alfresco.repo.tenant.TenantServicetenantService
-
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()java.util.List<org.alfresco.repo.content.ContentStore>getAllStores()java.lang.StringgetRootLocation()longgetSpaceFree()longgetSpaceTotal()voidinit()protected abstract org.alfresco.repo.content.ContentStoreinitContentStore(org.springframework.context.ApplicationContext ctx, java.lang.String contentRoot)voidonDisableTenant()voidonEnableTenant()protected org.alfresco.repo.content.ContentStoreselectWriteStore(org.alfresco.repo.content.ContentContext ctx)Get a content store based on the context provided.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetRootLocation(java.lang.String defaultRootDirectory)voidsetTenantAdminDAO(TenantAdminDAO tenantAdminDAO)voidsetTenantService(org.alfresco.repo.tenant.TenantService tenantService)voidsetTransactionService(TransactionService transactionService)-
Methods inherited from class org.alfresco.repo.content.AbstractRoutingContentStore
delete, exists, getReader, getWriter, getWriter, isContentUrlSupported, isWriteSupported, setStoresCache
-
-
-
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
getRootLocation
public java.lang.String getRootLocation()
- Specified by:
getRootLocationin interfaceorg.alfresco.repo.content.ContentStore- Specified by:
getRootLocationin interfaceTenantRoutingContentStore- Overrides:
getRootLocationin classAbstractRoutingContentStore- Returns:
- Returns . always
-
selectWriteStore
protected org.alfresco.repo.content.ContentStore selectWriteStore(org.alfresco.repo.content.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 java.util.List<org.alfresco.repo.content.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 interfaceorg.alfresco.repo.tenant.TenantDeployer
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.alfresco.repo.tenant.TenantDeployer
-
onEnableTenant
public void onEnableTenant()
- Specified by:
onEnableTenantin interfaceorg.alfresco.repo.tenant.TenantDeployer
-
onDisableTenant
public void onDisableTenant()
- Specified by:
onDisableTenantin interfaceorg.alfresco.repo.tenant.TenantDeployer
-
getSpaceFree
public long getSpaceFree()
- Specified by:
getSpaceFreein interfaceorg.alfresco.repo.content.ContentStore- Overrides:
getSpaceFreein classAbstractRoutingContentStore- Returns:
- Returns -1 always
-
getSpaceTotal
public long getSpaceTotal()
- Specified by:
getSpaceTotalin interfaceorg.alfresco.repo.content.ContentStore- Overrides:
getSpaceTotalin classAbstractRoutingContentStore- Returns:
- Returns -1 always
-
initContentStore
protected abstract org.alfresco.repo.content.ContentStore initContentStore(org.springframework.context.ApplicationContext ctx, java.lang.String contentRoot)
-
-