mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
This checkin does two things:
1. Refines the semantics of ghost creation, so that they only appear when warranted. 2. Implements a mechanism for filtering out files which should not appear in comparison results or be pushed along by updates. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4525 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -31,6 +31,7 @@ import org.alfresco.service.cmr.avmsync.AVMSyncException;
|
||||
import org.alfresco.service.cmr.avmsync.AVMSyncService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.NameMatcher;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
@@ -55,6 +56,11 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
|
||||
*/
|
||||
private AVMSyncService fAVMSyncService;
|
||||
|
||||
/**
|
||||
* The Excluding NameMatcher.
|
||||
*/
|
||||
private NameMatcher fExcluder;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
@@ -81,6 +87,16 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
|
||||
fAVMSyncService = avmSyncService;
|
||||
}
|
||||
|
||||
// TODO This should be a parameter of the action execution really.
|
||||
/**
|
||||
* Set the excluder.
|
||||
* @param excluder
|
||||
*/
|
||||
public void setExcluder(NameMatcher excluder)
|
||||
{
|
||||
fExcluder = excluder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the action. The NodeRef must be an AVM NodeRef.
|
||||
* @param action Don't actually need anything from this here.
|
||||
@@ -114,10 +130,10 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
|
||||
String avmDest = websiteName + "-staging:" + storePath[1];
|
||||
// Get the difference between source and destination.
|
||||
List<AVMDifference> diffs =
|
||||
fAVMSyncService.compare(version, path, -1, avmDest);
|
||||
fAVMSyncService.compare(version, path, -1, avmDest, fExcluder);
|
||||
// TODO fix update comments at some point.
|
||||
// Do the update.
|
||||
fAVMSyncService.update(diffs, false, false, true, true,
|
||||
fAVMSyncService.update(diffs, fExcluder, false, false, true, true,
|
||||
"Submit of item: " + AVMNodeConverter.SplitBase(path)[1], null);
|
||||
// Cleanup by flattening the source relative to the destination.
|
||||
AVMDAOs.Instance().fAVMNodeDAO.flush();
|
||||
|
Reference in New Issue
Block a user