Class LinkParserHelper

  • All Implemented Interfaces:
    com.atlassian.renderer.v2.components.WikiContentHandler

    public class LinkParserHelper
    extends Object
    implements com.atlassian.renderer.v2.components.WikiContentHandler
    This is a helper class to extract links.

    It maintains a list of currently extracted links while the content is being parsed. This class should be instantiated each time it is needed. See ConfluenceLinkResolver.

    • Constructor Detail

      • LinkParserHelper

        public LinkParserHelper​(String pageContent,
                                com.atlassian.renderer.v2.macro.MacroManager macroManager,
                                SettingsManager settingsManager)
    • Method Detail

      • handleMacro

        public void handleMacro​(StringBuffer buffer,
                                com.atlassian.renderer.v2.components.MacroTag macroTag,
                                String body)
        Specified by:
        handleMacro in interface com.atlassian.renderer.v2.components.WikiContentHandler
      • handleText

        public void handleText​(StringBuffer buffer,
                               String s)
        Specified by:
        handleText in interface com.atlassian.renderer.v2.components.WikiContentHandler
      • extractLinks

        public List<String> extractLinks()