mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-10198: Module component execution passes installed version not current version at component start-up
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30277 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -561,7 +561,7 @@ public class ModuleComponentHelper
|
|||||||
Map<String, ModuleComponent> componentsByName = getComponents(moduleId);
|
Map<String, ModuleComponent> componentsByName = getComponents(moduleId);
|
||||||
for (ModuleComponent component : componentsByName.values())
|
for (ModuleComponent component : componentsByName.values())
|
||||||
{
|
{
|
||||||
executeComponent(moduleId, moduleInstallVersion, component, executedComponents);
|
executeComponent(moduleId, moduleNewVersion, component, executedComponents);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep track of the ID as it started successfully
|
// Keep track of the ID as it started successfully
|
||||||
@@ -579,7 +579,7 @@ public class ModuleComponentHelper
|
|||||||
*/
|
*/
|
||||||
private void executeComponent(
|
private void executeComponent(
|
||||||
String moduleId,
|
String moduleId,
|
||||||
VersionNumber moduleInstallVersion,
|
VersionNumber currentVersion,
|
||||||
ModuleComponent component,
|
ModuleComponent component,
|
||||||
Set<ModuleComponent> executedComponents)
|
Set<ModuleComponent> executedComponents)
|
||||||
{
|
{
|
||||||
@@ -600,7 +600,7 @@ public class ModuleComponentHelper
|
|||||||
// Check the version applicability
|
// Check the version applicability
|
||||||
VersionNumber minVersion = component.getAppliesFromVersionNumber();
|
VersionNumber minVersion = component.getAppliesFromVersionNumber();
|
||||||
VersionNumber maxVersion = component.getAppliesToVersionNumber();
|
VersionNumber maxVersion = component.getAppliesToVersionNumber();
|
||||||
if (moduleInstallVersion.compareTo(minVersion) < 0 || moduleInstallVersion.compareTo(maxVersion) > 0)
|
if (currentVersion.compareTo(minVersion) < 0 || currentVersion.compareTo(maxVersion) > 0)
|
||||||
{
|
{
|
||||||
// It is out of the allowable range for execution so we just ignore it
|
// It is out of the allowable range for execution so we just ignore it
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
@@ -608,7 +608,7 @@ public class ModuleComponentHelper
|
|||||||
logger.debug("Skipping component that doesn't apply to the module installation version: \n" +
|
logger.debug("Skipping component that doesn't apply to the module installation version: \n" +
|
||||||
" Component: " + component + "\n" +
|
" Component: " + component + "\n" +
|
||||||
" Module: " + moduleId + "\n" +
|
" Module: " + moduleId + "\n" +
|
||||||
" Install Version: " + moduleInstallVersion + "\n" +
|
" Current Version: " + currentVersion + "\n" +
|
||||||
" Applies From : " + minVersion + "\n" +
|
" Applies From : " + minVersion + "\n" +
|
||||||
" Applies To : " + maxVersion);
|
" Applies To : " + maxVersion);
|
||||||
}
|
}
|
||||||
@@ -639,7 +639,7 @@ public class ModuleComponentHelper
|
|||||||
List<ModuleComponent> dependencies = component.getDependsOn();
|
List<ModuleComponent> dependencies = component.getDependsOn();
|
||||||
for (ModuleComponent dependency : dependencies)
|
for (ModuleComponent dependency : dependencies)
|
||||||
{
|
{
|
||||||
executeComponent(moduleId, moduleInstallVersion, dependency, executedComponents);
|
executeComponent(moduleId, currentVersion, dependency, executedComponents);
|
||||||
}
|
}
|
||||||
// Execute the component itself
|
// Execute the component itself
|
||||||
component.execute();
|
component.execute();
|
||||||
|
Reference in New Issue
Block a user