Package org.xwiki.rendering.block
Class XDOM
- java.lang.Object
-
- org.xwiki.rendering.block.AbstractBlock
-
- org.xwiki.rendering.block.MetaDataBlock
-
- org.xwiki.rendering.block.XDOM
-
public class XDOM extends MetaDataBlock
Contains the full tree ofBlock
that represent a XWiki Document's content.- Since:
- 1.5M2
- Version:
- $Id: 3998f0620584de8f63a524f6b1a129b40e296764 $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
-
-
Field Summary
Fields Modifier and Type Field Description static XDOM
EMPTY
Constructs an empty XDOM.-
Fields inherited from interface org.xwiki.rendering.block.Block
LIST_BLOCK_TYPE
-
-
Constructor Summary
Constructors Constructor Description XDOM(List<? extends Block> childBlocks)
XDOM(List<? extends Block> childBlocks, MetaData metaData)
XDOM(List<? extends Block> childBlocks, IdGenerator idGenerator)
XDOM(List<? extends Block> childBlocks, IdGenerator idGenerator, MetaData metaData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
after(Listener listener)
SendListener
events corresponding to the end of the block.void
before(Listener listener)
SendListener
events corresponding to the start of the block.XDOM
clone()
IdGenerator
getIdGenerator()
void
setIdGenerator(IdGenerator idGenerator)
-
Methods inherited from class org.xwiki.rendering.block.MetaDataBlock
equals, getMetaData, hashCode, toString
-
Methods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, clone, getBlocks, getChildren, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getPreviousSibling, getRoot, indexOf, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock, traverse
-
-
-
-
Field Detail
-
EMPTY
public static final XDOM EMPTY
Constructs an empty XDOM. Useful for example when calling a macro that doesn't use the XDOM parameter passed to it.
-
-
Constructor Detail
-
XDOM
public XDOM(List<? extends Block> childBlocks)
- Parameters:
childBlocks
- the list of children blocks of the block to construct- See Also:
AbstractBlock(List)
-
XDOM
public XDOM(List<? extends Block> childBlocks, MetaData metaData)
- Parameters:
childBlocks
- the list of children blocks of the block to constructmetaData
- the meta data to add for this block- See Also:
AbstractBlock(List)
-
XDOM
public XDOM(List<? extends Block> childBlocks, IdGenerator idGenerator)
- Parameters:
childBlocks
- the list of children blocks of the block to constructidGenerator
- a stateful id generator for this document
-
XDOM
public XDOM(List<? extends Block> childBlocks, IdGenerator idGenerator, MetaData metaData)
- Parameters:
childBlocks
- the list of children blocks of the block to constructmetaData
- the meta data to add for this blockidGenerator
- a stateful id generator for this document- See Also:
AbstractBlock(List)
-
-
Method Detail
-
getIdGenerator
public IdGenerator getIdGenerator()
- Returns:
- a stateful id generator for the whole document.
-
setIdGenerator
public void setIdGenerator(IdGenerator idGenerator)
- Parameters:
idGenerator
- a stateful id generator for the whole document.- Since:
- 2.1M1
-
before
public void before(Listener listener)
Description copied from class:AbstractBlock
SendListener
events corresponding to the start of the block. For example for a Bold block, this allows an XHTML Listener (aka a Renderer) to output<b>
.- Overrides:
before
in classMetaDataBlock
- Parameters:
listener
- the listener that will receive the events sent by this block before its children blocks have emitted their own events.
-
after
public void after(Listener listener)
Description copied from class:AbstractBlock
SendListener
events corresponding to the end of the block. For example for a Bold block, this allows an XHTML Listener (aka a Renderer) to output</b>
.- Overrides:
after
in classMetaDataBlock
- Parameters:
listener
- the listener that will receive the events sent by this block before its children blocks have emitted their own events.
-
clone
public XDOM clone()
- Specified by:
clone
in interfaceBlock
- Overrides:
clone
in classMetaDataBlock
- Returns:
- the cloned Block
- See Also:
Object.clone()
-
-