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 theOutputFormat
mechanism. Values of this kind are exempt fromOutputFormat
-based automatic escaping.Each implementation of this type has a
OutputFormat
subclass pair, whose singleton instance is returned bygetOutputFormat()
. See more about how markup output values work atOutputFormat
.Note that
TemplateMarkupOutputModel
-s are by design not treated likeTemplateScalarModel
-s, and so the implementations of this interface usually shouldn't implementTemplateScalarModel
. (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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MarkupOutputFormat<MO>
getOutputFormat()
Returns the singletonOutputFormat
object that implements the operations for the "markup output" value.
-
-
-
Method Detail
-
getOutputFormat
MarkupOutputFormat<MO> getOutputFormat()
Returns the singletonOutputFormat
object that implements the operations for the "markup output" value.
-
-