Fixed tabs during review

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@109608 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2015-08-05 11:02:28 +00:00
parent d16d3c4516
commit 0a1c57a07e

View File

@@ -203,7 +203,7 @@ public class ModuleComponentHelper
/* /*
* Ensure transactionality and the correct authentication * Ensure transactionality and the correct authentication
*/ */
AuthenticationUtil.runAs(new RunAsWork<Object>() AuthenticationUtil.runAs(new RunAsWork<Object>()
{ {
public Object doWork() throws Exception public Object doWork() throws Exception
{ {
@@ -244,82 +244,82 @@ public class ModuleComponentHelper
} }
} }
} }
final List<Tenant> tenants = tenantsNonFinal; final List<Tenant> tenants = tenantsNonFinal;
for (final ModuleDetails module : modules) for (final ModuleDetails module : modules)
{ {
RetryingTransactionCallback<Object> startModuleWork = new RetryingTransactionCallback<Object>() RetryingTransactionCallback<Object> startModuleWork = new RetryingTransactionCallback<Object>()
{ {
public Object execute() throws Exception public Object execute() throws Exception
{ {
startModule(module, mapStartedModules.get(tenantDomainCtx), mapExecutedComponents.get(tenantDomainCtx)); startModule(module, mapStartedModules.get(tenantDomainCtx), mapExecutedComponents.get(tenantDomainCtx));
if (tenants != null) if (tenants != null)
{ {
for (Tenant tenant : tenants) for (Tenant tenant : tenants)
{ {
final String tenantDomain = tenant.getTenantDomain(); final String tenantDomain = tenant.getTenantDomain();
TenantUtil.runAsSystemTenant(new TenantRunAsWork<Object>() TenantUtil.runAsSystemTenant(new TenantRunAsWork<Object>()
{ {
public Object doWork() throws Exception public Object doWork() throws Exception
{ {
startModule(module, mapStartedModules.get(tenantDomain), mapExecutedComponents.get(tenantDomain)); startModule(module, mapStartedModules.get(tenantDomain), mapExecutedComponents.get(tenantDomain));
return null; return null;
} }
}, tenantDomain); }, tenantDomain);
} }
} }
return null; return null;
} }
}; };
transactionService.getRetryingTransactionHelper().doInTransaction(startModuleWork, transactionService.isReadOnly()); transactionService.getRetryingTransactionHelper().doInTransaction(startModuleWork, transactionService.isReadOnly());
} }
// Check for missing modules. // Check for missing modules.
checkForMissingModules(); checkForMissingModules();
if (tenants != null) if (tenants != null)
{ {
for (Tenant tenant : tenants) for (Tenant tenant : tenants)
{ {
TenantUtil.runAsSystemTenant(new TenantRunAsWork<Object>() TenantUtil.runAsSystemTenant(new TenantRunAsWork<Object>()
{ {
public Object doWork() throws Exception public Object doWork() throws Exception
{ {
checkForMissingModules(); checkForMissingModules();
return null; return null;
} }
}, tenant.getTenantDomain()); }, tenant.getTenantDomain());
} }
} }
// Check that all components where executed, or considered for execution // Check that all components where executed, or considered for execution
checkForOrphanComponents(mapExecutedComponents.get(tenantDomainCtx)); checkForOrphanComponents(mapExecutedComponents.get(tenantDomainCtx));
if (tenants != null) if (tenants != null)
{ {
for (Tenant tenant : tenants) for (Tenant tenant : tenants)
{ {
final String tenantDomain = tenant.getTenantDomain(); final String tenantDomain = tenant.getTenantDomain();
TenantUtil.runAsSystemTenant(new TenantRunAsWork<Object>() TenantUtil.runAsSystemTenant(new TenantRunAsWork<Object>()
{ {
public Object doWork() throws Exception public Object doWork() throws Exception
{ {
checkForOrphanComponents(mapExecutedComponents.get(tenantDomain)); checkForOrphanComponents(mapExecutedComponents.get(tenantDomain));
return null; return null;
} }
}, tenantDomain); }, tenantDomain);
} }
} }
} }
catch (Throwable e) catch (Throwable e)
{ {
throw new AlfrescoRuntimeException("Failed to start modules", e); throw new AlfrescoRuntimeException("Failed to start modules", e);
} }
return null; return null;
} }
}, AuthenticationUtil.getSystemUserName()); }, AuthenticationUtil.getSystemUserName());
} }