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, TemplateXHTMLOutputModel, 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

Constructors
`protected` `CommonTemplateMarkupOutputModel(String plainTextContent, String markupContent)` A least one of the parameters must be non-`null`!

### Method Summary

All Methods Instance Methods Abstract Methods
`abstract CommonMarkupOutputFormat<MO>` `getOutputFormat()` Returns the singleton `OutputFormat` object that implements the operations for the "markup output" value.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CommonTemplateMarkupOutputModel

    protected CommonTemplateMarkupOutputModel(String plainTextContent,
                                              String markupContent)

A least one of the parameters must be non-`null`!

### Method Detail

#### getOutputFormat

    public abstract CommonMarkupOutputFormat<MO> getOutputFormat()

Description copied from interface: `TemplateMarkupOutputModel`
Returns the singleton `OutputFormat` object that implements the operations for the "markup output" value.

Specified by:
  `getOutputFormat` in interface `TemplateMarkupOutputModel<MO extends CommonTemplateMarkupOutputModel<MO>>`