public class BackedOverridableQueryProfile extends OverridableQueryProfile implements Cloneable
A wrapper of a query profile where overrides to the values in the referenced profile can be set.
This is used to allow configured overrides (in a particular referencing profile) of a referenced query profile.
Properties which are defined as not overridable in the type (if any) of the referenced query profile cannot be set.
Constructor and Description |
---|
BackedOverridableQueryProfile(QueryProfile backingProfile)
Creates an overridable profile from the given backing profile.
|
Modifier and Type | Method and Description |
---|---|
void |
addInherited(QueryProfile inherited)
Adds a profile to the end of the inherited list of this.
|
BackedOverridableQueryProfile |
clone()
Returns a clone of this which can be independently overridden, but which refers to the same backing profile
|
protected QueryProfile |
createSubProfile(String name,
DimensionBinding dimensionBinding)
Looks up all inherited profiles and adds any that matches this name.
|
void |
freeze()
Switches this from write-only to read-only mode.
|
QueryProfile |
getBacking()
Returns the query profile backing this
|
protected Map<String,Object> |
getContent()
Returns all the content from this:
All the values in this, and all values in the backing where an overriding value is not set in this
|
protected Object |
getContent(String localKey)
Returns a value from the content of this: The value in this, or the value from the backing if not set in this
|
List<String> |
getDimensions()
Returns the variant dimensions to be used in this - an unmodifiable list of dimension names
|
boolean |
isExplicit() |
protected Boolean |
isLocalInstanceOverridable(String localName) |
protected Object |
localLookup(String localName,
DimensionBinding dimensionBinding)
Do a variant-aware content lookup in this
|
String |
toString() |
protected void |
visitInherited(boolean allowContent,
com.yahoo.search.query.profile.QueryProfileVisitor visitor,
DimensionBinding dimensionBinding,
QueryProfile owner) |
protected void |
visitVariants(boolean allowContent,
com.yahoo.search.query.profile.QueryProfileVisitor visitor,
DimensionBinding dimensionBinding) |
checkAndConvertAssignment
accept, addInherited, addInherited, compile, convertToSubstitutionString, declaredContent, get, get, get, get, get, get, get, getFieldDescription, getType, getValue, getVariants, inherited, isDeclaredOverridable, listTypes, listValues, listValues, listValues, listValues, listValues, lookup, lookup, set, set, set, set, set, set, setDimensions, setLocalNode, setOverridable, setType, setValue, validateName
ensureNotFrozen, isFrozen
public BackedOverridableQueryProfile(QueryProfile backingProfile)
backingProfile
- the backing profile, which is assumed read only, never nullpublic void freeze()
QueryProfile
Calling this will also freeze any profiles inherited and referenced by this.
freeze
in interface com.yahoo.component.provider.Freezable
freeze
in class QueryProfile
protected Object localLookup(String localName, DimensionBinding dimensionBinding)
QueryProfile
localLookup
in class QueryProfile
protected Boolean isLocalInstanceOverridable(String localName)
isLocalInstanceOverridable
in class QueryProfile
protected QueryProfile createSubProfile(String name, DimensionBinding dimensionBinding)
QueryProfile
createSubProfile
in class OverridableQueryProfile
public BackedOverridableQueryProfile clone()
clone
in class OverridableQueryProfile
public QueryProfile getBacking()
public void addInherited(QueryProfile inherited)
QueryProfile
addInherited
in class QueryProfile
protected void visitVariants(boolean allowContent, com.yahoo.search.query.profile.QueryProfileVisitor visitor, DimensionBinding dimensionBinding)
visitVariants
in class QueryProfile
protected void visitInherited(boolean allowContent, com.yahoo.search.query.profile.QueryProfileVisitor visitor, DimensionBinding dimensionBinding, QueryProfile owner)
visitInherited
in class QueryProfile
protected Object getContent(String localKey)
getContent
in class QueryProfile
protected Map<String,Object> getContent()
getContent
in class QueryProfile
public String toString()
toString
in class OverridableQueryProfile
public boolean isExplicit()
isExplicit
in class QueryProfile
public List<String> getDimensions()
QueryProfile
getDimensions
in class QueryProfile
Copyright © 2018. All rights reserved.