Class 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
    • 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 interface Decorator
        Overrides:
        decorate in class XmlDocumentDecorator
        Parameters:
        targetDocumentModel -
        sourceDocumentModel -
        Returns:
        Result of the decoration.
      • getAutoHeadMerging

        public final boolean getAutoHeadMerging()
      • isAutoHeadMerging

        public final boolean isAutoHeadMerging()