Class ConfluenceSoyTemplateRenderer
java.lang.Object
com.atlassian.confluence.plugins.soy.ConfluenceSoyTemplateRenderer
- All Implemented Interfaces:
TemplateRenderer
Confluence's agnostic shim for the Soy Template Renderer
-
Constructor Summary
ConstructorsConstructorDescriptionConfluenceSoyTemplateRenderer
(com.atlassian.soy.renderer.SoyTemplateRenderer delegate) -
Method Summary
Modifier and TypeMethodDescriptionRender a plugin-provided template as a Streamable.render
(String templateProviderPluginKey, String templateName, Map<String, Object> data, Map<String, Object> injectedData) Render a plugin-provided template as a Streamable.void
renderTo
(Appendable appendable, String templateProviderPluginKey, String templateName, Map<String, Object> data) Render a plugin-provided template to a Writer.void
renderTo
(Appendable appendable, String templateProviderPluginKey, String templateName, Map<String, Object> data, Map<String, Object> injectedData) Render a plugin-provided template to a Writer.
-
Constructor Details
-
ConfluenceSoyTemplateRenderer
public ConfluenceSoyTemplateRenderer(com.atlassian.soy.renderer.SoyTemplateRenderer delegate)
-
-
Method Details
-
renderTo
public void renderTo(Appendable appendable, String templateProviderPluginKey, String templateName, Map<String, Object> data) throws TemplateRenderingExceptionDescription copied from interface:TemplateRenderer
Render a plugin-provided template to a Writer. The format of the data object to be passed in to the template is entirely dependent on the template implementation- Specified by:
renderTo
in interfaceTemplateRenderer
- Parameters:
appendable
- the buffer to write the template output intotemplateProviderPluginKey
- the plugin that provides the template as a resourcetemplateName
- the name of the plugin resource that contains the templatedata
- the data to pass into the template- Throws:
TemplateRenderingException
- if something goes wrong during the rendering
-
render
public Streamable render(String templateProviderPluginKey, String templateName, Map<String, Object> data) throws TemplateRenderingExceptionDescription copied from interface:TemplateRenderer
Render a plugin-provided template as a Streamable. The format of the data object to be passed in to the template is entirely dependent on the template implementation- Specified by:
render
in interfaceTemplateRenderer
- Parameters:
templateProviderPluginKey
- the plugin that provides the template as a resourcetemplateName
- the name of the plugin resource that contains the templatedata
- the data to pass into the template- Returns:
- The Streamable rendered result
- Throws:
TemplateRenderingException
- if something goes wrong during the rendering
-
renderTo
public void renderTo(Appendable appendable, String templateProviderPluginKey, String templateName, Map<String, Object> data, Map<String, throws TemplateRenderingExceptionObject> injectedData) Description copied from interface:TemplateRenderer
Render a plugin-provided template to a Writer. The format of the data object to be passed in to the template is entirely dependent on the template implementation- Specified by:
renderTo
in interfaceTemplateRenderer
- Parameters:
appendable
- the buffer to write the template output intotemplateProviderPluginKey
- the plugin that provides the template as a resourcetemplateName
- the name of the plugin resource that contains the templatedata
- the data to pass into the templateinjectedData
- injected data to pass into the template- Throws:
TemplateRenderingException
- if something goes wrong during the rendering
-
render
public Streamable render(String templateProviderPluginKey, String templateName, Map<String, Object> data, Map<String, throws TemplateRenderingExceptionObject> injectedData) Description copied from interface:TemplateRenderer
Render a plugin-provided template as a Streamable. The format of the data object to be passed in to the template is entirely dependent on the template implementation- Specified by:
render
in interfaceTemplateRenderer
- Parameters:
templateProviderPluginKey
- the plugin that provides the template as a resourcetemplateName
- the name of the plugin resource that contains the templatedata
- the data to pass into the templateinjectedData
- injected data to pass into the template- Throws:
TemplateRenderingException
- if something goes wrong during the rendering
-