mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added onUpdateProperties callback to AVMNodeService.
This one callback slows down the AVM by close to 50%. Not good. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5921 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1266,7 +1266,13 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Map<QName, Serializable> propsBefore = new HashMap<QName, Serializable>();
|
||||||
|
// ContentData oldContentData = fAVMService.getContentDataForRead(-1, avmVersionPath.getSecond());
|
||||||
|
// propsBefore.put(ContentModel.PROP_CONTENT, oldContentData);
|
||||||
fAVMService.setContentData(avmVersionPath.getSecond(), (ContentData)value);
|
fAVMService.setContentData(avmVersionPath.getSecond(), (ContentData)value);
|
||||||
|
Map<QName, Serializable> propsAfter = new HashMap<QName, Serializable>();
|
||||||
|
propsAfter.put(ContentModel.PROP_CONTENT, value);
|
||||||
|
invokeOnUpdateProperties(nodeRef, propsBefore, propsAfter);
|
||||||
}
|
}
|
||||||
catch (ClassCastException e)
|
catch (ClassCastException e)
|
||||||
{
|
{
|
||||||
|
@@ -32,6 +32,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.i18n.I18NUtil;
|
import org.alfresco.i18n.I18NUtil;
|
||||||
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||||
import org.alfresco.repo.content.ContentServicePolicies.OnContentReadPolicy;
|
import org.alfresco.repo.content.ContentServicePolicies.OnContentReadPolicy;
|
||||||
import org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy;
|
import org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy;
|
||||||
@@ -551,8 +552,9 @@ public class RoutingContentService implements ContentService
|
|||||||
// Bypass NodeService for avm stores.
|
// Bypass NodeService for avm stores.
|
||||||
if (nodeRef.getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM))
|
if (nodeRef.getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM))
|
||||||
{
|
{
|
||||||
Pair<Integer, String> versionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
nodeService.setProperty(nodeRef, ContentModel.PROP_CONTENT, contentData);
|
||||||
avmService.setContentData(versionPath.getSecond(), contentData);
|
// Pair<Integer, String> versionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||||
|
// avmService.setContentData(versionPath.getSecond(), contentData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user