mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
124145 amorarasu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2) 124106 rmunteanu: Merged V4.2-BUG-FIX (4.2.7) to 5.0.N (5.0.4) 124105 amorarasu: Merged V4.1-BUG-FIX (4.1.11) to V4.2-BUG-FIX (4.2.7) 123915 rmunteanu: Merged V4.1.7 (4.1.7.18) to V4.1-BUG-FIX (4.1.11) MNT-15801 : onContentUpdate policies not working for updates via webdav - Reverted changes made for MNT-11185 and MNT-10966 , reverts that will fix MNT-15746 - Changed fix for MNT-5882 by adding the ASPECT_NO_CONTENT after the content is updated, this way preventing MNT-10966 from reproducing git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@124228 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -231,11 +231,6 @@ public class PutMethod extends WebDAVMethod implements ActivityPostProducer
|
|||||||
getDAVHelper().getPolicyBehaviourFilter().disableBehaviour(nodeRef, ContentModel.ASPECT_VERSIONABLE);
|
getDAVHelper().getPolicyBehaviourFilter().disableBehaviour(nodeRef, ContentModel.ASPECT_VERSIONABLE);
|
||||||
disabledVersioning = true;
|
disabledVersioning = true;
|
||||||
}
|
}
|
||||||
// ALF-16756: To avoid firing inbound rules too early (while a node is still locked) apply the no content aspect
|
|
||||||
if (nodeLockInfo != null && nodeLockInfo.isExclusive() && !(ContentData.hasContent(contentData) && contentData.getSize() > 0))
|
|
||||||
{
|
|
||||||
getNodeService().addAspect(contentNodeInfo.getNodeRef(), ContentModel.ASPECT_NO_CONTENT, null);
|
|
||||||
}
|
|
||||||
// Access the content
|
// Access the content
|
||||||
ContentWriter writer = fileFolderService.getWriter(contentNodeInfo.getNodeRef());
|
ContentWriter writer = fileFolderService.getWriter(contentNodeInfo.getNodeRef());
|
||||||
|
|
||||||
@@ -245,10 +240,20 @@ public class PutMethod extends WebDAVMethod implements ActivityPostProducer
|
|||||||
|
|
||||||
// Get the input stream from the request data
|
// Get the input stream from the request data
|
||||||
InputStream is = m_request.getInputStream();
|
InputStream is = m_request.getInputStream();
|
||||||
|
|
||||||
|
|
||||||
// Write the new data to the content node
|
// Write the new data to the content node
|
||||||
writer.putContent(is);
|
writer.putContent(is);
|
||||||
|
|
||||||
|
// ALF-16756: To avoid firing inbound rules too early (while a node is still locked) apply the no content aspect
|
||||||
|
// Note, for MNT-15801, that the aspect is only applied if:
|
||||||
|
// - the node is locked AND
|
||||||
|
// - the node does not have any content (zero length binaries included)
|
||||||
|
if (nodeLockInfo != null && nodeLockInfo.getToken() != null && !(ContentData.hasContent(contentData) && contentData.getSize() > 0))
|
||||||
|
{
|
||||||
|
getNodeService().addAspect(contentNodeInfo.getNodeRef(), ContentModel.ASPECT_NO_CONTENT, null);
|
||||||
|
}
|
||||||
|
|
||||||
// Ask for the document metadata to be extracted
|
// Ask for the document metadata to be extracted
|
||||||
Action extract = getActionService().createAction(ContentMetadataExtracter.EXECUTOR_NAME);
|
Action extract = getActionService().createAction(ContentMetadataExtracter.EXECUTOR_NAME);
|
||||||
if(extract != null)
|
if(extract != null)
|
||||||
|
Reference in New Issue
Block a user