Class DefaultMacroIconManager

java.lang.Object
com.atlassian.confluence.macro.browser.DefaultMacroIconManager
All Implemented Interfaces:
MacroIconManager

public class DefaultMacroIconManager extends Object implements MacroIconManager
Since:
4.2.6
  • Constructor Details

    • DefaultMacroIconManager

      public DefaultMacroIconManager(com.atlassian.sal.api.net.RequestFactory<?> requestFactory, com.atlassian.plugin.servlet.ServletContextFactory servletContextFactory, com.atlassian.webresource.api.WebResourceUrlProvider webResourceUrlProvider, com.atlassian.plugin.webresource.PluginResourceLocator pluginResourceLocator)
      Since:
      7.0.1
  • Method Details

    • getExternalSmallIconUrl

      public String getExternalSmallIconUrl(MacroMetadata macroMetadata)
      Description copied from interface: MacroIconManager
      Retrieve a the Url to a small icon for a macro. This is the size used in the dropdown and the placeholders used in diffs.
      Specified by:
      getExternalSmallIconUrl in interface MacroIconManager
      Parameters:
      macroMetadata - the metadata for the macro to retrieve the icon url for
      Returns:
      an absolute url to the icon, it will be to the placeholder icon if no icon is specified and there isn't a local icon for the dropdown.
    • getIconStream

      public InputStream getIconStream(MacroMetadata macroMetadata)
      Description copied from interface: MacroIconManager
      Retrieve an inputStream of the macro's icon.
      Specified by:
      getIconStream in interface MacroIconManager
      Parameters:
      macroMetadata - the metadata for the macro
      Returns:
      the input stream of the best icon for the macro. The default is the placeholder icon.