mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user