public abstract class

AbstractHtmlGeneratingMacro

extends BaseMacro
java.lang.Object
   ↳ org.radeox.macro.BaseMacro
     ↳ com.atlassian.renderer.macro.BaseMacro
       ↳ com.atlassian.confluence.renderer.radeox.macros.AbstractHtmlGeneratingMacro
Known Direct Subclasses

Class Overview

To be used by macros which generate large amounts of HTML which they don't want any further processing done on.

Summary

Fields
public static final Category log
[Expand]
Inherited Fields
From class org.radeox.macro.BaseMacro
Public Constructors
AbstractHtmlGeneratingMacro()
Public Methods
final void execute(Writer writer, MacroParameter macroParameter)
Subclasses should not override this execute method, but should instead override getHtml()
Protected Methods
String buildBaseUrl(HttpServletRequest request, List ignoredKeys)
create baseurl so that the urls that appear in the template/view for a macro are not dependent on certain actions this will allow the macro to be used in more than one place
String errorContent(String message)
abstract String getHtml(MacroParameter macroParameter)
PageContext getPageContext(MacroParameter macroParameter)
User getRemoteUser()
boolean hasLoneParameter(MacroParameter macroParameter, String loneParameter)
Lone parameters are not assigned a value.
String parseParameterForKey(MacroParameter parameter, String key)
This method is a helper wrapper to macroParameter.getParameter(key); if a null is returned it will try with key + " " then " " + key, etc..
[Expand]
Inherited Methods
From class com.atlassian.renderer.macro.BaseMacro
From class org.radeox.macro.BaseMacro
From class java.lang.Object
From interface java.lang.Comparable
From interface org.radeox.macro.Macro

Fields

public static final Category log

Public Constructors

public AbstractHtmlGeneratingMacro ()

Public Methods

public final void execute (Writer writer, MacroParameter macroParameter)

Subclasses should not override this execute method, but should instead override getHtml()

Protected Methods

protected String buildBaseUrl (HttpServletRequest request, List ignoredKeys)

create baseurl so that the urls that appear in the template/view for a macro are not dependent on certain actions this will allow the macro to be used in more than one place

Parameters
ignoredKeys - parameter keys that should not be reappended back onto the url

protected String errorContent (String message)

protected abstract String getHtml (MacroParameter macroParameter)

protected PageContext getPageContext (MacroParameter macroParameter)

Returns
  • returns the current page context, if the WikiRendererContextKeys class can identify it

protected User getRemoteUser ()

protected boolean hasLoneParameter (MacroParameter macroParameter, String loneParameter)

Lone parameters are not assigned a value. For example: {mymacro:hello|world} This is useful because having hello=true is redundant in some cases and too wordy.

protected String parseParameterForKey (MacroParameter parameter, String key)

This method is a helper wrapper to macroParameter.getParameter(key); if a null is returned it will try with key + " " then " " + key, etc..

Often a parameter is not found simply because the user has surrounded it with whitespace.
Parameters
parameter - The MacroParameter to search through for the key
key - the key
Returns
  • String holding the result of