org.xwiki.rendering.macro
Interface MacroContentParser


@Role
public interface MacroContentParser

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

Since:
3.3M1
Version:
$Id: 11705a93005685904731d8b588c1098a2e0b5f83 $

Method Summary
 Syntax getCurrentSyntax(MacroTransformationContext context)
          Find the current syntax to use for macro supporting wiki content/parameters/whatever.
 XDOM 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.
 

Method Detail

parse

XDOM 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

getCurrentSyntax

Syntax getCurrentSyntax(MacroTransformationContext context)
Find the current syntax to use for macro supporting wiki content/parameters/whatever.

Parameters:
context - the macro execution context containing the default syntax and the current macro block
Returns:
the current syntax


Copyright © 2004-2013 XWiki. All Rights Reserved.