org.xwiki.rendering.macro.velocity.filter
Interface VelocityMacroFilter


@Role
public interface VelocityMacroFilter

Component called before and after velocity execution in velocity macro to modify the content to execute or parse. It can be used for example to reformat the velocity content to take care of indentation etc.

Version:
$Id: b97b50e56118be8ff2152dc169177588e15d5d89 $

Method Summary
 String after(String content, org.apache.velocity.VelocityContext velocityContext)
          Called just before the result of the velocity script execution is parsed.
 String before(String content, org.apache.velocity.VelocityContext velocityContext)
          Called just before the velocity script is executed.
 

Method Detail

before

String before(String content,
              org.apache.velocity.VelocityContext velocityContext)
Called just before the velocity script is executed.

Parameters:
content - the velocity script
velocityContext - the velocity context. this method can inject here bindings usable in the script like $somebinding.
Returns:
the modified content

after

String after(String content,
             org.apache.velocity.VelocityContext velocityContext)
Called just before the result of the velocity script execution is parsed.

Parameters:
content - the result of the velocity script execution
velocityContext - the velocity context. This method usually clean the bindings injected in the velocity context by before(String, VelocityContext)
Returns:
the modified content


Copyright © 2004-2012 XWiki. All Rights Reserved.