Merged 5.0.N (5.0.4) to 5.1.N (5.1.1)

118657 adavis: Merged 5.0.2-CLOUD42 (Cloud ) to 5.0.N (5.0.4)
      118656 adavis: Merged 5.0.2-CLOUD (Cloud ) to 5.0.2-CLOUD42 (Cloud )
         118655 adavis: Merged 5.0.2-PLUS (5.0.2-PLUS) to 5.0.2-CLOUD (Cloud )
            118542 amorarasu: Merged DEV to 5.0.2-PLUS (5.0.2-PLUS)
               117462 118473 amorarasu: MNT-15147: Cloud 40 Upgrade takes too long
                  - Make the patch.fixPersonSizeCurrentType to not apply to tenants
                  - Added support for making patch.addUnmovableAspect deferred


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@118716 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrei Rebegea
2015-11-27 09:17:00 +00:00
parent 721b1640e7
commit f7ac2331dd
6 changed files with 51 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2014 Alfresco Software Limited.
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -183,6 +183,10 @@ public class PatchServiceImpl implements PatchService
// go through all the patches and apply them where necessary
for (Patch patch : sortedPatches)
{
if(patch.isDeferred())
{
continue;
}
// apply the patch
success = applyPatchAndDependencies(patch, appliedPatchesById);
if (!success)
@@ -284,9 +288,9 @@ public class PatchServiceImpl implements PatchService
AppliedPatch appliedPatch = appliedPatchesById.get(id);
if (appliedPatch != null && appliedPatch.getSucceeded())
{
if (appliedPatch.getWasExecuted() && appliedPatch.getSucceeded())
if (appliedPatch.getWasExecuted())
{
// It was sucessfully executed
// It was successfully executed
return true;
}
// We give the patch another chance
@@ -549,6 +553,7 @@ public class PatchServiceImpl implements PatchService
patch.getId(),
I18NUtil.getMessage(patch.getDescription()));
logger.info(msg);
// the patch is executed regardless of the deferred flag value
report = (patch.isDeferred()) ? patch.applyAsync() : patch.apply();
state = STATE.APPLIED;
}