Package org.xwiki.rendering.block
Class MacroBlock
java.lang.Object
org.xwiki.rendering.block.AbstractBlock
org.xwiki.rendering.block.AbstractMacroBlock
org.xwiki.rendering.block.MacroBlock
Represents a Macro (standalone or inline) defined in a page.
Note: You can get macro parameters using AbstractBlock.getParameters() for example. Macro block is reusing Block standard
custom parameters API since macro by definition already have parameters and don't need also block parameters. So in
this case MacroBlock parameters and Block parameters are the same thing.
- Since:
- 1.8M2
- Version:
- $Id: 7d323433124ae72fd49076eb0e96b057bed18e09 $
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes -
Field Summary
Fields inherited from interface org.xwiki.rendering.block.Block
LIST_BLOCK_TYPE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.xwiki.rendering.block.AbstractMacroBlock
equals, getContent, getId, hashCode, isInlineMethods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, after, before, clone, clone, get, getAttribute, getAttributes, getBlocks, getChildren, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getPreviousSibling, getRoot, getSyntaxMetadata, indexOf, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setAttribute, setAttributes, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock
-
Constructor Details
-
MacroBlock
- Parameters:
id- the id of the macroparameters- the parameters of the macroisInline- indicate if the macro is located in a inline content (like paragraph, etc.)
-
MacroBlock
- Parameters:
id- the id of the macroparameters- the parameters of the macrocontent- the content of the macro. Null if the macro does not have contentisInline- indicate if the macro is located in a inline content (like paragraph, etc.)
-
-
Method Details
-
traverse
Description copied from interface:BlockLet the block sendListenerevents corresponding to its content. For example a Paragraph block will send theListener.beginParagraph(java.util.Map<java.lang.String, java.lang.String>)andListener.endParagraph(java.util.Map<java.lang.String, java.lang.String>)events when this method is called.- Specified by:
traversein interfaceBlock- Overrides:
traversein classAbstractBlock- Parameters:
listener- the listener to which to send the events to.
-