Class MacroInfo
- java.lang.Object
-
- org.xwiki.rendering.wikimodel.xhtml.impl.MacroInfo
-
public class MacroInfo extends Object
This class represents some generic information related to macro and their parsing / rendering.- Since:
- 10.10RC1
- Version:
- $Id: 8968954a36123670519eec791304ddf57cf691f6 $
-
-
Field Summary
Fields Modifier and Type Field Description static StringMACRO_STARTDefine the comment marker for starting a macro.static StringMACRO_STOPDefine the comment marker for finishing a macro.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContent()WikiScannerContextgetContentScannerContext()StringgetName()WikiParametersgetParameters()WikiScannerContextgetParameterScannerContext(String parameter)voidsetContent(String content)Allow to specify the content of the macro when changed in a non generated content block.voidsetContentScannerContext(WikiScannerContext contentScannerContext)voidsetParameters(WikiParameters parameters)Allow to set new parameters for this macro.voidsetParameterScannerContext(String parameter, WikiScannerContext scannerContext)
-
-
-
Field Detail
-
MACRO_START
public static final String MACRO_START
Define the comment marker for starting a macro.- See Also:
- Constant Field Values
-
MACRO_STOP
public static final String MACRO_STOP
Define the comment marker for finishing a macro.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MacroInfo
public MacroInfo(String content)
Build a MacroInfo based on the content of a comment.- Parameters:
content- A comment representing a macro. It must start with a startmacro comment markerMACRO_START.
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name of the macro.
-
getParameters
public WikiParameters getParameters()
- Returns:
- the parameters of the macro.
-
setParameters
public void setParameters(WikiParameters parameters)
Allow to set new parameters for this macro.- Parameters:
parameters- the parameters to set.- Since:
- 11.1RC1
-
getContent
public String getContent()
- Returns:
- the content of the macro.
-
setContent
public void setContent(String content)
Allow to specify the content of the macro when changed in a non generated content block.- Parameters:
content- the new content of the macro.
-
getContentScannerContext
public WikiScannerContext getContentScannerContext()
- Returns:
- the scanner context that is used to parse the content of the macro.
- Since:
- 11.4RC1
-
setContentScannerContext
public void setContentScannerContext(WikiScannerContext contentScannerContext)
- Parameters:
contentScannerContext- the scanner context that is used to parse the content of the macro.- Since:
- 11.4RC1
-
setParameterScannerContext
public void setParameterScannerContext(String parameter, WikiScannerContext scannerContext)
- Parameters:
parameter- a parameter name of the macroscannerContext- the scanner context that is used to parse the specified parameter of the macro.- Since:
- 11.4RC1
-
getParameterScannerContext
public WikiScannerContext getParameterScannerContext(String parameter)
- Parameters:
parameter- a parameter name of the macro- Returns:
- the scanner context that is used to parse the specified parameter of the macro.
- Since:
- 11.4RC1
-
-