public class AreaDirective extends AbstractDirective<AreaElement>
CONTENT_ATTRIBUTE, PATH_ATTRIBUTE, UUID_ATTRIBUTE, WORKSPACE_ATTRIBUTE
Constructor and Description |
---|
AreaDirective() |
Modifier and Type | Method and Description |
---|---|
protected void |
prepareTemplatingElement(AreaElement templatingElement,
freemarker.core.Environment env,
Map<String,freemarker.template.TemplateModel> params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
Implementations of this method should prepare the TemplatingElement with the known parameters.
|
_param, bool, checkBody, createTemplatingElement, doBody, execute, getTemplatingElementClass, initContentElement, integer, mandatoryBool, mandatoryObject, mandatoryString, mandatoryStringList, node, object, string
protected void prepareTemplatingElement(AreaElement templatingElement, freemarker.core.Environment env, Map<String,freemarker.template.TemplateModel> params, freemarker.template.TemplateModel[] loopVars, freemarker.template.TemplateDirectiveBody body) throws freemarker.template.TemplateModelException, IOException
AbstractDirective
AbstractDirective.execute(freemarker.core.Environment, java.util.Map, freemarker.template.TemplateModel[], freemarker.template.TemplateDirectiveBody)
will throw a TemplateModelException if there are leftover parameters.
note: The current FreeMarker implementation passes a "new" Map which we can safely manipulate.
is thrown away after the execution of the directive. When no parameters are passed, the Map is readonly, but it
is otherwise a regular HashMap which has been instantiated shortly before the execution of the directive. However, since
this behavior is not mandated by their API, nor documented (at the time of writing, with FreeMarker 2.3.16), we
should exert caution. Unit tests hopefully cover this, so we'll be safe when updating to newer FreeMarker versions.prepareTemplatingElement
in class AbstractDirective<AreaElement>
freemarker.template.TemplateModelException
IOException
Copyright © 2003–2020 Magnolia International Ltd.. All rights reserved.