org.xwiki.rendering.block
Class XDOM

java.lang.Object
  extended by org.xwiki.rendering.block.AbstractBlock
      extended by org.xwiki.rendering.block.MetaDataBlock
          extended by org.xwiki.rendering.block.XDOM
All Implemented Interfaces:
Cloneable, Block

public class XDOM
extends MetaDataBlock

Contains the full tree of Block that represent a XWiki Document's content.

Since:
1.5M2
Version:
$Id: 041ee4b01b313d95848d3ee5e21945c401d7ca87 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
 
Field Summary
static XDOM EMPTY
          Constructs an empty XDOM.
 
Constructor Summary
XDOM(List<Block> childBlocks)
           
XDOM(List<Block> childBlocks, IdGenerator idGenerator)
           
XDOM(List<Block> childBlocks, IdGenerator idGenerator, MetaData metaData)
           
XDOM(List<Block> childBlocks, MetaData metaData)
           
 
Method Summary
 void after(Listener listener)
          Send Listener events corresponding to the end of the block.
 void before(Listener listener)
          Send Listener 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
getMetaData
 
Methods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, clone, equals, getBlocks, getChildren, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getPreviousSibling, getRoot, hashCode, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock, traverse
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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<Block> childBlocks)
Parameters:
childBlocks - the list of children blocks of the block to construct
See Also:
AbstractBlock.AbstractBlock(List)

XDOM

public XDOM(List<Block> childBlocks,
            MetaData metaData)
Parameters:
childBlocks - the list of children blocks of the block to construct
metaData - the meta data to add for this block
See Also:
AbstractBlock.AbstractBlock(List)

XDOM

public XDOM(List<Block> childBlocks,
            IdGenerator idGenerator)
Parameters:
childBlocks - the list of children blocks of the block to construct
idGenerator - a stateful id generator for this document

XDOM

public XDOM(List<Block> childBlocks,
            IdGenerator idGenerator,
            MetaData metaData)
Parameters:
childBlocks - the list of children blocks of the block to construct
metaData - the meta data to add for this block
idGenerator - a stateful id generator for this document
See Also:
AbstractBlock.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
Send Listener 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 class MetaDataBlock
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
Send Listener 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 class MetaDataBlock
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 interface Block
Overrides:
clone in class MetaDataBlock
Returns:
the cloned Block
See Also:
Object.clone()


Copyright © 2004–2014 XWiki. All rights reserved.