Multi-Tenant node interceptor

- Actually less happening here than it would first appear
 - Some MT bean and interface consolidation
 - The unit test has no meat to it, yet... coming soon!


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-09-05 13:04:46 +00:00
parent f074588b0c
commit 77eb167c2b
35 changed files with 961 additions and 344 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.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -97,7 +98,8 @@ public class MultiTServiceImpl implements TenantService
// Check that all the passed values are not null
ParameterCheck.mandatory("ChildAssocRef", childAssocRef);
return new ChildAssociationRef(childAssocRef.getTypeQName(),
return new ChildAssociationRef(
childAssocRef.getTypeQName(),
getName(childAssocRef.getParentRef()),
childAssocRef.getQName(),
getName(childAssocRef.getChildRef()),
@@ -105,6 +107,18 @@ public class MultiTServiceImpl implements TenantService
childAssocRef.getNthSibling());
}
public AssociationRef getName(AssociationRef assocRef)
{
// Check that all the passed values are not null
ParameterCheck.mandatory("assocRef", assocRef);
return new AssociationRef(
getName(assocRef.getSourceRef()),
assocRef.getTypeQName(),
getName(assocRef.getTargetRef())
);
}
public StoreRef getName(String username, StoreRef storeRef)
{
// Check that all the passed values are not null