Class AllowList.Builder

java.lang.Object
io.helidon.common.configurable.AllowList.Builder
All Implemented Interfaces:
Builder<AllowList.Builder,AllowList>, Supplier<AllowList>
Enclosing interface:
AllowList

public static final class AllowList.Builder extends Object implements Builder<AllowList.Builder,AllowList>
Fluent API builder for AllowList.
  • Method Details

    • build

      public AllowList build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<AllowList.Builder,AllowList>
      Returns:
      instance of the built type
    • config

      public AllowList.Builder config(Config config)
      Update builder from configuration.
      Parameters:
      config - configuration to use
      Returns:
      updated builder
    • allowAll

      public AllowList.Builder allowAll(boolean value)
      Allows all strings to match (subject to "deny" conditions). An allow.all setting of false does not deny all strings but rather represents the absence of a universal match, meaning that other allow and deny settings determine the matching outcomes.
      Parameters:
      value - whether to allow all strings to match (subject to "deny" conditions)
      Returns:
      updated builder
    • allowed

      public AllowList.Builder allowed(List<String> exacts)
      Exact strings to allow.
      Parameters:
      exacts - which allow matching
      Returns:
      updated builder
    • allowedPrefixes

      public AllowList.Builder allowedPrefixes(List<String> prefixes)
      Prefixes specifying strings to allow.
      Parameters:
      prefixes - which allow matching
      Returns:
      updated builder
    • allowedSuffixes

      public AllowList.Builder allowedSuffixes(List<String> suffixes)
      Suffixes specifying strings to allow.
      Parameters:
      suffixes - which allow matching
      Returns:
      updated builder
    • allowedPatterns

      public AllowList.Builder allowedPatterns(List<Pattern> patterns)
      Patterns specifying strings to allow.
      Parameters:
      patterns - which allow matching
      Returns:
      updated builder
    • addAllowed

      public AllowList.Builder addAllowed(String exact)
      Adds an exact string to allow.
      Parameters:
      exact - which allows matching
      Returns:
      updated builder
    • addAllowedPattern

      public AllowList.Builder addAllowedPattern(Pattern pattern)
      Adds a Pattern specifying strings to allow.
      Parameters:
      pattern - which allows matching
      Returns:
      updated builder
    • addAllowedPrefix

      public AllowList.Builder addAllowedPrefix(String prefix)
      Adds a prefix specifying strings to allow.
      Parameters:
      prefix - which allows matching
      Returns:
      updated builder
    • addAllowedSuffix

      public AllowList.Builder addAllowedSuffix(String suffix)
      Adds a suffix specifying strings to allow.
      Parameters:
      suffix - which allows matching
      Returns:
      updated builder
    • addAllowed

      public AllowList.Builder addAllowed(Predicate<String> predicate)
      Adds a predicate specifying strings to allow.
      Parameters:
      predicate - which allows matching
      Returns:
      updated builder
    • denied

      public AllowList.Builder denied(List<String> exacts)
      Exact strings to deny.
      Parameters:
      exacts - which deny matching
      Returns:
      updated builder
    • deniedPrefixes

      public AllowList.Builder deniedPrefixes(List<String> prefixes)
      Prefixes specifying strings to deny.
      Parameters:
      prefixes - which deny matching
      Returns:
      updated builder
    • deniedSuffixes

      public AllowList.Builder deniedSuffixes(List<String> suffixes)
      Suffixes specifying strings to deny.
      Parameters:
      suffixes - which deny matching
      Returns:
      updated builder
    • deniedPatterns

      public AllowList.Builder deniedPatterns(List<Pattern> patterns)
      Patterns specifying strings to deny.
      Parameters:
      patterns - which deny matching
      Returns:
      updated builder
    • addDenied

      public AllowList.Builder addDenied(String exact)
      Adds an exact string to deny.
      Parameters:
      exact - match to deny matching
      Returns:
      updated builder
    • addDeniedPattern

      public AllowList.Builder addDeniedPattern(Pattern pattern)
      Adds a Pattern which specifies strings to deny.
      Parameters:
      pattern - to deny matching
      Returns:
      updated builder
    • addDeniedPrefix

      public AllowList.Builder addDeniedPrefix(String prefix)
      Adds a prefix which specifies strings to deny.
      Parameters:
      prefix - to deny matching
      Returns:
      updated builder
    • addDeniedSuffix

      public AllowList.Builder addDeniedSuffix(String suffix)
      Adds a suffix which specifies strings to deny.
      Parameters:
      suffix - to deny matching
      Returns:
      updated builder
    • addDenied

      public AllowList.Builder addDenied(Predicate<String> predicate)
      Adds a predicate which specifies strings to deny.
      Parameters:
      predicate - to deny matching
      Returns:
      updated builder