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: a5d693562082bbadf9a86612fe2a37bfda91f65d $

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 inline)
          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 inline)
           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
inline - whether the content should be parsed as inline content (not top level paragraph, etc)
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.