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:
Britt Park
2006-12-05 22:26:02 +00:00
parent b89caeb3e5
commit 8b65510d6f
20 changed files with 304 additions and 129 deletions

View File

@@ -19,6 +19,8 @@ package org.alfresco.service.cmr.avmsync;
import java.util.List;
import org.alfresco.util.NameMatcher;
/**
* This service handles comparisons and synchronizations between
* corresponding avm node trees.
@@ -32,11 +34,13 @@ public interface AVMSyncService
* @param srcPath The avm path to the source tree.
* @param dstVersion The version id for the destination tree.
* @param dstPath The avm path to the destination tree.
* @param excluder A NameMatcher used to exclude files from consideration.
* @return A List of AVMDifference structs which can be used for
* the update operation.
*/
public List<AVMDifference> compare(int srcVersion, String srcPath,
int dstVersion, String dstPath);
int dstVersion, String dstPath,
NameMatcher excluder);
/**
* Updates the destination nodes in the AVMDifferences
@@ -56,7 +60,7 @@ public interface AVMSyncService
* @param tag Short comment.
* @param description Full update blurb.
*/
public void update(List<AVMDifference> diffList, boolean ignoreConflicts, boolean ignoreOlder,
public void update(List<AVMDifference> diffList, NameMatcher excluder, boolean ignoreConflicts, boolean ignoreOlder,
boolean overrideConflicts, boolean overrideOlder, String tag, String description);
/**

View File

@@ -6,6 +6,7 @@ package org.alfresco.service.cmr.remote;
import java.util.List;
import org.alfresco.service.cmr.avmsync.AVMDifference;
import org.alfresco.util.NameMatcher;
/**
* A wrapper around AVMSyncService for remote access.
@@ -24,7 +25,8 @@ public interface AVMSyncServiceTransport
*/
public List<AVMDifference> compare(String ticket,
int srcVersion, String srcPath,
int dstVersion, String dstPath);
int dstVersion, String dstPath,
NameMatcher excluder);
/**
* Updates the destination nodes in the AVMDifferences
@@ -32,6 +34,7 @@ public interface AVMSyncServiceTransport
* which the source of an AVMDifference is older than the destination
* will cause the transaction to roll back.
* @param diffList A List of AVMDifference structs.
* @param excluder A NameMatcher to exclude undesired updates.
* @param ignoreConflicts If this is true the update will skip those
* AVMDifferences which are in conflict with
* the destination.
@@ -44,7 +47,8 @@ public interface AVMSyncServiceTransport
* @param tag Short comment.
* @param description Full update blurb.
*/
public void update(String ticket, List<AVMDifference> diffList, boolean ignoreConflicts, boolean ignoreOlder,
public void update(String ticket, List<AVMDifference> diffList,
NameMatcher excluder, boolean ignoreConflicts, boolean ignoreOlder,
boolean overrideConflicts, boolean overrideOlder, String tag, String description);
/**