Package com.yahoo.vespa.config
Class ConfigPayloadBuilder
java.lang.Object
com.yahoo.vespa.config.ConfigPayloadBuilder
Helper class for building Slime config payloads, while supporting referring to payloads with their indices. The
builder does not care about config field types. This is resolved by the actual config type consumer created
from the Slime tree.
- Author:
- Ulf Lilleengen
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Representation of a config array, which supports both INDEX and APPEND modes.class
-
Constructor Summary
ConstructorDescriptionConstruct a payload builder that is not a leaf.ConfigPayloadBuilder
(ConfigDefinition configDefinition) ConfigPayloadBuilder
(ConfigPayload payload) -
Method Summary
Modifier and TypeMethodDescriptionCreate a new array where new values may be added.Create a new map where new values may be added.Get a new payload builder for a config struct, which can be used to add inner values to that struct.getValue()
Get the value of this field, if any.override
(ConfigPayloadBuilder other) void
resolve
(com.yahoo.slime.Cursor parent) Create slime tree from this builder.void
Set the value of a config field.void
toString()
-
Constructor Details
-
ConfigPayloadBuilder
public ConfigPayloadBuilder()Construct a payload builder that is not a leaf. -
ConfigPayloadBuilder
-
ConfigPayloadBuilder
-
-
Method Details
-
setField
Set the value of a config field.- Parameters:
name
- Name of the config field.value
- Value of the config field.
-
getObject
Get a new payload builder for a config struct, which can be used to add inner values to that struct.- Parameters:
name
- name of the struct to create- Returns:
- a payload builder corresponding to the name
-
getArray
Create a new array where new values may be added.- Parameters:
name
- Name of array.- Returns:
- Array object supporting adding elements to it.
-
resolve
public void resolve(com.yahoo.slime.Cursor parent) Create slime tree from this builder.- Parameters:
parent
- the parent Cursor for this builder
-
override
-
getValue
Get the value of this field, if any.- Returns:
- value of field, null if this is not a leaf
-
setValue
-
getMap
Create a new map where new values may be added.- Parameters:
name
- Name of map.- Returns:
- Map builder supporting adding elements to it.
-
getConfigDefinition
-
toString
-