com.atlassian.plugin.web.renderer
Class StaticWebPanelRenderer
java.lang.Object
com.atlassian.plugin.web.renderer.StaticWebPanelRenderer
- All Implemented Interfaces:
- WebPanelRenderer
public class StaticWebPanelRenderer
- extends java.lang.Object
- implements WebPanelRenderer
Static WebPanelRenderer, just returns the supplied text.
|
Method Summary |
java.lang.String |
getResourceType()
|
void |
render(java.lang.String templateName,
Plugin plugin,
java.util.Map<java.lang.String,java.lang.Object> context,
java.io.Writer writer)
Renders the template to the writer. |
java.lang.String |
renderFragment(java.lang.String fragment,
Plugin plugin,
java.util.Map<java.lang.String,java.lang.Object> context)
Renders the fragment using the given context and adding I18nResolver and WebResourceManager. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RENDERER
public static final StaticWebPanelRenderer RENDERER
RESOURCE_TYPE
public static final java.lang.String RESOURCE_TYPE
- See Also:
- Constant Field Values
StaticWebPanelRenderer
public StaticWebPanelRenderer()
getResourceType
public java.lang.String getResourceType()
- Specified by:
getResourceType in interface WebPanelRenderer
- Returns:
- the name of the resource type supported by this renderer.
<resource> elements defined in plugin
descriptors to be rendered by this renderer should specify this String as their type attribute.
render
public void render(java.lang.String templateName,
Plugin plugin,
java.util.Map<java.lang.String,java.lang.Object> context,
java.io.Writer writer)
throws RendererException,
java.io.IOException
- Description copied from interface:
WebPanelRenderer
- Renders the template to the writer.
- Specified by:
render in interface WebPanelRenderer
- Parameters:
templateName - 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 template
- Throws:
RendererException - thrown if there is an internal exception when rendering the template
java.io.IOException - thrown if there is a problem reading the template file or writing to the writer
renderFragment
public java.lang.String renderFragment(java.lang.String fragment,
Plugin plugin,
java.util.Map<java.lang.String,java.lang.Object> context)
throws RendererException
- Description copied from interface:
WebPanelRenderer
- Renders the
fragment using the given context and adding I18nResolver and WebResourceManager.
- Specified by:
renderFragment in interface WebPanelRenderer
- Parameters:
fragment - 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 process
- Returns:
- rendered template
- Throws:
RendererException - thrown if there is an internal exception when rendering the template
Copyright © 2010 Atlassian. All Rights Reserved.