Package freemarker.core
Interface TemplateMarkupOutputModel<MO extends TemplateMarkupOutputModel<MO>>
- Type Parameters:
MO
- Refers to the interface's own type, which is useful in interfaces that extendTemplateMarkupOutputModel
(Java Generics trick).
- All Superinterfaces:
TemplateModel
- All Known Implementing Classes:
CommonTemplateMarkupOutputModel
,TemplateCombinedMarkupOutputModel
,TemplateHTMLOutputModel
,TemplateRTFOutputModel
,TemplateXHTMLOutputModel
,TemplateXMLOutputModel
public interface TemplateMarkupOutputModel<MO extends TemplateMarkupOutputModel<MO>>
extends TemplateModel
"markup output" template language data-type; stores markup (some kind of "rich text" / structured format, as opposed
to plain text) that meant to be printed as template output. This type is related to the
OutputFormat
mechanism. Values of this kind are exempt from OutputFormat
-based automatic escaping.
Each implementation of this type has a corresponding OutputFormat
subclass, whose singleton instance is
returned by getOutputFormat()
. See more about how markup output values work at OutputFormat
.
Note that TemplateMarkupOutputModel
-s are by design not treated like TemplateScalarModel
-s, and so
the implementations of this interface usually shouldn't implement TemplateScalarModel
. (Because, operations
applicable on plain strings, like converting to upper case, substringing, etc., can corrupt markup.) If the template
author wants to pass in the "source" of the markup as string somewhere, he should use ?markup_string
.
- Since:
- 2.3.24
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Method Summary
Modifier and TypeMethodDescriptionReturns the singletonOutputFormat
object that implements the operations for the "markup output" value.
-
Method Details
-
getOutputFormat
MarkupOutputFormat<MO> getOutputFormat()Returns the singletonOutputFormat
object that implements the operations for the "markup output" value.
-