public class StaticWebPanelRenderer extends Object implements WebPanelRenderer
WebPanelRenderer, just returns the supplied text.| Modifier and Type | Field and Description |
|---|---|
static StaticWebPanelRenderer |
RENDERER |
static String |
RESOURCE_TYPE |
| Constructor and Description |
|---|
StaticWebPanelRenderer() |
| Modifier and Type | Method and Description |
|---|---|
String |
getResourceType() |
void |
render(String templateName,
com.atlassian.plugin.Plugin plugin,
Map<String,Object> context,
Writer writer)
Renders the template to the writer.
|
String |
renderFragment(String fragment,
com.atlassian.plugin.Plugin plugin,
Map<String,Object> context)
Renders the
fragment using the given context and adding I18nResolver and WebResourceManager. |
void |
renderFragment(Writer writer,
String fragment,
com.atlassian.plugin.Plugin plugin,
Map<String,Object> context)
Renders the
fragment using the given context and adding I18nResolver and WebResourceManager, writing the output to the provided writer. |
public static final StaticWebPanelRenderer RENDERER
public static final String RESOURCE_TYPE
public String getResourceType()
getResourceType in interface WebPanelRenderer<resource> elements defined in plugin
descriptors to be rendered by this renderer should specify this String as their type attribute.public void render(String templateName, com.atlassian.plugin.Plugin plugin, Map<String,Object> context, Writer writer) throws RendererException, IOException
WebPanelRendererrender in interface WebPanelRenderertemplateName - file name of the template to renderplugin - the context plugin. Used, for example, to resolve templates and other resources from the classpath
via Plugin.getClassLoader()context - Map of objects to make available in the template rendering processwriter - where to write the rendered templateRendererException - thrown if there is an internal exception when rendering the templateIOException - thrown if there is a problem reading the template file or writing to the writerpublic String renderFragment(String fragment, com.atlassian.plugin.Plugin plugin, Map<String,Object> context) throws RendererException
WebPanelRendererfragment using the given context and adding I18nResolver and WebResourceManager.renderFragment in interface WebPanelRendererfragment - template fragment to renderplugin - the context plugin. Used, for example, to resolve templates and other resources from the classpath
via Plugin.getClassLoader()context - Map of objects to make available in the template rendering processRendererException - thrown if there is an internal exception when rendering the templatepublic void renderFragment(Writer writer, String fragment, com.atlassian.plugin.Plugin plugin, Map<String,Object> context) throws RendererException, IOException
WebPanelRendererfragment using the given context and adding I18nResolver and WebResourceManager, writing the output to the provided writer.renderFragment in interface WebPanelRendererwriter - the writer to append the output tofragment - template fragment to renderplugin - the context plugin. Used, for example, to resolve templates and other resources from the classpath
via Plugin.getClassLoader()context - Map of objects to make available in the template rendering processRendererException - thrown if there is an internal exception when rendering the templateIOException - if there is some problem writing to the supplied writerCopyright © 2018 Atlassian. All rights reserved.