mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Turning off flatten after submit for now as flatten is buggy.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3906 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -599,7 +599,7 @@ public class AVMSyncServiceImpl implements AVMSyncService
|
|||||||
{
|
{
|
||||||
throw new AVMNotFoundException("Not found: " + layerPath);
|
throw new AVMNotFoundException("Not found: " + layerPath);
|
||||||
}
|
}
|
||||||
AVMNodeDescriptor underlyingNode = fAVMService.lookup(-1, underlyingPath);
|
AVMNodeDescriptor underlyingNode = fAVMService.lookup(-1, underlyingPath, true);
|
||||||
if (underlyingNode == null)
|
if (underlyingNode == null)
|
||||||
{
|
{
|
||||||
throw new AVMNotFoundException("Not found: " + underlyingPath);
|
throw new AVMNotFoundException("Not found: " + underlyingPath);
|
||||||
@@ -644,14 +644,17 @@ public class AVMSyncServiceImpl implements AVMSyncService
|
|||||||
{
|
{
|
||||||
AVMNodeDescriptor topNode = layerListing.get(name);
|
AVMNodeDescriptor topNode = layerListing.get(name);
|
||||||
AVMNodeDescriptor bottomNode = underListing.get(name);
|
AVMNodeDescriptor bottomNode = underListing.get(name);
|
||||||
|
fgLogger.error("Trying to flatten out: " + name);
|
||||||
if (bottomNode == null)
|
if (bottomNode == null)
|
||||||
{
|
{
|
||||||
|
flattened = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// We've found an identity so flatten it.
|
// We've found an identity so flatten it.
|
||||||
if (topNode.getId() == bottomNode.getId())
|
if (topNode.getId() == bottomNode.getId())
|
||||||
{
|
{
|
||||||
fAVMRepository.flatten(layer, name);
|
fAVMRepository.flatten(layer, name);
|
||||||
|
fgLogger.error("Identity flattened: " + name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -659,6 +662,7 @@ public class AVMSyncServiceImpl implements AVMSyncService
|
|||||||
if (flatten(topNode, bottomNode))
|
if (flatten(topNode, bottomNode))
|
||||||
{
|
{
|
||||||
fAVMRepository.flatten(layer, name);
|
fAVMRepository.flatten(layer, name);
|
||||||
|
fgLogger.error("Recursively flattened: " + name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -706,5 +710,6 @@ public class AVMSyncServiceImpl implements AVMSyncService
|
|||||||
}
|
}
|
||||||
mkdirs(pathParts[0]);
|
mkdirs(pathParts[0]);
|
||||||
fAVMService.createDirectory(pathParts[0], pathParts[1]);
|
fAVMService.createDirectory(pathParts[0], pathParts[1]);
|
||||||
|
fgLogger.error("mkdir " + pathParts[0] + " " + pathParts[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ package org.alfresco.repo.avm.actions;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||||
|
import org.alfresco.repo.avm.AVMContext;
|
||||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||||
import org.alfresco.repo.domain.PropertyValue;
|
import org.alfresco.repo.domain.PropertyValue;
|
||||||
import org.alfresco.service.cmr.action.Action;
|
import org.alfresco.service.cmr.action.Action;
|
||||||
@@ -91,6 +92,7 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
|
|||||||
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(actionedUponNodeRef);
|
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(actionedUponNodeRef);
|
||||||
int version = (Integer)avmVersionPath[0];
|
int version = (Integer)avmVersionPath[0];
|
||||||
String path = (String)avmVersionPath[1];
|
String path = (String)avmVersionPath[1];
|
||||||
|
fgLogger.error(path);
|
||||||
// Get store name and path parts.
|
// Get store name and path parts.
|
||||||
String [] storePath = path.split(":");
|
String [] storePath = path.split(":");
|
||||||
if (storePath.length != 2)
|
if (storePath.length != 2)
|
||||||
@@ -113,10 +115,14 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
|
|||||||
// Get the difference between source and destination.
|
// Get the difference between source and destination.
|
||||||
List<AVMDifference> diffs =
|
List<AVMDifference> diffs =
|
||||||
fAVMSyncService.compare(version, path, -1, avmDest);
|
fAVMSyncService.compare(version, path, -1, avmDest);
|
||||||
|
for (AVMDifference diff : diffs)
|
||||||
|
{
|
||||||
|
fgLogger.error(diff);
|
||||||
|
}
|
||||||
// Do the update.
|
// Do the update.
|
||||||
fAVMSyncService.update(diffs, true, true, false, false);
|
fAVMSyncService.update(diffs, true, true, false, false);
|
||||||
// Cleanup by flattening the source relative to the destination.
|
// Cleanup by flattening the source relative to the destination.
|
||||||
fAVMSyncService.flatten(storePath[0] + ":/appBase", websiteName + "-staging:/appBase");
|
//fAVMSyncService.flatten(storePath[0] + ":/appBase", websiteName + "-staging:/appBase");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user