org.xwiki.rendering.internal.macro
Interface MacroContentParser

All Known Implementing Classes:
DefaultMacroContentParser

@ComponentRole
public interface MacroContentParser

Parses content of a macro field (parameter, macro content) in a given syntax.

Since:
3.0M1
Version:
$Id$

Method Summary
 List<Block> parse(String content, MacroTransformationContext macroContext, boolean transform, boolean removeTopLevelParagraph)
          Parses content of a macro field (parameter, macro content) in a given syntax and optionally remove the top level paragraph.
 XDOM parseXDOM(String content, MacroTransformationContext macroContext, boolean transform, boolean removeTopLevelParagraph)
          Parses content of a macro field (parameter, macro content) in a given syntax and optionally remove the top level paragraph.
 

Method Detail

parse

List<Block> parse(String content,
                  MacroTransformationContext macroContext,
                  boolean transform,
                  boolean removeTopLevelParagraph)
                  throws MacroExecutionException
Parses content of a macro field (parameter, macro content) in a given syntax and optionally remove the top level paragraph.

Parameters:
content - the content to parse
macroContext - the executing Macro context (from which to get the current syntax, etc)
transform - if true then executes transformations
removeTopLevelParagraph - whether the top level paragraph should be removed after parsing
Returns:
the result as a Blocks
Throws:
MacroExecutionException - in case of a parsing error

parseXDOM

XDOM parseXDOM(String content,
               MacroTransformationContext macroContext,
               boolean transform,
               boolean removeTopLevelParagraph)
               throws MacroExecutionException
Parses content of a macro field (parameter, macro content) in a given syntax and optionally remove the top level paragraph.

Parameters:
content - the content to parse
macroContext - the executing Macro context (from which to get the current syntax, etc)
transform - if true then executes transformations
removeTopLevelParagraph - whether the top level paragraph should be removed after parsing
Returns:
the result as a Blocks
Throws:
MacroExecutionException - in case of a parsing error


Copyright © 2004-2011 XWiki. All Rights Reserved.