Class PageTemplate

  • All Implemented Interfaces:
    com.yahoo.component.Component, com.yahoo.component.Deconstructable, com.yahoo.component.provider.Freezable, PageElement, Comparable<com.yahoo.component.Component>

    public final class PageTemplate
    extends com.yahoo.component.provider.FreezableComponent
    implements PageElement
    A page template represents a particular way to organize a result page. It is a recursive structure of page template elements.
    Author:
    bratseth
    • Field Summary

      • Fields inherited from class com.yahoo.component.AbstractComponent

        isDeconstructable
    • Constructor Summary

      Constructors 
      Constructor Description
      PageTemplate​(com.yahoo.component.ComponentId id)  
    • Constructor Detail

      • PageTemplate

        public PageTemplate​(com.yahoo.component.ComponentId id)
    • Method Detail

      • setSection

        public void setSection​(Section section)
      • getSection

        public Section getSection()
        Returns the root section of this. This is never null.
      • getSources

        public Set<Source> getSources()
        Returns an unmodifiable set of all the sources this template may include (depending on choice resolution). If the template allows (somewhere) the "any" source (*), Source.any will be in the set returned. This operation is fast on frozen page templates (i.e at execution time).
      • freeze

        public void freeze()
        Specified by:
        freeze in interface com.yahoo.component.provider.Freezable
        Overrides:
        freeze in class com.yahoo.component.provider.FreezableComponent
      • toString

        public String toString()
        Overrides:
        toString in class com.yahoo.component.AbstractComponent