public class

DefaultMacroIconManager

extends Object
implements MacroIconManager
java.lang.Object
   ↳ com.atlassian.confluence.macro.browser.DefaultMacroIconManager

Summary

Public Constructors
DefaultMacroIconManager(HttpRetrievalService httpRetrievalService, ServletContextFactory servletContextFactory, WebResourceManager webResourceManager, PluginResourceLocator pluginResourceLocator)
Public Methods
String getExternalSmallIconUrl(MacroMetadata macroMetadata)
Retrieve a the Url to a small icon for a macro.
InputStream getIconStream(MacroMetadata macroMetadata)
Retrieve an inputStream of the macro's icon.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.macro.browser.MacroIconManager

Public Constructors

public DefaultMacroIconManager (HttpRetrievalService httpRetrievalService, ServletContextFactory servletContextFactory, WebResourceManager webResourceManager, PluginResourceLocator pluginResourceLocator)

Public Methods

public String getExternalSmallIconUrl (MacroMetadata macroMetadata)

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.

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.

public InputStream getIconStream (MacroMetadata macroMetadata)

Retrieve an inputStream of the macro's icon.

Parameters
macroMetadata the metadata for the macro
Returns
  • the input stream of the best icon for the macro. The default is the placeholder icon.