com.atlassian.confluence.macro.browser
Class DefaultMacroIconManager

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

public class DefaultMacroIconManager
extends Object
implements MacroIconManager


Constructor Summary
DefaultMacroIconManager(HttpRetrievalService httpRetrievalService, com.atlassian.plugin.servlet.ServletContextFactory servletContextFactory, com.atlassian.plugin.webresource.WebResourceManager webResourceManager, com.atlassian.plugin.webresource.PluginResourceLocator pluginResourceLocator)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMacroIconManager

public DefaultMacroIconManager(HttpRetrievalService httpRetrievalService,
                               com.atlassian.plugin.servlet.ServletContextFactory servletContextFactory,
                               com.atlassian.plugin.webresource.WebResourceManager webResourceManager,
                               com.atlassian.plugin.webresource.PluginResourceLocator pluginResourceLocator)
Method Detail

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.


Copyright © 2003-2012 Atlassian. All Rights Reserved.