Package org.alfresco.repo.tenant
Class MultiTAdminServiceImpl
- java.lang.Object
-
- org.alfresco.repo.tenant.MultiTAdminServiceImpl
-
- All Implemented Interfaces:
TenantAdminService,org.alfresco.repo.tenant.TenantUserService,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class MultiTAdminServiceImpl extends Object implements TenantAdminService, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
MT Admin Service Implementation.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MultiTAdminServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()voidcreateTenant(String tenantDomain, char[] tenantAdminRawPassword)voidcreateTenant(String tenantDomain, char[] tenantAdminRawPassword, String contentRoot)voidcreateTenant(String tenantDomainIn, char[] tenantAdminRawPassword, String contentRootPath, String dbUrl)voiddeleteTenant(String tenantDomain)voiddeployTenants(org.alfresco.repo.tenant.TenantDeployer deployer, org.apache.commons.logging.Log logger)voiddisableTenant(String tenantDomain)voidenableTenant(String tenantDomain)booleanexistsTenant(String tenantDomain)voidexportTenant(String tenantDomainIn, File directoryDestination)Export tenant - equivalent to the tenant admin running a 'complete repo' export from the Web Client AdminList<org.alfresco.repo.tenant.Tenant>getAllTenants()Deprecated.StringgetBaseNameUser(String username)StringgetCurrentUserDomain()StringgetDomainUser(String baseUsername, String tenantDomain)org.alfresco.repo.tenant.TenantgetTenant(String tenantDomain)protected StringgetTenantDomain(String tenantDomain)Do a null check and convert tenant domain to lowercaseList<org.alfresco.repo.tenant.Tenant>getTenants(boolean enabledOnly)Deprecated.StringgetUserDomain(String username)voidimportTenant(String tenantDomainIn, File directorySource, String contentRoot)Create tenant by restoring from a complete repository export.booleanisEnabled()booleanisEnabledTenant(String tenantDomain)protected booleanisTenantDeployer(org.alfresco.repo.content.ContentStore contentStore)protected booleanisTenantRoutingContentStore(org.alfresco.repo.content.ContentStore contentStore)protected voidnotifyAfterEnableTenant(String tenantDomain)Call allTenantDeployersas the system tenant.voidregister(org.alfresco.repo.tenant.TenantDeployer deployer)voidregister(WorkflowDeployer workflowDeployer)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetAuthenticationContext(AuthenticationContext authenticationContext)voidsetBaseAdminUsername(String baseAdminUsername)voidsetBehaviourFilter(BehaviourFilter behaviourFilter)voidsetContentRootContainerPath(String contentRootContainerPath)voidsetDictionaryComponent(org.alfresco.repo.dictionary.DictionaryComponent dictionaryComponent)voidsetModuleService(ModuleService moduleService)voidsetNodeService(DbNodeServiceImpl dbNodeService)voidsetPasswordEncoder(net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder)voidsetRepoAdminService(RepoAdminService repoAdminService)voidsetRepositoryExporterService(RepositoryExporterService repositoryExporterService)voidsetTenantAdminDAO(TenantAdminDAO tenantAdminDAO)voidsetTenantFileContentStore(org.alfresco.repo.content.ContentStore tenantFileContentStore)voidsetTenantRoutingDataSource(TenantRoutingDataSource trds)voidsetTenantService(MultiTServiceImpl tenantService)voidsetThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)voidsetTransactionService(TransactionService transactionService)voidsetWorkflowDeployer(WorkflowDeployer workflowDeployer)Deprecated.see setWorkflowDeployersvoidsetWorkflowService(WorkflowService workflowService)voidstartTenants()voidstopTenants()protected org.alfresco.repo.tenant.TenantDeployertenantDeployer(org.alfresco.repo.content.ContentStore contentStore)protected TenantRoutingContentStoretenantRoutingContentStore(org.alfresco.repo.content.ContentStore contentStore)voidundeployTenants(org.alfresco.repo.tenant.TenantDeployer deployer, org.apache.commons.logging.Log logger)voidunregister(org.alfresco.repo.tenant.TenantDeployer deployer)protected voidvalidateTenantName(String tenantDomain)
-
-
-
Field Detail
-
ctx
protected org.springframework.context.ApplicationContext ctx
-
transactionService
protected TransactionService transactionService
-
dictionaryComponent
protected org.alfresco.repo.dictionary.DictionaryComponent dictionaryComponent
-
tenantAdminDAO
protected TenantAdminDAO tenantAdminDAO
-
passwordEncoder
protected net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder
-
tenantFileContentStore
protected org.alfresco.repo.content.ContentStore tenantFileContentStore
-
REGEX_VALID_DNS_LABEL
protected static final String REGEX_VALID_DNS_LABEL
- See Also:
- Constant Field Values
-
REGEX_CONTAINS_ALPHA
protected static final String REGEX_CONTAINS_ALPHA
- See Also:
- Constant Field Values
-
MAX_LEN
protected static final int MAX_LEN
- See Also:
- Constant Field Values
-
PROTOCOL_STORE_USER
public static final String PROTOCOL_STORE_USER
- See Also:
- Constant Field Values
-
PROTOCOL_STORE_WORKSPACE
public static final String PROTOCOL_STORE_WORKSPACE
- See Also:
- Constant Field Values
-
PROTOCOL_STORE_SYSTEM
public static final String PROTOCOL_STORE_SYSTEM
- See Also:
- Constant Field Values
-
PROTOCOL_STORE_ARCHIVE
public static final String PROTOCOL_STORE_ARCHIVE
- See Also:
- Constant Field Values
-
STORE_BASE_ID_USER
public static final String STORE_BASE_ID_USER
- See Also:
- Constant Field Values
-
STORE_BASE_ID_SYSTEM
public static final String STORE_BASE_ID_SYSTEM
- See Also:
- Constant Field Values
-
STORE_BASE_ID_VERSION1
public static final String STORE_BASE_ID_VERSION1
- See Also:
- Constant Field Values
-
STORE_BASE_ID_VERSION2
public static final String STORE_BASE_ID_VERSION2
- See Also:
- Constant Field Values
-
STORE_BASE_ID_SPACES
public static final String STORE_BASE_ID_SPACES
- See Also:
- Constant Field Values
-
TENANTS_ATTRIBUTE_PATH
public static final String TENANTS_ATTRIBUTE_PATH
- See Also:
- Constant Field Values
-
TENANT_ATTRIBUTE_ENABLED
public static final String TENANT_ATTRIBUTE_ENABLED
- See Also:
- Constant Field Values
-
TENANT_ATTRIBUTE_ROOT_CONTENT_STORE_DIR
public static final String TENANT_ATTRIBUTE_ROOT_CONTENT_STORE_DIR
- See Also:
- Constant Field Values
-
TENANT_ATTRIBUTE_DB_URL
public static final String TENANT_ATTRIBUTE_DB_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
setNodeService
public void setNodeService(DbNodeServiceImpl dbNodeService)
-
setDictionaryComponent
public void setDictionaryComponent(org.alfresco.repo.dictionary.DictionaryComponent dictionaryComponent)
-
setRepoAdminService
public void setRepoAdminService(RepoAdminService repoAdminService)
-
setAuthenticationContext
public void setAuthenticationContext(AuthenticationContext authenticationContext)
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
setTenantService
public void setTenantService(MultiTServiceImpl tenantService)
-
setBehaviourFilter
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
-
setTenantAdminDAO
public void setTenantAdminDAO(TenantAdminDAO tenantAdminDAO)
-
setPasswordEncoder
public void setPasswordEncoder(net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder)
-
setTenantFileContentStore
public void setTenantFileContentStore(org.alfresco.repo.content.ContentStore tenantFileContentStore)
-
setWorkflowService
public void setWorkflowService(WorkflowService workflowService)
-
setRepositoryExporterService
public void setRepositoryExporterService(RepositoryExporterService repositoryExporterService)
-
setWorkflowDeployer
public void setWorkflowDeployer(WorkflowDeployer workflowDeployer)
Deprecated.see setWorkflowDeployers
-
setModuleService
public void setModuleService(ModuleService moduleService)
-
setThumbnailRegistry
public void setThumbnailRegistry(ThumbnailRegistry thumbnailRegistry)
-
setBaseAdminUsername
public void setBaseAdminUsername(String baseAdminUsername)
-
setTenantRoutingDataSource
public void setTenantRoutingDataSource(TenantRoutingDataSource trds)
-
setContentRootContainerPath
public void setContentRootContainerPath(String contentRootContainerPath)
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
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
-
startTenants
public void startTenants()
- Specified by:
startTenantsin interfaceTenantAdminService
-
stopTenants
public void stopTenants()
- Specified by:
stopTenantsin interfaceTenantAdminService
-
createTenant
public void createTenant(String tenantDomain, char[] tenantAdminRawPassword)
- Specified by:
createTenantin interfaceTenantAdminService
-
createTenant
public void createTenant(String tenantDomain, char[] tenantAdminRawPassword, String contentRoot)
- Specified by:
createTenantin interfaceTenantAdminService
-
createTenant
public void createTenant(String tenantDomainIn, char[] tenantAdminRawPassword, String contentRootPath, String dbUrl)
- Specified by:
createTenantin interfaceTenantAdminService
-
exportTenant
public void exportTenant(String tenantDomainIn, File directoryDestination)
Export tenant - equivalent to the tenant admin running a 'complete repo' export from the Web Client Admin- Specified by:
exportTenantin interfaceTenantAdminService
-
importTenant
public void importTenant(String tenantDomainIn, File directorySource, String contentRoot)
Create tenant by restoring from a complete repository export. This is equivalent to a bootstrap import using restore-context.xml.- Specified by:
importTenantin interfaceTenantAdminService
-
existsTenant
public boolean existsTenant(String tenantDomain)
- Specified by:
existsTenantin interfaceTenantAdminService
-
enableTenant
public void enableTenant(String tenantDomain)
- Specified by:
enableTenantin interfaceTenantAdminService
-
notifyAfterEnableTenant
protected void notifyAfterEnableTenant(String tenantDomain)
Call allTenantDeployersas the system tenant.
-
disableTenant
public void disableTenant(String tenantDomain)
- Specified by:
disableTenantin interfaceTenantAdminService
-
isEnabledTenant
public boolean isEnabledTenant(String tenantDomain)
- Specified by:
isEnabledTenantin interfaceTenantAdminService
-
getTenant
public org.alfresco.repo.tenant.Tenant getTenant(String tenantDomain)
- Specified by:
getTenantin interfaceTenantAdminService
-
deleteTenant
public void deleteTenant(String tenantDomain)
- Specified by:
deleteTenantin interfaceTenantAdminService
-
getAllTenants
@Deprecated public List<org.alfresco.repo.tenant.Tenant> getAllTenants()
Deprecated.- Specified by:
getAllTenantsin interfaceTenantAdminService- Returns:
- a list of all tenants regardless of state
-
getTenants
@Deprecated public List<org.alfresco.repo.tenant.Tenant> getTenants(boolean enabledOnly)
Deprecated.Description copied from interface:TenantAdminServiceRetrieve all tenants- Specified by:
getTenantsin interfaceTenantAdminService- Parameters:
enabledOnly- true to retrieve only active tenants- Returns:
- tenants, either active or all
-
deployTenants
public void deployTenants(org.alfresco.repo.tenant.TenantDeployer deployer, org.apache.commons.logging.Log logger)- Specified by:
deployTenantsin interfaceTenantAdminService
-
undeployTenants
public void undeployTenants(org.alfresco.repo.tenant.TenantDeployer deployer, org.apache.commons.logging.Log logger)- Specified by:
undeployTenantsin interfaceTenantAdminService
-
register
public void register(org.alfresco.repo.tenant.TenantDeployer deployer)
- Specified by:
registerin interfaceTenantAdminService
-
unregister
public void unregister(org.alfresco.repo.tenant.TenantDeployer deployer)
- Specified by:
unregisterin interfaceTenantAdminService
-
register
public void register(WorkflowDeployer workflowDeployer)
- Specified by:
registerin interfaceTenantAdminService
-
tenantRoutingContentStore
protected TenantRoutingContentStore tenantRoutingContentStore(org.alfresco.repo.content.ContentStore contentStore)
-
isTenantRoutingContentStore
protected boolean isTenantRoutingContentStore(org.alfresco.repo.content.ContentStore contentStore)
-
tenantDeployer
protected org.alfresco.repo.tenant.TenantDeployer tenantDeployer(org.alfresco.repo.content.ContentStore contentStore)
-
isTenantDeployer
protected boolean isTenantDeployer(org.alfresco.repo.content.ContentStore contentStore)
-
validateTenantName
protected void validateTenantName(String tenantDomain)
- See Also:
MAX_LEN,REGEX_CONTAINS_ALPHA,REGEX_VALID_DNS_LABEL
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceorg.alfresco.repo.tenant.TenantUserService
-
getCurrentUserDomain
public String getCurrentUserDomain()
- Specified by:
getCurrentUserDomainin interfaceorg.alfresco.repo.tenant.TenantUserService
-
getUserDomain
public String getUserDomain(String username)
- Specified by:
getUserDomainin interfaceorg.alfresco.repo.tenant.TenantUserService
-
getBaseNameUser
public String getBaseNameUser(String username)
- Specified by:
getBaseNameUserin interfaceorg.alfresco.repo.tenant.TenantUserService
-
getDomainUser
public String getDomainUser(String baseUsername, String tenantDomain)
- Specified by:
getDomainUserin interfaceorg.alfresco.repo.tenant.TenantUserService
-
-