Class 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
    • Field Summary

      • Fields inherited from class com.atlassian.renderer.macro.RadeoxCompatibilityMacro

        ATTACHMENTS_PATH, EXTRACTED_EXTERNAL_REFERENCES, RENDER_CONTEXT
      • Fields inherited from interface com.atlassian.renderer.v2.macro.Macro

        RAW_PARAMS_KEY
    • Constructor Summary

      Constructors 
      Constructor Description
      RadeoxCompatibilityMacro​(com.atlassian.renderer.macro.Macro macro)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static String constructRadeoxRawParams​(Map parameters)
      Constructs a 'raw' parameter' string from the supplied confluence parameters for use by old style Radeox macros.
      String execute​(Map parameters, 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
    • Constructor Detail

      • RadeoxCompatibilityMacro

        public RadeoxCompatibilityMacro​(com.atlassian.renderer.macro.Macro macro)
    • Method Detail

      • execute

        public String execute​(Map parameters,
                              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 -
content -
context -
Returns:
Throws:
com.atlassian.renderer.v2.macro.MacroException - @inherit