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

java.lang.Object
io.helidon.validation.ValidationContextConfig.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>
Direct Known Subclasses:
ValidationContextConfig.Builder
Enclosing interface:
ValidationContextConfig

public abstract static class ValidationContextConfig.BuilderBase<BUILDER extends ValidationContextConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ValidationContextConfig> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for ValidationContextConfig.
  • Constructor Details

    • BuilderBase

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

    • from

      public BUILDER from(ValidationContextConfig 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(ValidationContextConfig.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
    • rootType

      public BUILDER rootType(Class<?> rootType)
      Top level validation root type.
      Parameters:
      rootType - root type
      Returns:
      updated builder instance
      See Also:
    • clearRootObject

      public BUILDER clearRootObject()
      Clear existing value of rootObject.
      Returns:
      updated builder instance
      See Also:
    • rootObject

      public BUILDER rootObject(Object rootObject)
      Top level validation root object. If empty, we may be validating a constructor.
      Parameters:
      rootObject - root object if specified, empty otherwise
      Returns:
      updated builder instance
      See Also:
    • clock

      public BUILDER clock(Clock clock)
      Clock to use for validation of calendar constraints.
      Parameters:
      clock - clock for validation
      Returns:
      updated builder instance
      See Also:
    • clockDiscoverServices

      public BUILDER clockDiscoverServices(boolean clockDiscoverServices)
      Service discovery flag for clock(). If set to true, services will be discovered from Java service loader, or Helidon ServiceRegistry.
      Parameters:
      clockDiscoverServices - whether to enable automatic service discovery
      Returns:
      updated builder instance
      See Also:
    • serviceRegistry

      public BUILDER serviceRegistry(ServiceRegistry serviceRegistry)
      Service registry used to discover providers and services. Provide an explicit registry instance to use.

      If not configured, the GlobalServiceRegistry would be used to discover services.

      Parameters:
      serviceRegistry - service registry to use
      Returns:
      updated builder instance
      See Also:
    • rootType

      public Optional<Class<?>> rootType()
      Top level validation root type.
      Returns:
      root type
    • rootObject

      public Optional<Object> rootObject()
      Top level validation root object. If empty, we may be validating a constructor.
      Returns:
      root object if specified, empty otherwise
    • clock

      public Optional<Clock> clock()
      Clock to use for validation of calendar constraints.
      Returns:
      clock for validation
    • clockDiscoverServices

      public boolean clockDiscoverServices()
      Service discovery flag for clock(). If set to true, services will be discovered from Java service loader, or Helidon ServiceRegistry.
      Returns:
      whether to enable automatic service discovery
    • serviceRegistry

      public Optional<ServiceRegistry> serviceRegistry()
      Service registry used to discover providers and services. Provide an explicit registry instance to use.

      If not configured, the GlobalServiceRegistry would be used to discover services.

      Returns:
      service registry to use
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.