- Preformance improvement to Auditable Aspect suggested by community

- PHP library refactoring
- Associated changes to tests and examples

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5646 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall 2007-05-09 13:22:50 +00:00
parent 6c332588a9
commit a38206915f

View File

@ -258,12 +258,17 @@ public class AuditableAspect
*/
public Boolean doWork() throws Exception
{
for (QName propertyQName : properties.keySet())
{
Serializable property = properties.get(propertyQName);
nodeService.setProperty(nodeRef, propertyQName, property);
}
return Boolean.TRUE;
// Set all the properties in one nodeService call to avoid multiple calls to onUpdateProperties
Map<QName, Serializable> allProps = nodeService.getProperties(nodeRef);
for (QName propertyQName : properties.keySet())
{
Serializable property = properties.get(propertyQName);
allProps.put(propertyQName, property);
}
nodeService.setProperties(nodeRef, allProps);
return Boolean.TRUE;
}
}