mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Reworked addAspect so that it wouldn't be quite so achingly slow.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4006 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -548,8 +548,8 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
throw new InvalidNodeRefException("Read Only node.", nodeRef);
|
throw new InvalidNodeRefException("Read Only node.", nodeRef);
|
||||||
}
|
}
|
||||||
String avmPath = avmVersionPath.getSecond();
|
String avmPath = avmVersionPath.getSecond();
|
||||||
// Get the current node properties.
|
// Accumulate properties.
|
||||||
Map<QName, Serializable> properties = getProperties(nodeRef);
|
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||||
// Add the supplied properties.
|
// Add the supplied properties.
|
||||||
if (aspectProperties != null)
|
if (aspectProperties != null)
|
||||||
{
|
{
|
||||||
@@ -560,7 +560,21 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
// Now add any cascading aspects.
|
// Now add any cascading aspects.
|
||||||
addDefaultAspects(aspectDef, avmPath, properties);
|
addDefaultAspects(aspectDef, avmPath, properties);
|
||||||
// Set the property values on the AVM Node.
|
// Set the property values on the AVM Node.
|
||||||
setProperties(nodeRef, properties);
|
if (properties.size() != 0)
|
||||||
|
{
|
||||||
|
Map<QName, PropertyValue> props = new HashMap<QName, PropertyValue>();
|
||||||
|
for (Map.Entry<QName, Serializable> entry : properties.entrySet())
|
||||||
|
{
|
||||||
|
if (!isBuiltInProperty(entry.getKey()))
|
||||||
|
{
|
||||||
|
props.put(entry.getKey(), new PropertyValue(null, entry.getValue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (props.size() != 0)
|
||||||
|
{
|
||||||
|
fAVMService.setNodeProperties(avmPath, props);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (isBuiltinAspect(aspectTypeQName))
|
if (isBuiltinAspect(aspectTypeQName))
|
||||||
{
|
{
|
||||||
// No more work to do in this case.
|
// No more work to do in this case.
|
||||||
|
Reference in New Issue
Block a user