Package org.xwiki.rendering.block
Class LinkBlock
- java.lang.Object
-
- org.xwiki.rendering.block.AbstractBlock
-
- org.xwiki.rendering.block.LinkBlock
-
public class LinkBlock extends AbstractBlock
Represents a Link element in a page.- Since:
- 1.5M2
- Version:
- $Id: 3c8452834a64287bbbd0a2b1ee08f1256403f033 $
-
-
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
-
-
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.LinkBlock
clone(BlockFilter blockFilter)
Return a copy of the block with filtered children.boolean
equals(Object obj)
ResourceReference
getReference()
int
hashCode()
boolean
isFreeStandingURI()
-
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
-
-
-
-
Constructor Detail
-
LinkBlock
public LinkBlock(List<Block> childrenBlocks, ResourceReference reference, boolean freestanding)
- Parameters:
childrenBlocks
- the nested children blocksreference
- the reference to the target resource to link tofreestanding
- if true then the link is a free standing URI directly in the text- Since:
- 2.5RC1
-
LinkBlock
public LinkBlock(List<Block> childrenBlocks, ResourceReference reference, boolean freestanding, Map<String,String> parameters)
- Parameters:
childrenBlocks
- the nested children blocksreference
- the reference to the target resource to link tofreestanding
- if true then the link is a free standing URI directly in the textparameters
- the parameters to set- Since:
- 2.5RC1
-
-
Method Detail
-
getReference
public ResourceReference getReference()
- Returns:
- the reference to the target to link to
- Since:
- 2.5RC1
- See Also:
ResourceReference
-
isFreeStandingURI
public boolean isFreeStandingURI()
- Returns:
- true if the link is a free standing URI directly in the text, false otherwise
-
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 classAbstractBlock
- 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 classAbstractBlock
- Parameters:
listener
- the listener that will receive the events sent by this block before its children blocks have emitted their own events.
-
clone
public LinkBlock clone(BlockFilter blockFilter)
Return a copy of the block with filtered children.- Specified by:
clone
in interfaceBlock
- Overrides:
clone
in classAbstractBlock
- Parameters:
blockFilter
- the Block filter.- Returns:
- the filtered Block.
- Since:
- 1.8RC2
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractBlock
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractBlock
-
-