com.atlassian.confluence.renderer.v2.macros
Class RadeoxCompatibilityMacro
java.lang.Object
com.atlassian.renderer.v2.macro.BaseMacro
com.atlassian.renderer.macro.RadeoxCompatibilityMacro
com.atlassian.confluence.renderer.v2.macros.RadeoxCompatibilityMacro
- All Implemented Interfaces:
- com.atlassian.renderer.v2.macro.Macro
public class RadeoxCompatibilityMacro
- extends com.atlassian.renderer.macro.RadeoxCompatibilityMacro
A wrapper macro that retains compatibility with our old Radeox-style macros
Fields inherited from class com.atlassian.renderer.macro.RadeoxCompatibilityMacro |
ATTACHMENTS_PATH, EXTRACTED_EXTERNAL_REFERENCES, log, RENDER_CONTEXT |
Fields inherited from interface com.atlassian.renderer.v2.macro.Macro |
RAW_PARAMS_KEY |
Method Summary |
static java.lang.String |
constructRadeoxRawParams(java.util.Map parameters)
Constructs a 'raw' parameter' string from the supplied confluence parameters for use by old style Radeox macros. |
java.lang.String |
execute(java.util.Map parameters,
java.lang.String content,
com.atlassian.renderer.RenderContext context)
Overrides super method to:
Set the attachmentsPath if null in the context to the remote path before calling
the super method. |
Methods inherited from class com.atlassian.renderer.macro.RadeoxCompatibilityMacro |
getBodyRenderMode, getRadeoxMacro, hasBody, isInline |
Methods inherited from class com.atlassian.renderer.v2.macro.BaseMacro |
getTokenType, getWysiwygBodyType, suppressMacroRenderingDuringWysiwyg, suppressSurroundingTagDuringWysiwygRendering |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RadeoxCompatibilityMacro
public RadeoxCompatibilityMacro(com.atlassian.renderer.macro.Macro macro)
execute
public java.lang.String execute(java.util.Map parameters,
java.lang.String content,
com.atlassian.renderer.RenderContext context)
throws com.atlassian.renderer.v2.macro.MacroException
- Overrides super method to:
- Set the
attachmentsPath
if null
in the context
to the remote path before calling
the super method. On return it resets the attachment path in the context.
- Adds a
Macro.RAW_PARAMS_KEY
entry (if it does not exist) to the supplied
parameters
so the parameters can be accessed by the old Radeox style macros. This is removed after the call.
- Specified by:
execute
in interface com.atlassian.renderer.v2.macro.Macro
- Overrides:
execute
in class com.atlassian.renderer.macro.RadeoxCompatibilityMacro
- Parameters:
parameters
- @inheritcontent
- @inheritcontext
- @inherit
- Returns:
- @inherit
- Throws:
com.atlassian.renderer.v2.macro.MacroException
- @inherit
constructRadeoxRawParams
public static java.lang.String constructRadeoxRawParams(java.util.Map parameters)
- Constructs a 'raw' parameter' string from the supplied confluence
parameters
for use by old style Radeox macros.
The result is a string where name value pairs are of the form <name>=<value>
separated by |
. The default
parameter value (the one with the name ""
- its an index) does not have a name and is always at the start. As mad as it sounds
there was no escaping of |
in values!
- Parameters:
parameters
- a Map of parameters. The default parameter has the name ""
.
- Returns:
- the raw parameter string or
null
if there are no parameters.
Copyright © 2003-2013 Atlassian. All Rights Reserved.