MT Share - minor fix to upgrade patch for existing tenants (result message)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13783 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2009-03-31 13:03:24 +00:00
parent 2709828df3
commit 8581c334f9
2 changed files with 8 additions and 1 deletions

View File

@@ -258,3 +258,4 @@ patch.webSiteAddModerated.result=Changed Web Site visibility.
patch.mtShareExistingTenants.description=Update existing tenants for MT Share. patch.mtShareExistingTenants.description=Update existing tenants for MT Share.
patch.mtShareExistingTenants.result=Update existing tenants for MT Share. patch.mtShareExistingTenants.result=Update existing tenants for MT Share.
patch.mtShareExistingTenants.result.not_applicable=Patch applied, although no changes made since MT is not enabled.

View File

@@ -38,7 +38,8 @@ import org.alfresco.repo.workflow.WorkflowDeployer;
*/ */
public class MultiTShareExistingTenantsPatch extends AbstractPatch public class MultiTShareExistingTenantsPatch extends AbstractPatch
{ {
private static final String MSG_RESULT = "patch.mtShareExitingTenants.result"; private static final String MSG_RESULT = "patch.mtShareExistingTenants.result";
private static final String MSG_RESULT_NA = "patch.mtShareExistingTenants.result.not_applicable";
private SiteAVMBootstrap siteBootstrap; private SiteAVMBootstrap siteBootstrap;
private WorkflowDeployer workflowPatchDeployer; private WorkflowDeployer workflowPatchDeployer;
@@ -81,6 +82,11 @@ public class MultiTShareExistingTenantsPatch extends AbstractPatch
@Override @Override
protected String applyInternal() throws Exception protected String applyInternal() throws Exception
{ {
if (!tenantService.isEnabled())
{
return I18NUtil.getMessage(MSG_RESULT_NA);
}
if (! tenantService.getCurrentUserDomain().equals(TenantService.DEFAULT_DOMAIN)) if (! tenantService.getCurrentUserDomain().equals(TenantService.DEFAULT_DOMAIN))
{ {
this.siteBootstrap.bootstrap(); this.siteBootstrap.bootstrap();