mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user