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 Object
implements TemplateMarkupOutputModel<MO>
Common superclass for implementing
TemplateMarkupOutputModel-s that belong to a
CommonMarkupOutputFormat 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
ConstructorsModifierConstructorDescriptionprotectedCommonTemplateMarkupOutputModel(String plainTextContent, String markupContent)A least one of the parameters must be non-null! -
Method Summary
Modifier and TypeMethodDescriptionabstract CommonMarkupOutputFormat<MO>Returns the singletonOutputFormatobject that implements the operations for the "markup output" value.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.
-
Constructor Details
-
CommonTemplateMarkupOutputModel
A least one of the parameters must be non-null!
-
-
Method Details
-
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
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.
-