Package org.apache.juneau.commons.template
A TemplateResolver wraps a VarResolver
with a locked-down configuration: no system vars, a default-deny function allowlist, and a render scope supplied per
render as a map. Templates use the SVL grammar:
Destinations provides encoder and renderer presets (HTML, Markdown, plain
text, JSON string, URL component), and TemplateResolver.check(String, org.apache.juneau.commons.template.TemplateCatalog)
validates a template against the names an application offers before it is stored.
Encoding rule:
Escaping is applied to resolved values only, never to template text. The value encoder runs on the output of each
top-level StructureRenderer encodes every item and cell itself and emits its own
markup. Put markup outside
Values are never re-parsed: a scope value that contains
-
ClassDescriptionPairs a value encoder with a
StructureRendererfor one output format.Destination presets forTemplateResolver.Builder.destination(Destination).The fields of one list's rows.A field a template may read, either at the top level or as a column of a list row.A template parsed byTemplateResolver.parse(String).The default function allowlist of aTemplateResolver.Renders aStructure(a list, block or table produced byul ,ol ,block ortable ) for one destination.Describes the names a template may read, forTemplateResolver.check(String, TemplateCatalog).Builder forTemplateCatalog.One problem found byTemplateResolver.check(String, TemplateCatalog).Renders SVL templates written by authors who are less trusted than the application.Builder forTemplateResolver.Thrown byTemplateResolver.validate(String, TemplateCatalog)when a template has problems.