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
FieldsFields inherited from interface org.alfresco.repo.content.ContentStore
NEW_CONTENT_CONTEXT, PROTOCOL_DELIMITER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()longlonggetStorageProperties(String contentUrl) voidinit()protected abstract ContentStoreinitContentStore(org.springframework.context.ApplicationContext ctx, String contentRoot) voidvoidbooleanrequestRestoreContentFromArchive(String contentUrl, Map<String, Serializable> restoreParams) booleanrequestSendContentToArchive(String contentUrl, Map<String, Serializable> archiveParams) protected ContentStoreGet 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, setStoresCacheMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.repo.content.ContentStore
isContentDirectUrlEnabled, isContentDirectUrlEnabled, requestContentDirectUrl, requestContentDirectUrl, requestContentDirectUrl, requestContentDirectUrl
-
Field Details
-
tenantService
-
-
Constructor Details
-
AbstractTenantRoutingContentStore
protected AbstractTenantRoutingContentStore()Default constructor
-
-
Method Details
-
setRootLocation
-
setTenantService
-
setTenantAdminDAO
-
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
-
getRootLocation
- Specified by:
getRootLocationin interfaceContentStore- Specified by:
getRootLocationin interfaceTenantRoutingContentStore- Overrides:
getRootLocationin classAbstractRoutingContentStore- Returns:
- Returns . always
-
selectWriteStore
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
- 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
-
getStorageProperties
- Specified by:
getStoragePropertiesin interfaceContentStore- Overrides:
getStoragePropertiesin classAbstractRoutingContentStore
-
requestSendContentToArchive
public boolean requestSendContentToArchive(String contentUrl, Map<String, Serializable> archiveParams) - Specified by:
requestSendContentToArchivein interfaceContentStore- Overrides:
requestSendContentToArchivein classAbstractRoutingContentStore
-
requestRestoreContentFromArchive
public boolean requestRestoreContentFromArchive(String contentUrl, Map<String, Serializable> restoreParams) - Specified by:
requestRestoreContentFromArchivein interfaceContentStore- Overrides:
requestRestoreContentFromArchivein classAbstractRoutingContentStore
-
initContentStore
protected abstract ContentStore initContentStore(org.springframework.context.ApplicationContext ctx, String contentRoot)
-