|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.renderer.v2.macro.BaseMacro
com.atlassian.renderer.macro.RadeoxCompatibilityMacro
public class RadeoxCompatibilityMacro
A wrapper macro that retains compatibility with our old Radeox-style macros
Field Summary | |
---|---|
static String |
ATTACHMENTS_PATH
|
static String |
EXTRACTED_EXTERNAL_REFERENCES
|
static org.apache.log4j.Category |
log
|
static String |
RENDER_CONTEXT
|
Fields inherited from interface com.atlassian.renderer.v2.macro.Macro |
---|
RAW_PARAMS_KEY |
Constructor Summary | |
---|---|
RadeoxCompatibilityMacro(Macro radeoxMacro)
|
Method Summary | |
---|---|
String |
execute(Map parameters,
String content,
RenderContext context)
Execute the macro. |
RenderMode |
getBodyRenderMode()
If the macro has a body, return the mode in which the body of the macro should be rendered. |
Macro |
getRadeoxMacro()
|
boolean |
hasBody()
Determine if the macro is a one-shot macro, or one that takes a body. |
boolean |
isInline()
Determine if the macro is an "inline" element in the resulting HTML. |
Methods inherited from class com.atlassian.renderer.v2.macro.BaseMacro |
---|
suppressMacroRenderingDuringWysiwyg, suppressSurroundingTagDuringWysiwygRendering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RENDER_CONTEXT
public static final String ATTACHMENTS_PATH
public static final String EXTRACTED_EXTERNAL_REFERENCES
public static final org.apache.log4j.Category log
Constructor Detail |
---|
public RadeoxCompatibilityMacro(Macro radeoxMacro)
Method Detail |
---|
public RenderMode getBodyRenderMode()
Macro
If this method returns null, it causes the macro processor to treat the macro as one that returns wiki-text rather than HTML. The body of the macro will be passed in un-rendered, and the macro's output will be inserted back into the page for further normal processing by the wiki-engine.
public Macro getRadeoxMacro()
public boolean hasBody()
Macro
public boolean isInline()
Macro
Most macros will want to return false here.
public String execute(Map parameters, String content, RenderContext context) throws MacroException
Macro
Macro.getBodyRenderMode()
).
Macros are expected to output HTML. The output of macros will not be subjected to any
further processing by the wiki-engine. If your macro produces wiki-text, you are responsible
for rendering that text to HTML yourself using a SubRenderer
or WikiStyleRenderer
. If your macro returns pure wiki-text, you
can force further processing in the normal chain by returning null from Macro.getBodyRenderMode()
parameters
- the parameters included in the macrocontent
- the content of the body of the macrocontext
- the rendering context in which the macro was executed
MacroException
- if the macro fails in some unremarkable way. If the
macro fails in a way that is important to the server maintainer
(i.e. something is badly wrong), throw a RuntimeException instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |