Interface MacroBlockFinder


  • @Role
    public interface MacroBlockFinder
    Searches for xwiki macros inside XDOMs.
    Since:
    1.4.0
    Version:
    $Id$
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  MacroBlockFinder.Lookup
      An enum defining the actions to be done after finding a macro in the XDOM.
    • Method Detail

      • find

        org.xwiki.rendering.block.XDOM find​(org.xwiki.rendering.block.XDOM content,
                                            org.xwiki.rendering.syntax.Syntax syntax,
                                            Function<org.xwiki.rendering.block.MacroBlock,​MacroBlockFinder.Lookup> function)
                                     throws org.xwiki.rendering.macro.MacroExecutionException
        Parameters:
        content - the content that will be searched recursively for macro blocks.
        syntax - the syntax of the content.
        function - function the function that is executed when a macro block is found. It receives the found MacroBlock and returns a MacroBlockFinder.Lookup value. BREAK if the lookup should stop; SKIP if the content of the current macro should not be parsed; CONTINUE if the content of the current macro should be parsed.
        Returns:
        the modified content.
        Throws:
        org.xwiki.rendering.macro.MacroExecutionException