mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-10717: Renditions doclib and webpreview accumulates (not replaced) when creating new version using Edit Offline
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32129 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -49,6 +49,7 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.EqualsHelper;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -326,14 +327,35 @@ public class RenditionedAspect implements NodeServicePolicies.OnUpdateProperties
|
||||
{
|
||||
private static final CopyBehaviourCallback INSTANCE = new RenditionedAspectCopyBehaviourCallback();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* We do not copy the {@link RenditionModel#ASPECT_RENDITIONED rn:renditioned} aspect.
|
||||
*/
|
||||
@Override
|
||||
public boolean getMustCopy(QName classQName, CopyDetails copyDetails)
|
||||
{
|
||||
// Prevent the copying of the renditioned aspect only.
|
||||
return (! RenditionModel.ASPECT_RENDITIONED.equals(classQName));
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<AssocCopySourceAction, AssocCopyTargetAction> getAssociationCopyAction(
|
||||
QName classQName,
|
||||
CopyDetails copyDetails,
|
||||
CopyAssociationDetails assocCopyDetails)
|
||||
{
|
||||
return new Pair<AssocCopySourceAction, AssocCopyTargetAction>(
|
||||
AssocCopySourceAction.IGNORE,
|
||||
AssocCopyTargetAction.USE_COPIED_OTHERWISE_ORIGINAL_TARGET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChildAssocCopyAction getChildAssociationCopyAction(
|
||||
QName classQName,
|
||||
CopyDetails copyDetails,
|
||||
CopyChildAssociationDetails childAssocCopyDetails)
|
||||
{
|
||||
return ChildAssocCopyAction.IGNORE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user