MT - fix delete node (to ensure tenant-specific re-index)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8143 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-01-31 16:23:09 +00:00
parent 5bdd6a9c8b
commit 694396d5ed
4 changed files with 46 additions and 14 deletions

View File

@@ -759,7 +759,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
invokeBeforeDeleteNode(nodeRef);
// get the primary parent-child relationship before it is gone
ChildAssociationRef childAssocRef = getPrimaryParent(nodeRef);
ChildAssociationRef childAssocRef = tenantService.getName(getPrimaryParent(nodeRef)); //note: tenant-specific for re-indexing
// get type and aspect QNames as they will be unavailable after the delete
QName nodeTypeQName = node.getTypeQName();
Set<QName> nodeAspectQNames = node.getAspects();
@@ -1255,13 +1255,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
// no match - ignore
continue;
}
ChildAssociationRef childAssocRef = new ChildAssociationRef(
assoc.getChildAssocRef().getTypeQName(),
tenantService.getBaseName(assoc.getChildAssocRef().getParentRef()),
assoc.getChildAssocRef().getQName(),
tenantService.getBaseName(assoc.getChildAssocRef().getChildRef()),
assoc.getChildAssocRef().isPrimary(),
assoc.getChildAssocRef().getNthSibling());
ChildAssociationRef childAssocRef = tenantService.getBaseName(assoc.getChildAssocRef());
results.add(childAssocRef);
}
// done
@@ -1357,12 +1351,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
}
else
{
assocRef = new ChildAssociationRef(assoc.getChildAssocRef().getTypeQName(),
tenantService.getBaseName(assoc.getChildAssocRef().getParentRef()),
assoc.getChildAssocRef().getQName(),
tenantService.getBaseName(assoc.getChildAssocRef().getChildRef()),
assoc.getChildAssocRef().isPrimary(),
assoc.getChildAssocRef().getNthSibling());
assocRef = tenantService.getBaseName(assoc.getChildAssocRef());
}
return assocRef;
}