Module io.helidon.json.schema
Package io.helidon.json.schema
Class SchemaObject.BuilderBase<BUILDER extends SchemaObject.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaObject>
java.lang.Object
io.helidon.json.schema.SchemaItem.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.json.schema.SchemaObject.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
SchemaObject.Builder
- Enclosing interface:
SchemaObject
public abstract static class SchemaObject.BuilderBase<BUILDER extends SchemaObject.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SchemaObject>
extends SchemaItem.BuilderBase<BUILDER,PROTOTYPE>
implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for
SchemaObject
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.json.schema.SchemaItem.BuilderBase
SchemaItem.BuilderBase.SchemaItemImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddArrayProperties
(Map<String, ? extends SchemaArray> arrayProperties) Map of all array properties.addArrayProperty
(String key, SchemaArray addArrayProperty) Map of all array properties.addArrayProperty
(String key, Consumer<SchemaArray.Builder> consumer) Map of all array properties.addBooleanProperties
(Map<String, ? extends SchemaBoolean> booleanProperties) Map of all boolean properties.addBooleanProperty
(String key, SchemaBoolean addBooleanProperty) Map of all boolean properties.addBooleanProperty
(String key, Consumer<SchemaBoolean.Builder> consumer) Map of all boolean properties.addIntegerProperties
(Map<String, ? extends SchemaInteger> integerProperties) Map of all integer properties.addIntegerProperty
(String key, SchemaInteger addIntegerProperty) Map of all integer properties.addIntegerProperty
(String key, Consumer<SchemaInteger.Builder> consumer) Map of all integer properties.Whether any additional properties are allowed.additionalProperties
(boolean additionalProperties) Whether any additional properties are allowed.addNullProperties
(Map<String, ? extends SchemaNull> nullProperties) Map of all null properties.addNullProperty
(String key, SchemaNull addNullProperty) Map of all null properties.addNullProperty
(String key, Consumer<SchemaNull.Builder> consumer) Map of all null properties.addNumberProperties
(Map<String, ? extends SchemaNumber> numberProperties) Map of all number properties.addNumberProperty
(String key, SchemaNumber addNumberProperty) Map of all number properties.addNumberProperty
(String key, Consumer<SchemaNumber.Builder> consumer) Map of all number properties.addObjectProperties
(Map<String, ? extends SchemaObject> objectProperties) Map of all object properties.addObjectProperty
(String key, SchemaObject addObjectProperty) Map of all object properties.addObjectProperty
(String key, Consumer<SchemaObject.Builder> consumer) Map of all object properties.Add JSON schema property based on the provided schema root type.addStringProperties
(Map<String, ? extends SchemaString> stringProperties) Map of all string properties.addStringProperty
(String key, SchemaString addStringProperty) Map of all string properties.addStringProperty
(String key, Consumer<SchemaString.Builder> consumer) Map of all string properties.Map of all array properties.arrayProperties
(Map<String, ? extends SchemaArray> arrayProperties) Map of all array properties.Map of all boolean properties.booleanProperties
(Map<String, ? extends SchemaBoolean> booleanProperties) Map of all boolean properties.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.from
(SchemaObject prototype) Update this builder from an existing prototype instance.from
(SchemaObject.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Map of all integer properties.integerProperties
(Map<String, ? extends SchemaInteger> integerProperties) Map of all integer properties.Maximum number of the object properties.maxProperties
(int maxProperties) Maximum number of the object properties.Minimum number of the object properties.minProperties
(int minProperties) Minimum number of the object properties.Map of all null properties.nullProperties
(Map<String, ? extends SchemaNull> nullProperties) Map of all null properties.Map of all number properties.numberProperties
(Map<String, ? extends SchemaNumber> numberProperties) Map of all number properties.Map of all object properties.objectProperties
(Map<String, ? extends SchemaObject> objectProperties) Map of all object properties.protected void
Handles providers and decorators.Map of all string properties.stringProperties
(Map<String, ? extends SchemaString> stringProperties) Map of all string properties.toString()
protected void
Validates required properties.Methods inherited from class io.helidon.json.schema.SchemaItem.BuilderBase
clearDescription, clearTitle, description, description, from, from, required, required, title, title
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
addSchema
Add JSON schema property based on the provided schema root type.- Parameters:
name
- property nameschema
- schema- Returns:
- updated builder instance
-
clearMaxProperties
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
maxProperties
Maximum number of the object properties.- Parameters:
maxProperties
- maximum number of the properties- Returns:
- updated builder instance
- See Also:
-
clearMinProperties
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
minProperties
Minimum number of the object properties.- Parameters:
minProperties
- minimum number of the properties- Returns:
- updated builder instance
- See Also:
-
clearAdditionalProperties
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
additionalProperties
Whether any additional properties are allowed. If set to true, all the available properties have to be added via corresponding property methods.- Parameters:
additionalProperties
- whether are additional properties allowed- Returns:
- updated builder instance
- See Also:
-
stringProperties
Map of all string properties. This method replaces all values with the new ones.- Parameters:
stringProperties
- all string properties- Returns:
- updated builder instance
- See Also:
-
addStringProperties
Map of all string properties. This method keeps existing values, then puts all new values into the map.- Parameters:
stringProperties
- all string properties- Returns:
- updated builder instance
- See Also:
-
addStringProperty
Map of all string properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceaddStringProperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addStringProperty
Map of all string properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceconsumer
- builder consumer to create new value for the key- Returns:
- updated builder instance
- See Also:
-
objectProperties
Map of all object properties. This method replaces all values with the new ones.- Parameters:
objectProperties
- all object properties- Returns:
- updated builder instance
- See Also:
-
addObjectProperties
Map of all object properties. This method keeps existing values, then puts all new values into the map.- Parameters:
objectProperties
- all object properties- Returns:
- updated builder instance
- See Also:
-
addObjectProperty
Map of all object properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceaddObjectProperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addObjectProperty
Map of all object properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceconsumer
- builder consumer to create new value for the key- Returns:
- updated builder instance
- See Also:
-
arrayProperties
Map of all array properties. This method replaces all values with the new ones.- Parameters:
arrayProperties
- all array properties- Returns:
- updated builder instance
- See Also:
-
addArrayProperties
Map of all array properties. This method keeps existing values, then puts all new values into the map.- Parameters:
arrayProperties
- all array properties- Returns:
- updated builder instance
- See Also:
-
addArrayProperty
Map of all array properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceaddArrayProperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addArrayProperty
Map of all array properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceconsumer
- builder consumer to create new value for the key- Returns:
- updated builder instance
- See Also:
-
numberProperties
Map of all number properties. This method replaces all values with the new ones.- Parameters:
numberProperties
- all number properties- Returns:
- updated builder instance
- See Also:
-
addNumberProperties
Map of all number properties. This method keeps existing values, then puts all new values into the map.- Parameters:
numberProperties
- all number properties- Returns:
- updated builder instance
- See Also:
-
addNumberProperty
Map of all number properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceaddNumberProperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addNumberProperty
Map of all number properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceconsumer
- builder consumer to create new value for the key- Returns:
- updated builder instance
- See Also:
-
integerProperties
Map of all integer properties. This method replaces all values with the new ones.- Parameters:
integerProperties
- all integer properties- Returns:
- updated builder instance
- See Also:
-
addIntegerProperties
Map of all integer properties. This method keeps existing values, then puts all new values into the map.- Parameters:
integerProperties
- all integer properties- Returns:
- updated builder instance
- See Also:
-
addIntegerProperty
Map of all integer properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceaddIntegerProperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addIntegerProperty
Map of all integer properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceconsumer
- builder consumer to create new value for the key- Returns:
- updated builder instance
- See Also:
-
booleanProperties
Map of all boolean properties. This method replaces all values with the new ones.- Parameters:
booleanProperties
- all boolean properties- Returns:
- updated builder instance
- See Also:
-
addBooleanProperties
Map of all boolean properties. This method keeps existing values, then puts all new values into the map.- Parameters:
booleanProperties
- all boolean properties- Returns:
- updated builder instance
- See Also:
-
addBooleanProperty
Map of all boolean properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceaddBooleanProperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addBooleanProperty
Map of all boolean properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceconsumer
- builder consumer to create new value for the key- Returns:
- updated builder instance
- See Also:
-
nullProperties
Map of all null properties. This method replaces all values with the new ones.- Parameters:
nullProperties
- all null properties- Returns:
- updated builder instance
- See Also:
-
addNullProperties
Map of all null properties. This method keeps existing values, then puts all new values into the map.- Parameters:
nullProperties
- all null properties- Returns:
- updated builder instance
- See Also:
-
addNullProperty
Map of all null properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceaddNullProperty
- new value for the key- Returns:
- updated builder instance
- See Also:
-
addNullProperty
Map of all null properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replaceconsumer
- builder consumer to create new value for the key- Returns:
- updated builder instance
- See Also:
-
maxProperties
Maximum number of the object properties.- Returns:
- the max properties
-
minProperties
Minimum number of the object properties.- Returns:
- the min properties
-
additionalProperties
Whether any additional properties are allowed. If set to true, all the available properties have to be added via corresponding property methods.- Returns:
- the additional properties
-
stringProperties
Map of all string properties.- Returns:
- the string properties
-
objectProperties
Map of all object properties.- Returns:
- the object properties
-
arrayProperties
Map of all array properties.- Returns:
- the array properties
-
numberProperties
Map of all number properties.- Returns:
- the number properties
-
integerProperties
Map of all integer properties.- Returns:
- the integer properties
-
booleanProperties
Map of all boolean properties.- Returns:
- the boolean properties
-
nullProperties
Map of all null properties.- Returns:
- the null properties
-
toString
- Overrides:
toString
in classSchemaItem.BuilderBase<BUILDER extends SchemaObject.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends SchemaObject>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototype
in classSchemaItem.BuilderBase<BUILDER extends SchemaObject.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends SchemaObject>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototype
in classSchemaItem.BuilderBase<BUILDER extends SchemaObject.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends SchemaObject>
-