Class JsonbSupportConfig.BuilderBase<BUILDER extends JsonbSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JsonbSupportConfig>

java.lang.Object
io.helidon.http.media.jsonb.JsonbSupportConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
JsonbSupportConfig.Builder
Enclosing interface:
JsonbSupportConfig

public abstract static class JsonbSupportConfig.BuilderBase<BUILDER extends JsonbSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JsonbSupportConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for JsonbSupport.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(JsonbSupportConfig prototype)
      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

      public BUILDER from(JsonbSupportConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      @Deprecated public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JsonbSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JsonbSupportConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JsonbSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JsonbSupportConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • name

      public BUILDER name(String name)
      Name of the support. Default value is jsonb.
      Parameters:
      name - name of the support
      Returns:
      updated builder instance
      See Also:
    • jsonb

      public BUILDER jsonb(Jsonb jsonb)
      Jsonb instance.
      Parameters:
      jsonb - jsonb instance
      Returns:
      updated builder instance
      See Also:
    • properties

      public BUILDER properties(Map<String,?> properties)
      Jsonb configuration properties. Properties are being ignored if specific Jsonb is set. This method replaces all values with the new ones.
      Parameters:
      properties - jsonb config properties
      Returns:
      updated builder instance
      See Also:
    • addProperties

      public BUILDER addProperties(Map<String,?> properties)
      Jsonb configuration properties. Properties are being ignored if specific Jsonb is set. This method keeps existing values, then puts all new values into the map.
      Parameters:
      properties - jsonb config properties
      Returns:
      updated builder instance
      See Also:
    • putProperty

      public BUILDER putProperty(String key, Object property)
      Jsonb configuration properties. Properties are being ignored if specific Jsonb is set. This method adds a new value to the map, or replaces it if the key already exists.
      Parameters:
      key - key to add or replace
      property - new value for the key
      Returns:
      updated builder instance
      See Also:
    • name

      public String name()
      Name of the support. Default value is jsonb.
      Returns:
      the name
    • jsonb

      public Optional<Jsonb> jsonb()
      Jsonb instance.
      Returns:
      the jsonb
    • properties

      public Map<String,Object> properties()
      Jsonb configuration properties. Properties are being ignored if specific Jsonb is set.
      Returns:
      the properties
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.