1 25 26 package org.snipsnap.interceptor.custom; 27 28 import org.radeox.util.logging.Logger; 29 import org.snipsnap.interceptor.InterceptorSupport; 30 import org.snipsnap.interceptor.Invocation; 31 import org.snipsnap.snip.Snip; 32 33 public class StoreInterceptor extends InterceptorSupport { 34 public StoreInterceptor() { 35 super(); 36 } 37 38 public Object invoke(Invocation invocation) throws Throwable { 39 if (invocation.getMethod().getName().startsWith("store")) { 40 Snip snip = (Snip) invocation.getArgs()[0]; 41 if (snip.getName().startsWith("macro-")) { 42 Logger.debug("Store on macro called."); 43 } 44 } 45 return invocation.next(); 46 } 47 } 48 | Popular Tags |