Class LinkLabelGeneratorChainingListener

  • All Implemented Interfaces:
    org.xwiki.rendering.listener.chaining.ChainingListener, org.xwiki.rendering.listener.ImageListener, org.xwiki.rendering.listener.LinkListener, org.xwiki.rendering.listener.Listener

    public class LinkLabelGeneratorChainingListener
    extends org.xwiki.rendering.listener.chaining.AbstractChainingListener
    Chaining listener to generate labels for the links without labels and send these labels as events in the chain.
    Since:
    2.3M1
    Version:
    $Id: d9fc7300e9ab0b366e1111eeeeba70b6b04562fa $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.xwiki.rendering.renderer.reference.link.LinkLabelGenerator linkLabelGenerator
      The generator for the link labels.
      protected org.xwiki.rendering.parser.StreamParser linkLabelParser
      The parser for the link labels, used to parse the generated labels and create events to the next listener in the chain.
      • Fields inherited from interface org.xwiki.rendering.listener.Listener

        EMPTY_PARAMETERS
    • Constructor Summary

      Constructors 
      Constructor Description
      LinkLabelGeneratorChainingListener​(org.xwiki.rendering.renderer.reference.link.LinkLabelGenerator linkLabelGenerator, org.xwiki.rendering.parser.StreamParser linkLabelParser, org.xwiki.rendering.listener.chaining.ListenerChain listenerChain)
      Creates a new link generator chaining listener.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endLink​(org.xwiki.rendering.listener.reference.ResourceReference reference, boolean freestanding, Map<String,​String> parameters)
      protected org.xwiki.rendering.listener.chaining.EmptyBlockChainingListener getEmptyBlockState()  
      • Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener

        beginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginDocument, beginFigure, beginFigureCaption, beginFormat, beginGroup, beginHeader, beginLink, beginList, beginListItem, beginListItem, beginMacroMarker, beginMetaData, beginParagraph, beginQuotation, beginQuotationLine, beginSection, beginTable, beginTableCell, beginTableHeadCell, beginTableRow, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endDocument, endFigure, endFigureCaption, endFormat, endGroup, endHeader, endList, endListItem, endListItem, endMacroMarker, endMetaData, endParagraph, endQuotation, endQuotationLine, endSection, endTable, endTableCell, endTableHeadCell, endTableRow, getListenerChain, onEmptyLines, onHorizontalLine, onId, onImage, onImage, onMacro, onNewLine, onRawText, onSpace, onSpecialSymbol, onVerbatim, onWord, setListenerChain
    • Field Detail

      • linkLabelGenerator

        protected org.xwiki.rendering.renderer.reference.link.LinkLabelGenerator linkLabelGenerator
        The generator for the link labels.
      • linkLabelParser

        protected org.xwiki.rendering.parser.StreamParser linkLabelParser
        The parser for the link labels, used to parse the generated labels and create events to the next listener in the chain.
    • Constructor Detail

      • LinkLabelGeneratorChainingListener

        public LinkLabelGeneratorChainingListener​(org.xwiki.rendering.renderer.reference.link.LinkLabelGenerator linkLabelGenerator,
                                                  org.xwiki.rendering.parser.StreamParser linkLabelParser,
                                                  org.xwiki.rendering.listener.chaining.ListenerChain listenerChain)
        Creates a new link generator chaining listener.
        Parameters:
        linkLabelGenerator - the generator used to generate link labels
        linkLabelParser - the parser for the link labels, normally a plain text parser
        listenerChain - the chain this listener is part of
    • Method Detail

      • getEmptyBlockState

        protected org.xwiki.rendering.listener.chaining.EmptyBlockChainingListener getEmptyBlockState()
        Returns:
        the empty block chaining listener in this chain
      • endLink

        public void endLink​(org.xwiki.rendering.listener.reference.ResourceReference reference,
                            boolean freestanding,
                            Map<String,​String> parameters)
        Specified by:
        endLink in interface org.xwiki.rendering.listener.LinkListener
        Overrides:
        endLink in class org.xwiki.rendering.listener.chaining.AbstractChainingListener
        Since:
        2.5RC1
        See Also:
        AbstractChainingListener.endLink( org.xwiki.rendering.listener.reference.ResourceReference , boolean, java.util.Map)