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 aCommonMarkupOutputFormatsubclass 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 protectedCommonTemplateMarkupOutputModel(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 singletonOutputFormatobject that implements the operations for the "markup output" value.java.lang.StringtoString()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:TemplateMarkupOutputModelReturns the singletonOutputFormatobject that implements the operations for the "markup output" value.- Specified by:
getOutputFormatin 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:
toStringin classjava.lang.Object- Since:
- 2.3.29
-
-