diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml index 5f570ae9b0..5dba500294 100644 --- a/config/alfresco/web-scripts-application-context.xml +++ b/config/alfresco/web-scripts-application-context.xml @@ -37,7 +37,7 @@ - + @@ -140,7 +140,7 @@ - + @@ -339,7 +339,6 @@ - diff --git a/source/java/org/alfresco/repo/web/scripts/RepoStore.java b/source/java/org/alfresco/repo/web/scripts/RepoStore.java index cc5ae7a383..d9b7aeccb0 100644 --- a/source/java/org/alfresco/repo/web/scripts/RepoStore.java +++ b/source/java/org/alfresco/repo/web/scripts/RepoStore.java @@ -41,7 +41,7 @@ import org.alfresco.model.ContentModel; import org.alfresco.repo.model.filefolder.FileFolderServiceImpl; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.tenant.TenantDeployer; -import org.alfresco.repo.tenant.TenantDeployerService; +import org.alfresco.repo.tenant.TenantService; import org.alfresco.repo.transaction.RetryingTransactionHelper; import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; import org.alfresco.service.cmr.model.FileFolderService; @@ -86,7 +86,7 @@ public class RepoStore implements Store, TenantDeployer protected FileFolderService fileService; protected NamespaceService namespaceService; protected PermissionService permissionService; - protected TenantDeployerService tenantDeployerService; + protected TenantService tenantService; /** @@ -148,9 +148,9 @@ public class RepoStore implements Store, TenantDeployer /** * Sets the tenant deployer service */ - public void setTenantDeployerService(TenantDeployerService tenantDeployerService) + public void setTenantService(TenantService tenantService) { - this.tenantDeployerService = tenantDeployerService; + this.tenantService = tenantService; } /** @@ -200,12 +200,12 @@ public class RepoStore implements Store, TenantDeployer */ public void destroy() { - baseNodeRefs.remove(tenantDeployerService.getCurrentUserDomain()); + baseNodeRefs.remove(tenantService.getCurrentUserDomain()); } private NodeRef getBaseNodeRef() { - String tenantDomain = tenantDeployerService.getCurrentUserDomain(); + String tenantDomain = tenantService.getCurrentUserDomain(); NodeRef baseNodeRef = baseNodeRefs.get(tenantDomain); if (baseNodeRef == null) { diff --git a/source/java/org/alfresco/repo/web/scripts/RepositoryContainer.java b/source/java/org/alfresco/repo/web/scripts/RepositoryContainer.java index f8ef4c63cf..582f6739ca 100644 --- a/source/java/org/alfresco/repo/web/scripts/RepositoryContainer.java +++ b/source/java/org/alfresco/repo/web/scripts/RepositoryContainer.java @@ -33,9 +33,9 @@ import javax.servlet.http.HttpServletResponse; import org.alfresco.repo.cache.SimpleCache; import org.alfresco.repo.model.Repository; import org.alfresco.repo.security.authentication.AuthenticationUtil; -import org.alfresco.repo.template.CropContentMethod; +import org.alfresco.repo.tenant.TenantAdminService; import org.alfresco.repo.tenant.TenantDeployer; -import org.alfresco.repo.tenant.TenantDeployerService; +import org.alfresco.repo.tenant.TenantService; import org.alfresco.repo.transaction.AlfrescoTransactionSupport; import org.alfresco.repo.transaction.RetryingTransactionHelper; import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; @@ -78,7 +78,8 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten private AuthorityService authorityService; private PermissionService permissionService; private DescriptorService descriptorService; - private TenantDeployerService tenantDeployerService; + private TenantService tenantService; + private TenantAdminService tenantAdminService; private ObjectFactory registryFactory; private SimpleCache webScriptsRegistryCache; @@ -146,13 +147,18 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten } /** - * @param tenantDeployerService + * @param tenantAdminService */ - public void setTenantDeployerService(TenantDeployerService tenantDeployerService) + public void setTenantService(TenantService tenantService) { - this.tenantDeployerService = tenantDeployerService; + this.tenantService = tenantService; } + public void setTenantAdminService(TenantAdminService tenantAdminService) + { + this.tenantAdminService = tenantAdminService; + } + /* (non-Javadoc) * @see org.alfresco.web.scripts.Container#getDescription() */ @@ -336,7 +342,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten @Override public Registry getRegistry() { - String tenantDomain = tenantDeployerService.getCurrentUserDomain(); + String tenantDomain = tenantService.getCurrentUserDomain(); Registry registry = webScriptsRegistryCache.get(tenantDomain); if (registry == null) { @@ -377,10 +383,10 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten */ public void init() { - tenantDeployerService.register(this); + tenantAdminService.register(this); Registry registry = (Registry)registryFactory.getObject(); - webScriptsRegistryCache.put(tenantDeployerService.getCurrentUserDomain(), registry); + webScriptsRegistryCache.put(tenantService.getCurrentUserDomain(), registry); super.reset(); } @@ -390,6 +396,6 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten */ public void destroy() { - webScriptsRegistryCache.remove(tenantDeployerService.getCurrentUserDomain()); + webScriptsRegistryCache.remove(tenantService.getCurrentUserDomain()); } }