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

@@ -39,11 +39,9 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
import org.alfresco.service.cmr.repository.datatype.TypeConversionException;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.PropertyCheck;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* A method interceptor to clean up node ref properties as they are passed in and out of the node service. For
@@ -55,8 +53,6 @@ import org.apache.commons.logging.LogFactory;
*/
public class NodeRefPropertyMethodInterceptor implements MethodInterceptor
{
private static Log logger = LogFactory.getLog(NodeRefPropertyMethodInterceptor.class);
private boolean filterOnGet = true;
private boolean filterOnSet = true;
@@ -92,10 +88,6 @@ public class NodeRefPropertyMethodInterceptor implements MethodInterceptor
private DictionaryService getDictionaryService()
{
if (dictionaryService == null)
{
dictionaryService = (DictionaryService) ApplicationContextHelper.getApplicationContext().getBean("dictionaryService");
}
return dictionaryService;
}
@@ -106,12 +98,14 @@ public class NodeRefPropertyMethodInterceptor implements MethodInterceptor
private NodeService getNodeService()
{
if (nodeService == null)
{
nodeService = (NodeService) ApplicationContextHelper.getApplicationContext().getBean("mlAwareNodeService");
}
return nodeService;
}
public void init()
{
PropertyCheck.mandatory(this, "dictionaryService", dictionaryService);
PropertyCheck.mandatory(this, "nodeService", nodeService);
}
@SuppressWarnings("unchecked")
public Object invoke(MethodInvocation invocation) throws Throwable