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

java.lang.Object
io.helidon.webserver.security.SecurityFeatureConfig.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>, Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
SecurityFeatureConfig.Builder
Enclosing interface:
SecurityFeatureConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(SecurityFeatureConfig 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(SecurityFeatureConfig.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

      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 Prototype.ConfiguredBuilder<BUILDER extends SecurityFeatureConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SecurityFeatureConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • weight

      public BUILDER weight(double weight)
      Weight of the security feature. Value is: 800.0.
      Parameters:
      weight - weight of the feature
      Returns:
      updated builder instance
      See Also:
    • defaults

      public BUILDER defaults(SecurityHandler defaults)
      The default security handler.
      Parameters:
      defaults - security handler defaults
      Returns:
      updated builder instance
      See Also:
    • defaults

      public BUILDER defaults(SecurityHandlerConfig defaultsConfig)
      The default security handler.
      Parameters:
      defaultsConfig - security handler defaults
      Returns:
      updated builder instance
      See Also:
    • defaults

      public BUILDER defaults(Consumer<SecurityHandlerConfig.Builder> consumer)
      The default security handler.
      Parameters:
      consumer - consumer of builder for security handler defaults
      Returns:
      updated builder instance
      See Also:
    • defaults

      public BUILDER defaults(Supplier<? extends SecurityHandler> supplier)
      The default security handler.
      Parameters:
      supplier - supplier of security handler defaults
      Returns:
      updated builder instance
      See Also:
    • paths

      public BUILDER paths(List<? extends PathsConfig> paths)
      Configuration for webserver paths.
      Parameters:
      paths - path configuration
      Returns:
      updated builder instance
      See Also:
    • addPaths

      public BUILDER addPaths(List<? extends PathsConfig> paths)
      Configuration for webserver paths.
      Parameters:
      paths - path configuration
      Returns:
      updated builder instance
      See Also:
    • addPath

      public BUILDER addPath(PathsConfig path)
      Configuration for webserver paths.
      Parameters:
      path - path configuration
      Returns:
      updated builder instance
      See Also:
    • addPath

      public BUILDER addPath(Consumer<PathsConfig.Builder> consumer)
      Configuration for webserver paths.
      Parameters:
      consumer - path configuration
      Returns:
      updated builder instance
      See Also:
    • security

      public BUILDER security(Security security)
      Security associated with this feature. If not specified here, the feature uses security registered with Contexts.globalContext(), if not found, it creates a new instance from root of configuration (using security key).

      This configuration allows usage of a different security instance for a specific security feature setup.

      Parameters:
      security - security instance to be used to handle security in this feature configuration
      Returns:
      updated builder instance
      See Also:
    • security

      public BUILDER security(Consumer<Security.Builder> consumer)
      Security associated with this feature. If not specified here, the feature uses security registered with Contexts.globalContext(), if not found, it creates a new instance from root of configuration (using security key).

      This configuration allows usage of a different security instance for a specific security feature setup.

      Parameters:
      consumer - consumer of builder for security instance to be used to handle security in this feature configuration
      Returns:
      updated builder instance
      See Also:
    • security

      public BUILDER security(Supplier<? extends Security> supplier)
      Security associated with this feature. If not specified here, the feature uses security registered with Contexts.globalContext(), if not found, it creates a new instance from root of configuration (using security key).

      This configuration allows usage of a different security instance for a specific security feature setup.

      Parameters:
      supplier - supplier of security instance to be used to handle security in this feature configuration
      Returns:
      updated builder instance
      See Also:
    • name

      public BUILDER name(String name)
      Name of this instance.
      Parameters:
      name - instance name
      Returns:
      updated builder instance
      See Also:
    • weight

      public double weight()
      Weight of the security feature. Value is: 800.0.
      Returns:
      the weight
    • defaults

      public SecurityHandler defaults()
      The default security handler.
      Returns:
      the defaults
    • paths

      public List<PathsConfig> paths()
      Configuration for webserver paths.
      Returns:
      the paths
    • security

      public Optional<Security> security()
      Security associated with this feature. If not specified here, the feature uses security registered with Contexts.globalContext(), if not found, it creates a new instance from root of configuration (using security key).

      This configuration allows usage of a different security instance for a specific security feature setup.

      Returns:
      the security
    • name

      public String name()
      Name of this instance.
      Returns:
      the name
    • 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.