|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WebPanelRenderer
This interface allows the plugin system to be extended by adding new renderers for new markup formats. Currently the atlassian-template-renderer project provides a velocity implementation.
com.atlassian.plugin.web.descriptors.WebPanelRendererModuleDescriptor#getModule()}| Method Summary | |
|---|---|
String |
getResourceType()
|
void |
render(String templateName,
Plugin plugin,
Map<String,Object> context,
Writer writer)
Renders the template to the writer. |
String |
renderFragment(String fragment,
Plugin plugin,
Map<String,Object> context)
Deprecated. since 2.11. Use renderFragment(java.io.Writer, String, com.atlassian.plugin.Plugin, java.util.Map)
instead. Method no longer used inside the atlassian-plugins-webfragment module. |
void |
renderFragment(Writer writer,
String fragment,
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. |
| Method Detail |
|---|
String getResourceType()
<resource> elements defined in plugin
descriptors to be rendered by this renderer should specify this String as their type attribute.
void render(String templateName,
Plugin plugin,
Map<String,Object> context,
Writer writer)
throws RendererException,
IOException
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
RendererException - thrown if there is an internal exception when rendering the template
IOException - thrown if there is a problem reading the template file or writing to the writer
String renderFragment(String fragment,
Plugin plugin,
Map<String,Object> context)
throws RendererException
renderFragment(java.io.Writer, String, com.atlassian.plugin.Plugin, java.util.Map)
instead. Method no longer used inside the atlassian-plugins-webfragment module.
fragment using the given context and adding I18nResolver and WebResourceManager.
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
RendererException - thrown if there is an internal exception when rendering the template
void renderFragment(Writer writer,
String fragment,
Plugin plugin,
Map<String,Object> context)
throws RendererException,
IOException
fragment using the given context and adding I18nResolver and WebResourceManager, writing the output to the provided writer.
writer - 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 process
RendererException - thrown if there is an internal exception when rendering the template
IOException - if there is some problem writing to the supplied writer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||