Class LinkBlock

java.lang.Object
org.xwiki.rendering.block.AbstractBlock
org.xwiki.rendering.block.LinkBlock
All Implemented Interfaces:
Cloneable, Block

public class LinkBlock extends AbstractBlock
Represents a Link element in a page.
Since:
1.5M2
Version:
$Id: 3c8452834a64287bbbd0a2b1ee08f1256403f033 $
  • Constructor Details

    • LinkBlock

      public LinkBlock(List<Block> childrenBlocks, ResourceReference reference, boolean freestanding)
      Parameters:
      childrenBlocks - the nested children blocks
      reference - the reference to the target resource to link to
      freestanding - 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 blocks
      reference - the reference to the target resource to link to
      freestanding - if true then the link is a free standing URI directly in the text
      parameters - the parameters to set
      Since:
      2.5RC1
  • Method Details

    • getReference

      public ResourceReference getReference()
      Returns:
      the reference to the target to link to
      Since:
      2.5RC1
      See Also:
    • 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
      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 AbstractBlock
      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 AbstractBlock
      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 interface Block
      Overrides:
      clone in class AbstractBlock
      Parameters:
      blockFilter - the Block filter.
      Returns:
      the filtered Block.
      Since:
      1.8RC2
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractBlock
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractBlock