org.xwiki.rendering.macro.wikibridge
Interface WikiMacroFactory


@ComponentRole
public interface WikiMacroFactory

Create a Wiki Macro object by gathering the Macro metadata from a document.

Since:
2.0RC1
Version:
$Id$

Method Summary
 boolean containsWikiMacro(org.xwiki.model.reference.DocumentReference documentReference)
          Searches the given document for a wiki macro definition.
 WikiMacro createWikiMacro(org.xwiki.model.reference.DocumentReference documentReference)
          Tries to build a WikiMacro if a definition is found on the given document.
 

Method Detail

containsWikiMacro

boolean containsWikiMacro(org.xwiki.model.reference.DocumentReference documentReference)
Searches the given document for a wiki macro definition.

Parameters:
documentReference - name of the document to search for a wiki macro definition.
Returns:
true if the given document contains a wiki macro definition, false otherwise.
Since:
2.2M1

createWikiMacro

WikiMacro createWikiMacro(org.xwiki.model.reference.DocumentReference documentReference)
                          throws WikiMacroException
Tries to build a WikiMacro if a definition is found on the given document.

Parameters:
documentReference - name of the document on which the macro is defined.
Returns:
a WikiMacro corresponding to the macro definition found.
Throws:
WikiMacroException - if no macro definition is found or if an error is encountered while building the macro.
Since:
2.2M1


Copyright © 2004-2012 XWiki. All Rights Reserved.