public class GadgetMacro extends com.atlassian.renderer.v2.macro.BaseMacro implements Macro, EditorImagePlaceholder, ResourceAware
Macro.BodyType, Macro.OutputType
Modifier and Type | Field and Description |
---|---|
static String |
AUTHOR_PARAMETER |
static String |
BORDER_PARAMETER |
static String |
DEFAULT_WIDTH |
static String |
PREFERENCES_PARAMETER |
static String |
URL_PARAMETER |
static String |
WIDTH_PARAMETER |
Constructor and Description |
---|
GadgetMacro(com.atlassian.gadgets.view.GadgetViewFactory gadgetViewFactory,
com.atlassian.webresource.api.assembler.PageBuilderService pageBuilderService,
GadgetWhiteListManager whiteListManager,
com.atlassian.sal.api.message.I18nResolver resolver,
RequestContextBuilder requestContextBuilder,
GadgetCounter gadgetCounter,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
String |
execute(Map<String,String> params,
String body,
ConversionContext conversionContext) |
String |
execute(Map paramsRaw,
String body,
com.atlassian.renderer.RenderContext renderContext) |
com.atlassian.renderer.v2.RenderMode |
getBodyRenderMode() |
Macro.BodyType |
getBodyType()
XHTML Gadget Code
|
ImagePlaceholder |
getImagePlaceholder(Map<String,String> parameters,
ConversionContext context)
Returns an
ImagePlaceholder instance to be displayed in the editor. |
Macro.OutputType |
getOutputType() |
protected String |
getPredefinedGadgetUrl() |
String |
getResourcePath() |
boolean |
hasBody()
Wiki Markup Gadget Code
|
protected boolean |
isGadgetUrlPredefined() |
void |
setResourcePath(String resourcePath) |
public static final String DEFAULT_WIDTH
public static final String URL_PARAMETER
public static final String WIDTH_PARAMETER
public static final String BORDER_PARAMETER
public static final String AUTHOR_PARAMETER
public static final String PREFERENCES_PARAMETER
public GadgetMacro(com.atlassian.gadgets.view.GadgetViewFactory gadgetViewFactory, com.atlassian.webresource.api.assembler.PageBuilderService pageBuilderService, GadgetWhiteListManager whiteListManager, com.atlassian.sal.api.message.I18nResolver resolver, RequestContextBuilder requestContextBuilder, GadgetCounter gadgetCounter, com.atlassian.event.api.EventPublisher eventPublisher)
public Macro.BodyType getBodyType()
public Macro.OutputType getOutputType()
public String execute(Map<String,String> params, String body, ConversionContext conversionContext) throws MacroExecutionException
MacroExecutionException
public boolean hasBody()
hasBody
in interface com.atlassian.renderer.v2.macro.Macro
public com.atlassian.renderer.v2.RenderMode getBodyRenderMode()
getBodyRenderMode
in interface com.atlassian.renderer.v2.macro.Macro
public String execute(Map paramsRaw, String body, com.atlassian.renderer.RenderContext renderContext) throws com.atlassian.renderer.v2.macro.MacroException
execute
in interface com.atlassian.renderer.v2.macro.Macro
com.atlassian.renderer.v2.macro.MacroException
protected boolean isGadgetUrlPredefined()
protected String getPredefinedGadgetUrl()
public ImagePlaceholder getImagePlaceholder(Map<String,String> parameters, ConversionContext context)
EditorImagePlaceholder
ImagePlaceholder
instance to be displayed in the editor.
Return null if the default placeholder should be used.getImagePlaceholder
in interface EditorImagePlaceholder
parameters
- the parameters for the macro, with the default parameter being represent by the key "0".context
- the ConversionContext for this usage.public String getResourcePath()
getResourcePath
in interface ResourceAware
public void setResourcePath(String resourcePath)
setResourcePath
in interface ResourceAware
Copyright © 2003–2015 Atlassian. All rights reserved.