Output - type.public class FreeMarkerTemplateRenderer<Output> extends Object implements TemplateRenderer<Output>
TemplateRenderer implementation to render a FreeMarker template, and deserialize to skill response output.| Modifier and Type | Class and Description |
|---|---|
static class |
FreeMarkerTemplateRenderer.Builder
Static builder class to construct an instance of
FreeMarkerTemplateRenderer. |
| Modifier and Type | Field and Description |
|---|---|
protected freemarker.template.Configuration |
configuration
Freemarker configuration.
|
protected JsonUnmarshaller<Output> |
unmarshaller
Unmarshaller used to convert byte-stream back to their original data or object.
|
| Modifier | Constructor and Description |
|---|---|
protected |
FreeMarkerTemplateRenderer(freemarker.template.Configuration configuration,
JsonUnmarshaller<Output> unmarshaller)
Construct an instance of FreeMarkerTemplateRenderer.
|
| Modifier and Type | Method and Description |
|---|---|
static FreeMarkerTemplateRenderer.Builder |
builder()
Static method to construct an instance of Builder.
|
Output |
render(TemplateContentData templateContentData,
Map<String,Object> dataMap)
Render
TemplateContentData by processing data and deserialize to skill response output. |
protected final freemarker.template.Configuration configuration
protected final JsonUnmarshaller<Output> unmarshaller
protected FreeMarkerTemplateRenderer(freemarker.template.Configuration configuration,
JsonUnmarshaller<Output> unmarshaller)
configuration - freemarker configuration.unmarshaller - unmarshaller.public static FreeMarkerTemplateRenderer.Builder builder()
FreeMarkerTemplateRenderer.Builder.public Output render(TemplateContentData templateContentData, Map<String,Object> dataMap) throws TemplateRendererException
TemplateContentData by processing data and deserialize to skill response output.render in interface TemplateRenderer<Output>templateContentData - TemplateContentData that contains template contentdataMap - map that contains injecting dataTemplateRendererException - if fail to render template or deserialize to skill response output.Copyright © 2023. All rights reserved.