public class

GadgetMacro

extends BaseMacro
implements EditorImagePlaceholder Macro ResourceAware
java.lang.Object
   ↳ com.atlassian.renderer.v2.macro.BaseMacro
     ↳ com.atlassian.confluence.plugins.gadgets.GadgetMacro

Summary

Constants
String AUTHOR_PARAMETER
String BORDER_PARAMETER
String DEFAULT_WIDTH
String PREFERENCES_PARAMETER
String URL_PARAMETER
String WIDTH_PARAMETER
[Expand]
Inherited Constants
From interface com.atlassian.renderer.v2.macro.Macro
Public Constructors
GadgetMacro(GadgetViewFactory gadgetViewFactory, WebResourceManager webResourceManager, GadgetWhiteListManager whiteListManager, I18nResolver resolver, RequestContextBuilder requestContextBuilder, GadgetSpecFactory gadgetSpecFactory, GadgetCounter gadgetCounter)
Public Methods
String execute(Map<StringString> params, String body, ConversionContext conversionContext)
String execute(Map paramsRaw, String body, RenderContext renderContext)
RenderMode getBodyRenderMode()
Macro.BodyType getBodyType()
XHTML Gadget Code
ImagePlaceholder getImagePlaceholder(Map<StringString> parameters, ConversionContext context)
Returns an ImagePlaceholder instance to be displayed in the editor.
Macro.OutputType getOutputType()
String getResourcePath()
boolean hasBody()
Wiki Markup Gadget Code
void setResourcePath(String resourcePath)
Protected Methods
String getPredefinedGadgetUrl()
boolean isGadgetUrlPredefined()
[Expand]
Inherited Methods
From class com.atlassian.renderer.v2.macro.BaseMacro
From class java.lang.Object
From interface com.atlassian.confluence.macro.EditorImagePlaceholder
From interface com.atlassian.confluence.macro.Macro
From interface com.atlassian.confluence.macro.ResourceAware
From interface com.atlassian.renderer.v2.macro.Macro

Constants

public static final String AUTHOR_PARAMETER

Constant Value: "author"

public static final String BORDER_PARAMETER

Constant Value: "border"

public static final String DEFAULT_WIDTH

Constant Value: "450"

public static final String PREFERENCES_PARAMETER

Constant Value: "preferences"

public static final String URL_PARAMETER

Constant Value: "url"

public static final String WIDTH_PARAMETER

Constant Value: "width"

Public Constructors

public GadgetMacro (GadgetViewFactory gadgetViewFactory, WebResourceManager webResourceManager, GadgetWhiteListManager whiteListManager, I18nResolver resolver, RequestContextBuilder requestContextBuilder, GadgetSpecFactory gadgetSpecFactory, GadgetCounter gadgetCounter)

Public Methods

public String execute (Map<StringString> params, String body, ConversionContext conversionContext)

public String execute (Map paramsRaw, String body, RenderContext renderContext)

Throws
MacroException

public RenderMode getBodyRenderMode ()

public Macro.BodyType getBodyType ()

XHTML Gadget Code

Returns
  • The type of body this macro has.

public ImagePlaceholder getImagePlaceholder (Map<StringString> parameters, ConversionContext context)

Returns an ImagePlaceholder instance to be displayed in the editor.

Returns
  • The image details to render in the editor.

public Macro.OutputType getOutputType ()

public String getResourcePath ()

public boolean hasBody ()

Wiki Markup Gadget Code

public void setResourcePath (String resourcePath)

Protected Methods

protected String getPredefinedGadgetUrl ()

protected boolean isGadgetUrlPredefined ()