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:
Jan Vonka
2008-02-11 11:53:56 +00:00
parent 1f36c62b18
commit 14ef325e93
13 changed files with 101 additions and 80 deletions

View File

@@ -36,7 +36,6 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.tenant.Tenant;
import org.alfresco.repo.tenant.TenantDeployerService;
import org.alfresco.repo.tenant.TenantService;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.admin.PatchException;
import org.alfresco.service.cmr.repository.NodeService;
@@ -88,8 +87,6 @@ public abstract class AbstractPatch implements Patch
/** support service */
protected AuthenticationComponent authenticationComponent;
/** support service */
protected TenantService tenantService;
/** support service */
protected TenantDeployerService tenantDeployerService;
@@ -164,11 +161,6 @@ public abstract class AbstractPatch implements Patch
this.authenticationComponent = authenticationComponent;
}
public void setTenantService(TenantService tenantService)
{
this.tenantService = tenantService;
}
public void setTenantDeployerService(TenantDeployerService tenantDeployerService)
{
this.tenantDeployerService = tenantDeployerService;
@@ -380,8 +372,7 @@ public abstract class AbstractPatch implements Patch
String report = applyInternal();
if ((tenantService != null) && (tenantDeployerService != null) &&
tenantService.isEnabled() && applyToTenants)
if ((tenantDeployerService != null) && tenantDeployerService.isEnabled() && applyToTenants)
{
List<Tenant> tenants = tenantDeployerService.getAllTenants();
for (Tenant tenant : tenants)
@@ -393,7 +384,7 @@ public abstract class AbstractPatch implements Patch
{
return applyInternal();
}
}, tenantService.getDomainUser(AuthenticationUtil.getSystemUserName(), tenantDomain));
}, tenantDeployerService.getDomainUser(AuthenticationUtil.getSystemUserName(), tenantDomain));
report = report + "\n" + tenantReport + " (for tenant: " + tenantDomain + ")";
}