public interface

MacroIconManager

com.atlassian.confluence.macro.browser.MacroIconManager
Known Indirect Subclasses

Class Overview

Allows retrieval of appropriate icons from MacroMetadata. The specified icon locations can be retrieved directly from a MacroMetadata, but this class handles falling back to default locations and retrieving the image streams themselves.

Summary

Public Methods
abstract String getExternalSmallIconUrl(MacroMetadata macroMetadata)
Retrieve a the Url to a small icon for a macro.
abstract InputStream getIconStream(MacroMetadata macroMetadata)
Retrieve an inputStream of the macro's icon.

Public Methods

public abstract 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 abstract 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.