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, SCS_ARCHIVE, SCS_DEFAULT, SCS_WORM, STORAGE_CLASS_ARCHIVE, STORAGE_CLASS_DEFAULT, STORAGE_CLASS_WORM
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTenantRoutingContentStore()Default constructor
-
Method Summary
-
Methods inherited from class org.alfresco.repo.content.AbstractRoutingContentStore
delete, exists, getReader, getWriter, getWriter, isContentUrlSupported, isWriteSupported, setStoresCache
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.content.ContentStore
getDirectAccessUrl, isDirectAccessSupported
-
-
-
-
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
-
isStorageClassesSupported
public boolean isStorageClassesSupported(StorageClassSet storageClassSet)
- Specified by:
isStorageClassesSupportedin interfaceContentStore- Overrides:
isStorageClassesSupportedin classAbstractRoutingContentStore
-
getSupportedStorageClasses
public Set<String> getSupportedStorageClasses()
- Specified by:
getSupportedStorageClassesin interfaceContentStore- Overrides:
getSupportedStorageClassesin classAbstractRoutingContentStore
-
updateStorageClasses
public void updateStorageClasses(String contentUrl, StorageClassSet storageClassSet, Map<String,Object> parameters)
- Specified by:
updateStorageClassesin interfaceContentStore- Overrides:
updateStorageClassesin classAbstractRoutingContentStore
-
findStorageClasses
public StorageClassSet findStorageClasses(String contentUrl)
- Specified by:
findStorageClassesin interfaceContentStore- Overrides:
findStorageClassesin classAbstractRoutingContentStore
-
getStorageClassesTransitions
public Map<StorageClassSet,Set<StorageClassSet>> getStorageClassesTransitions()
- Specified by:
getStorageClassesTransitionsin interfaceContentStore- Overrides:
getStorageClassesTransitionsin classAbstractRoutingContentStore
-
findStorageClassesTransitions
public Map<StorageClassSet,Set<StorageClassSet>> findStorageClassesTransitions(String contentUrl)
- Specified by:
findStorageClassesTransitionsin interfaceContentStore- Overrides:
findStorageClassesTransitionsin classAbstractRoutingContentStore
-
initContentStore
protected abstract ContentStore initContentStore(org.springframework.context.ApplicationContext ctx, String contentRoot)
-
-