Class HtmlDocumentDecorator
- java.lang.Object
-
- nz.net.ultraq.thymeleaf.layoutdialect.decorators.xml.XmlDocumentDecorator
-
- nz.net.ultraq.thymeleaf.layoutdialect.decorators.html.HtmlDocumentDecorator
-
- All Implemented Interfaces:
Decorator
public class HtmlDocumentDecorator extends XmlDocumentDecorator
A decorator made to work over an HTML document. Decoration for a document involves 2 sub-decorators: a special one for the<head>
element, and a standard one for the<body>
element.- Author:
- zhanhb, Emanuel Rabina
-
-
Field Summary
-
Fields inherited from class nz.net.ultraq.thymeleaf.layoutdialect.decorators.xml.XmlDocumentDecorator
context
-
-
Constructor Summary
Constructors Constructor Description HtmlDocumentDecorator(ITemplateContext context, SortingStrategy sortingStrategy, boolean autoHeadMerging)
Constructor, apply the given sorting strategy to the decorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IModel
decorate(IModel targetDocumentModel, IModel sourceDocumentModel)
Decorate an entire HTML page.boolean
getAutoHeadMerging()
SortingStrategy
getSortingStrategy()
boolean
isAutoHeadMerging()
-
Methods inherited from class nz.net.ultraq.thymeleaf.layoutdialect.decorators.xml.XmlDocumentDecorator
getContext
-
-
-
-
Constructor Detail
-
HtmlDocumentDecorator
public HtmlDocumentDecorator(ITemplateContext context, SortingStrategy sortingStrategy, boolean autoHeadMerging)
Constructor, apply the given sorting strategy to the decorator.- Parameters:
context
-sortingStrategy
-autoHeadMerging
-
-
-
Method Detail
-
decorate
public IModel decorate(IModel targetDocumentModel, IModel sourceDocumentModel)
Decorate an entire HTML page.- Specified by:
decorate
in interfaceDecorator
- Overrides:
decorate
in classXmlDocumentDecorator
- Parameters:
targetDocumentModel
-sourceDocumentModel
-- Returns:
- Result of the decoration.
-
getSortingStrategy
public final SortingStrategy getSortingStrategy()
-
getAutoHeadMerging
public final boolean getAutoHeadMerging()
-
isAutoHeadMerging
public final boolean isAutoHeadMerging()
-
-