public abstract class AbstractHtmlGeneratingMacro
extends com.atlassian.renderer.macro.BaseMacro
Constructor and Description |
---|
AbstractHtmlGeneratingMacro() |
Modifier and Type | Method and Description |
---|---|
protected String |
buildBaseUrl(javax.servlet.http.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
|
protected String |
errorContent(String message) |
void |
execute(Writer writer,
org.radeox.macro.parameter.MacroParameter macroParameter)
Subclasses should not override this execute method, but should instead override getHtml()
|
protected abstract String |
getHtml(org.radeox.macro.parameter.MacroParameter macroParameter) |
protected PageContext |
getPageContext(org.radeox.macro.parameter.MacroParameter macroParameter) |
protected com.atlassian.user.User |
getRemoteUser() |
protected boolean |
hasLoneParameter(org.radeox.macro.parameter.MacroParameter macroParameter,
String loneParameter)
Lone parameters are not assigned a value.
|
protected String |
parseParameterForKey(org.radeox.macro.parameter.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..
|
getDescription, getResourcePath, setDescription, setResourcePath
compareTo, getName, getParamDescription, setInitialContext, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getParamDescription, setInitialContext
compareTo
public final void execute(Writer writer, org.radeox.macro.parameter.MacroParameter macroParameter) throws IllegalArgumentException, IOException
execute
in interface org.radeox.macro.Macro
execute
in class org.radeox.macro.BaseMacro
IllegalArgumentException
IOException
protected abstract String getHtml(org.radeox.macro.parameter.MacroParameter macroParameter) throws IllegalArgumentException, IOException
IllegalArgumentException
IOException
protected String parseParameterForKey(org.radeox.macro.parameter.MacroParameter parameter, String key)
Often a parameter is not found simply because the user has surrounded it with whitespace.
parameter
- - The MacroParameter to search through for the keykey
- - the keyprotected PageContext getPageContext(org.radeox.macro.parameter.MacroParameter macroParameter)
macroParameter
- protected com.atlassian.user.User getRemoteUser()
protected String buildBaseUrl(javax.servlet.http.HttpServletRequest request, List ignoredKeys)
ignoredKeys
- - parameter keys that should not be reappended back onto the urlprotected boolean hasLoneParameter(org.radeox.macro.parameter.MacroParameter macroParameter, String loneParameter)
Copyright © 2003–2020 Atlassian. All rights reserved.