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

@@ -29,6 +29,7 @@ import java.util.List;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.cache.SimpleCache;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
@@ -91,6 +92,19 @@ public class MultiTServiceImpl implements TenantService
return new StoreRef(storeRef.getProtocol(), getName(storeRef.getIdentifier()));
}
public ChildAssociationRef getName(ChildAssociationRef childAssocRef)
{
// Check that all the passed values are not null
ParameterCheck.mandatory("ChildAssocRef", childAssocRef);
return new ChildAssociationRef(childAssocRef.getTypeQName(),
getName(childAssocRef.getParentRef()),
childAssocRef.getQName(),
getName(childAssocRef.getChildRef()),
childAssocRef.isPrimary(),
childAssocRef.getNthSibling());
}
public StoreRef getName(String username, StoreRef storeRef)
{
// Check that all the passed values are not null
@@ -227,6 +241,19 @@ public class MultiTServiceImpl implements TenantService
return new StoreRef(storeRef.getProtocol(), getBaseName(storeRef.getIdentifier()));
}
public ChildAssociationRef getBaseName(ChildAssociationRef childAssocRef)
{
// Check that all the passed values are not null
ParameterCheck.mandatory("ChildAssocRef", childAssocRef);
return new ChildAssociationRef(childAssocRef.getTypeQName(),
getBaseName(childAssocRef.getParentRef()),
childAssocRef.getQName(),
getBaseName(childAssocRef.getChildRef()),
childAssocRef.isPrimary(),
childAssocRef.getNthSibling());
}
public String getBaseName(String name)
{
// get base name, but don't force for non-tenant user (e.g. super admin)