ALF-5041 - replication action - send renditions/thumbnails as well as content. Share needs the thumbnails.

Also strip off versionable aspect since transferring versions is not yet implemented.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22919 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2010-10-06 13:34:45 +00:00
parent 28dcad6dba
commit 88b31b6d3a

View File

@@ -23,6 +23,7 @@ import java.util.List;
import java.util.Set;
import org.alfresco.model.ContentModel;
import org.alfresco.model.RenditionModel;
import org.alfresco.repo.action.ActionCancelledException;
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
import org.alfresco.repo.lock.JobLockService;
@@ -173,10 +174,14 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
Set<NodeRef> toTransfer = new HashSet<NodeRef>(89);
NodeCrawler crawler = nodeCrawlerFactory.getNodeCrawler();
crawler.setNodeFinders(new ChildAssociatedNodeFinder(ContentModel.ASSOC_CONTAINS));
crawler.setNodeFinders(new ChildAssociatedNodeFinder(
ContentModel.ASSOC_CONTAINS,
RenditionModel.ASSOC_RENDITION
));
crawler.setNodeFilters(new ContentClassFilter(
ContentModel.TYPE_FOLDER,
ContentModel.TYPE_CONTENT
ContentModel.TYPE_CONTENT,
ContentModel.TYPE_THUMBNAIL
));
for(NodeRef payload : replicationDef.getPayload())
@@ -212,8 +217,9 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
// Exclude aspects from transfer
// NOTE: this list of aspects should be synced up with the NodeCrawler in expandPayload to
// ensure a coherent set of nodes are transferred
transferDefinition.setExcludedAspects(RuleModel.ASPECT_RULES);
transferDefinition.setExcludedAspects(RuleModel.ASPECT_RULES,
ContentModel.ASPECT_VERSIONABLE);
return transferDefinition;
}