Interface WikiMacroFactory
-
@Role public interface WikiMacroFactory
Create a Wiki Macro object by gathering the Macro metadata from a document.- Since:
- 2.0RC1
- Version:
- $Id: 9bee96a35af06909dd7f826cf7504dac4961ee33 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 aWikiMacro
if a definition is found on the given document.boolean
isAllowed(org.xwiki.model.reference.DocumentReference documentReference, WikiMacroVisibility visibility)
-
-
-
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 aWikiMacro
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
-
isAllowed
boolean isAllowed(org.xwiki.model.reference.DocumentReference documentReference, WikiMacroVisibility visibility)
- Parameters:
documentReference
- the name of the document containing the wiki macro definitionvisibility
- the visibility required- Returns:
- true if the passed visibility is allowed for the passed document.
- Since:
- 4.2M1
-
-