@Around("execution(* org.apache.cocoon.sitemap.node.SerializeNode.invoke(..)) && args(invocation)")
public Object interceptInvoke(ProceedingJoinPoint proceedingJoinPoint, Invocation invocation) throws Throwable {
SerializeNode target = (SerializeNode) proceedingJoinPoint.getTarget();
String statusCode = invocation.resolveParameter(target.getParameters().get("status-code"));
InvocationResult invocationResult = (InvocationResult) proceedingJoinPoint.proceed();
if (invocationResult.isContinued() && statusCode != null) {
THREAD_LOCAL.set(Integer.valueOf(statusCode));
}
return invocationResult;
}