|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.renderer.wysiwyg.WysiwygMacroHelper
public class WysiwygMacroHelper
Class responsible for the Rendering and Conversion of Macros, between wiki markup and wysiwyg xhtml.
Field Summary | |
---|---|
static String |
MACRO_CLASS
|
static String |
MACRO_HAS_BODY_ATTRIBUTE
|
static String |
MACRO_HAS_NEWLINE_AFTER_BODY_ATTRIBUTE
|
static String |
MACRO_HAS_NEWLINE_BEFORE_BODY_ATTRIBUTE
|
static String |
MACRO_HAS_PRECEDING_NEWLINE_ATTRIBUTE
|
static String |
MACRO_HAS_TRAILING_NEWLINE_ATTRIBUTE
|
static String |
MACRO_NAME_ATTRIBUTE
|
static String |
MACRO_PADDING_CLASS
Class given to paragraphs whose purpose is to allow somewhere for the cursor to go after a macro. |
static String |
MACRO_START_TAG_ATTRIBUTE
|
static String |
MACRO_TAG_PARAM
|
Constructor Summary | |
---|---|
WysiwygMacroHelper(MacroRendererComponent macroRendererComponent)
|
Method Summary | |
---|---|
static String |
convertMacroFromNode(NodeContext nodeContext,
DefaultWysiwygConverter defaultWysiwygConverter,
Macro macro)
Converts a macro node back to wiki markup. |
static String |
getMacroName(Node node)
Retrieves the macro name from the given node. |
static boolean |
isMacroBody(Node node)
Returns true if the node is a macro body node. |
static boolean |
isMacroTag(Node node)
Returns true if the node is a macro body node. |
void |
renderMacro(MacroTag startTag,
Macro macro,
String body,
Map params,
RenderContext context,
StringBuffer buffer)
Renders a macro with the given information and outputs the XHTML into the given buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MACRO_TAG_PARAM
public static final String MACRO_CLASS
public static final String MACRO_NAME_ATTRIBUTE
public static final String MACRO_START_TAG_ATTRIBUTE
public static final String MACRO_HAS_BODY_ATTRIBUTE
public static final String MACRO_HAS_NEWLINE_BEFORE_BODY_ATTRIBUTE
public static final String MACRO_HAS_NEWLINE_AFTER_BODY_ATTRIBUTE
public static final String MACRO_HAS_PRECEDING_NEWLINE_ATTRIBUTE
public static final String MACRO_HAS_TRAILING_NEWLINE_ATTRIBUTE
public static final String MACRO_PADDING_CLASS
Constructor Detail |
---|
public WysiwygMacroHelper(MacroRendererComponent macroRendererComponent)
Method Detail |
---|
public void renderMacro(MacroTag startTag, Macro macro, String body, Map params, RenderContext context, StringBuffer buffer)
startTag
- the start tag of the macromacro
- the macro to render. Note that this could be null.body
- the wiki markup body of the macro. This can also be null.params
- a map of macro parameterscontext
- the render context in which the macro is renderedbuffer
- the buffer to which the rendered output is appendedpublic static String getMacroName(Node node)
public static boolean isMacroBody(Node node)
public static boolean isMacroTag(Node node)
public static String convertMacroFromNode(NodeContext nodeContext, DefaultWysiwygConverter defaultWysiwygConverter, Macro macro)
nodeContext
- the context the node is currently indefaultWysiwygConverter
- the converter that is calling this methodmacro
- the macro that is being converted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |