public class Source extends com.yahoo.component.provider.FreezableClass implements PageElement
Two sources are equal if they have the same name and parameters.
Modifier and Type | Field and Description |
---|---|
static Source |
any
The "any" source - used to mark that any source is acceptable here
|
private int |
hashCode
The precalculated hashCode of this object, or 0 if this is not frozen
|
private String |
name
The obligatory name of a source
|
private Map<String,String> |
parameters |
private List<PageElement> |
renderers |
private String |
url |
Modifier | Constructor and Description |
---|---|
|
Source(String name) |
private |
Source(String name,
boolean freeze)
Creates a source and optionally immediately freezes it
|
Modifier and Type | Method and Description |
---|---|
void |
accept(PageTemplateVisitor visitor)
Accepts a visitor to this structure
|
private void |
assignRendererForIfNotSet(Renderer renderer) |
boolean |
equals(Object other) |
void |
freeze() |
String |
getName()
Returns the name of this source (never null)
|
String |
getUrl()
Returns the url of this source or null if none
|
int |
hashCode() |
Map<String,String> |
parameters()
Returns the parameters of this source as a live reference (never null).
|
List<PageElement> |
renderers()
Returns the renderers or choices of renderers to apply on individual items of this source
|
void |
setName(String name) |
void |
setUrl(String url)
Sets the url of this source.
|
String |
toString() |
clone, ensureNotFrozen, isFrozen
public static final Source any
private String name
private List<PageElement> renderers
private String url
private int hashCode
public Source(String name)
private Source(String name, boolean freeze)
public String getName()
public final void setName(String name)
public String getUrl()
public void setUrl(String url)
public List<PageElement> renderers()
If this contains multiple renderers/choices, they are to be used on different types of hits returned by this source.
public Map<String,String> parameters()
public void freeze()
freeze
in interface com.yahoo.component.provider.Freezable
freeze
in class com.yahoo.component.provider.FreezableClass
private void assignRendererForIfNotSet(Renderer renderer)
public void accept(PageTemplateVisitor visitor)
accept
in interface PageElement
Copyright © 2018. All rights reserved.