|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.block.match.BlockNavigator
public class BlockNavigator
Tool to navigate in a tree of blocks and extract them based on configurable criteria.
| Constructor Summary | |
|---|---|
BlockNavigator()
The default matcher does not filter anything. |
|
BlockNavigator(BlockMatcher matcher)
|
|
| Method Summary | ||
|---|---|---|
|
getBlocks(Block currentBlock,
Block.Axes currentAxes)
Get all blocks following provided BlockMatcher and Block.Axes. |
|
|
getFirstBlock(Block currentBlock,
Block.Axes currentAxes)
Get the first matched block in the provided Block.Axes. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlockNavigator()
public BlockNavigator(BlockMatcher matcher)
matcher - used to filter the result of the various methods| Method Detail |
|---|
public <T extends Block> List<T> getBlocks(Block currentBlock,
Block.Axes currentAxes)
BlockMatcher and Block.Axes.
T - the class of the Blocks to returncurrentBlock - the block to start searching fromcurrentAxes - indicate the search axes
Blocks, empty list of none was found
public <T extends Block> T getFirstBlock(Block currentBlock,
Block.Axes currentAxes)
Block.Axes.
T - the class of the Block to returncurrentBlock - the block to start searching fromcurrentAxes - indicate the search axes
Block, null if none was found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||