Package com.yahoo.search.pagetemplates
Class PageTemplate
java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.component.provider.FreezableComponent
com.yahoo.search.pagetemplates.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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(PageTemplateVisitor visitor) Accepts a visitor to this structurevoidfreeze()Returns the root section of this.Returns an unmodifiable set of all the sources this template may include (depending on choice resolution).voidsetSection(Section section) toString()Methods inherited from class com.yahoo.component.provider.FreezableComponent
clone, ensureNotFrozen, isFrozenMethods inherited from class com.yahoo.component.AbstractComponent
compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructableMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.yahoo.component.provider.Freezable
isFrozen
-
Constructor Details
-
PageTemplate
public PageTemplate(com.yahoo.component.ComponentId id)
-
-
Method Details
-
setSection
-
getSection
Returns the root section of this. This is never null. -
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:
freezein interfacecom.yahoo.component.provider.Freezable- Overrides:
freezein classcom.yahoo.component.provider.FreezableComponent
-
accept
Accepts a visitor to this structure- Specified by:
acceptin interfacePageElement
-
toString
- Overrides:
toStringin classcom.yahoo.component.AbstractComponent
-