mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MT - simpify tenant deployer service (subsume tenant service)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8244 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,7 +37,6 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.tenant.TenantDeployer;
|
||||
import org.alfresco.repo.tenant.TenantDeployerService;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
@@ -80,9 +79,6 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
|
||||
|
||||
/** The node service */
|
||||
private NodeService nodeService;
|
||||
|
||||
/** The tenant service */
|
||||
private TenantService tenantService;
|
||||
|
||||
/** The tenant deployer service */
|
||||
private TenantDeployerService tenantDeployerService;
|
||||
@@ -135,16 +131,6 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the tenant service
|
||||
*
|
||||
* @param tenantService the tenant service
|
||||
*/
|
||||
public void setTenantService(TenantService tenantService)
|
||||
{
|
||||
this.tenantService = tenantService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the tenant admin service
|
||||
@@ -415,7 +401,7 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
if (tenantService.isEnabled())
|
||||
if (tenantDeployerService.isEnabled())
|
||||
{
|
||||
tenantDeployerService.deployTenants(this, logger);
|
||||
}
|
||||
@@ -438,7 +424,7 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
if (tenantService.isEnabled())
|
||||
if (tenantDeployerService.isEnabled())
|
||||
{
|
||||
tenantDeployerService.undeployTenants(this, logger);
|
||||
}
|
||||
@@ -465,7 +451,7 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
|
||||
// register with Message Service to allow (re-)init
|
||||
messageService.register(this);
|
||||
|
||||
if (tenantService.isEnabled())
|
||||
if (tenantDeployerService.isEnabled())
|
||||
{
|
||||
// register dictionary repository bootstrap
|
||||
tenantDeployerService.register(this);
|
||||
@@ -480,7 +466,7 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
|
||||
*/
|
||||
protected void unregister()
|
||||
{
|
||||
if (tenantService.isEnabled())
|
||||
if (tenantDeployerService.isEnabled())
|
||||
{
|
||||
// register dictionary repository bootstrap
|
||||
tenantDeployerService.unregister(this);
|
||||
|
@@ -9,7 +9,6 @@ import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.i18n.MessageService;
|
||||
import org.alfresco.repo.policy.BehaviourFilter;
|
||||
import org.alfresco.repo.tenant.TenantDeployerService;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryException;
|
||||
import org.alfresco.service.cmr.dictionary.ModelDefinition;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
@@ -70,9 +69,6 @@ public class DictionaryRepositoryBootstrapTest extends BaseAlfrescoSpringTest
|
||||
/** The transaction service */
|
||||
private TransactionService transactionService;
|
||||
|
||||
/** The tenant service */
|
||||
private TenantService tenantService;
|
||||
|
||||
/** The tenant deployer service */
|
||||
private TenantDeployerService tenantDeployerService;
|
||||
|
||||
@@ -96,8 +92,7 @@ public class DictionaryRepositoryBootstrapTest extends BaseAlfrescoSpringTest
|
||||
|
||||
this.searchService = (SearchService)this.applicationContext.getBean("searchService");
|
||||
this.dictionaryDAO = (DictionaryDAO)this.applicationContext.getBean("dictionaryDAO");
|
||||
this.transactionService = (TransactionService)this.applicationContext.getBean("transactionComponent");
|
||||
this.tenantService = (TenantService)this.applicationContext.getBean("tenantService");
|
||||
this.transactionService = (TransactionService)this.applicationContext.getBean("transactionComponent");
|
||||
this.tenantDeployerService = (TenantDeployerService)this.applicationContext.getBean("tenantAdminService");
|
||||
this.namespaceService = (NamespaceService)this.applicationContext.getBean("namespaceService");
|
||||
this.messageService = (MessageService)this.applicationContext.getBean("messageService");
|
||||
@@ -107,7 +102,6 @@ public class DictionaryRepositoryBootstrapTest extends BaseAlfrescoSpringTest
|
||||
this.bootstrap.setSearchService(this.searchService);
|
||||
this.bootstrap.setDictionaryDAO(this.dictionaryDAO);
|
||||
this.bootstrap.setTransactionService(this.transactionService);
|
||||
this.bootstrap.setTenantService(this.tenantService);
|
||||
this.bootstrap.setTenantDeployerService(this.tenantDeployerService);
|
||||
this.bootstrap.setNodeService(this.nodeService);
|
||||
this.bootstrap.setNamespaceService(this.namespaceService);
|
||||
|
Reference in New Issue
Block a user