Fixed for MT Node Interceptor

- When MT is enabled, there is still a problem with the translation of NodeRefs for the UserUsage component


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10795 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-09-05 15:58:48 +00:00
parent 77eb167c2b
commit 178cd74b26
5 changed files with 51 additions and 215 deletions

View File

@@ -236,6 +236,11 @@ public class UserUsageTrackingComponent
for (NodeRef personNodeRef : allPeople)
{
// Cater for Lucene indexes being stale
if (!nodeService.exists(personNodeRef))
{
continue;
}
Long currentUsage = (Long)nodeService.getProperty(personNodeRef, ContentModel.PROP_SIZE_CURRENT);
if (currentUsage == null)
{
@@ -361,6 +366,11 @@ public class UserUsageTrackingComponent
public Object execute() throws Throwable
{
NodeRef personNodeRef = personService.getPerson(username);
if (!nodeService.exists(personNodeRef))
{
// Ignore
return null;
}
contentUsageImpl.setUserStoredUsage(personNodeRef, currentUsage);
usageService.deleteDeltas(personNodeRef);
return null;