AnsweredAssumed Answered

Custom NodeService Interceptor problem

Question asked by janasko on Feb 22, 2007
Latest reply on Mar 7, 2007 by derek
Alfresco version: 1.4.

I'm trying to intercept calls to NodeService to notify other parties of created/modified/etc content.
The problem is that I'm only getting addAspect calls with null values when new content is created from the web interface. What is expected is a createNode call!
Is the method of implementation right or should it be done differently?

br, Jani Askolin / Quosis Oy

The implementation follows:

modified public-services-context.xml fragment:

    <!– Node Service –>
    <bean id="NodeService" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="proxyInterfaces">
        <property name="target">
            <ref bean="nodeService"/>
        <property name="interceptorNames">
<!– quosis node service interceptor –>
                <idref local="NodeInterceptor" />

                <idref local="NodeService_transaction"/>
                <idref local="AuditMethodInterceptor"/>
                <idref local="exceptionTranslator"/>
                <idref bean="NodeService_security"/>
                <idref local="NodeService_descriptor"/>

And fragment:

public class NodeInterceptor implements MethodInterceptor
    public Object invoke(MethodInvocation invocation) throws Throwable
        Object o = invocation.proceed();
        System.out.println( "ALFRESCO NODESERVICE: "+invocation );
        return o;