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

java.lang.Object
io.helidon.http.media.jackson.JacksonSupportConfig.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:
JacksonSupportConfig.Builder
Enclosing interface:
JacksonSupportConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(JacksonSupportConfig 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(JacksonSupportConfig.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 JacksonSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JacksonSupportConfig>
      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 JacksonSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JacksonSupportConfig>
      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 jackson.
      Parameters:
      name - name of the support
      Returns:
      updated builder instance
      See Also:
    • objectMapper

      public BUILDER objectMapper(ObjectMapper objectMapper)
      Jackson ObjectMapper instance.
      Parameters:
      objectMapper - jackson object mapper instance
      Returns:
      updated builder instance
      See Also:
    • properties

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

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

      public BUILDER putProperty(String key, Boolean property)
      Jackson configuration properties. Properties are being ignored if specific JacksonSupport is set. Only boolean configuration values are supported. 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 jackson.
      Returns:
      the name
    • objectMapper

      public Optional<ObjectMapper> objectMapper()
      Jackson ObjectMapper instance.
      Returns:
      the object mapper
    • properties

      public Map<String,Boolean> properties()
      Jackson configuration properties. Properties are being ignored if specific JacksonSupport is set. Only boolean configuration values are supported.
      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.