Package freemarker.core
Class CommonTemplateMarkupOutputModel<MO extends CommonTemplateMarkupOutputModel<MO>>
- java.lang.Object
-
- freemarker.core.CommonTemplateMarkupOutputModel<MO>
-
- All Implemented Interfaces:
TemplateMarkupOutputModel<MO>
,TemplateModel
- Direct Known Subclasses:
TemplateCombinedMarkupOutputModel
,TemplateHTMLOutputModel
,TemplateRTFOutputModel
,TemplateXMLOutputModel
public abstract class CommonTemplateMarkupOutputModel<MO extends CommonTemplateMarkupOutputModel<MO>> extends java.lang.Object implements TemplateMarkupOutputModel<MO>
Common superclass for implementingTemplateMarkupOutputModel
-s that belong to aCommonMarkupOutputFormat
subclass format.Thread-safe after proper publishing. Calculated fields (typically, the markup calculated from plain text) might will be re-calculated for multiple times if accessed from multiple threads (this only affects performance, not functionality).
- Since:
- 2.3.24
-
-
Field Summary
-
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CommonTemplateMarkupOutputModel(java.lang.String plainTextContent, java.lang.String markupContent)
A least one of the parameters must be non-null
!
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CommonMarkupOutputFormat<MO>
getOutputFormat()
Returns the singletonOutputFormat
object that implements the operations for the "markup output" value.java.lang.String
toString()
Returns something like"markup(format=HTML, markup=<p>foo</p>)"
; where the first parameter isOutputFormat.getName()
, and the second is the content, that's prefixed withmarkup=
orplainText=
, depending on the way the content is internally stored.
-
-
-
Method Detail
-
getOutputFormat
public abstract CommonMarkupOutputFormat<MO> getOutputFormat()
Description copied from interface:TemplateMarkupOutputModel
Returns the singletonOutputFormat
object that implements the operations for the "markup output" value.- Specified by:
getOutputFormat
in interfaceTemplateMarkupOutputModel<MO extends CommonTemplateMarkupOutputModel<MO>>
-
toString
public java.lang.String toString()
Returns something like"markup(format=HTML, markup=<p>foo</p>)"
; where the first parameter isOutputFormat.getName()
, and the second is the content, that's prefixed withmarkup=
orplainText=
, depending on the way the content is internally stored.- Overrides:
toString
in classjava.lang.Object
- Since:
- 2.3.29
-
-