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)
      Adds a list of exact strings any of which, if matched, allows matching for a candidate string.
      Parameters:
      exacts - which allow matching
      Returns:
      updated builder
    • allowedPrefixes

      public AllowList.Builder allowedPrefixes(List<String> prefixes)
      Adds a list of prefixes any of which, if matched, allows matching for a candidate string.
      Parameters:
      prefixes - which allow matching
      Returns:
      updated builder
    • allowedSuffixes

      public AllowList.Builder allowedSuffixes(List<String> suffixes)
      Adds a list of suffixes any of which, if matched, allows matching for a candidate string.
      Parameters:
      suffixes - which allow matching
      Returns:
      updated builder
    • allowedPatterns

      public AllowList.Builder allowedPatterns(List<Pattern> patterns)
      Adds a list of Pattern any of which, if matched, allows matching for a candidate string.
      Parameters:
      patterns - which allow matching
      Returns:
      updated builder
    • addAllowed

      public AllowList.Builder addAllowed(String exact)
      Adds an exact string which, if matched, allows matching for a candidate string.
      Parameters:
      exact - which allows matching
      Returns:
      updated builder
    • addAllowedPattern

      public AllowList.Builder addAllowedPattern(Pattern pattern)
      Adds a Pattern which, if matched, allows matching for a candidate string.
      Parameters:
      pattern - which allows matching
      Returns:
      updated builder
    • addAllowedPrefix

      public AllowList.Builder addAllowedPrefix(String prefix)
      Adds a prefix which, if matched, allows matching for a candidate string.
      Parameters:
      prefix - which allows matching
      Returns:
      updated builder
    • addAllowedSuffix

      public AllowList.Builder addAllowedSuffix(String suffix)
      Adds a suffix which, if matched, allows matching for a candidate string.
      Parameters:
      suffix - which allows matching
      Returns:
      updated builder
    • addAllowed

      public AllowList.Builder addAllowed(Predicate<String> predicate)
      Adds a predicate which, if matched, allows matching for a candidate string.
      Parameters:
      predicate - which allows matching
      Returns:
      updated builder
    • denied

      public AllowList.Builder denied(List<String> exacts)
      Adds exact strings a match by any of which denies matching for a candidate string.
      Parameters:
      exacts - which deny matching
      Returns:
      updated builder
    • deniedPrefixes

      public AllowList.Builder deniedPrefixes(List<String> prefixes)
      Adds prefixes a match by any of which denies matching for a candidate string.
      Parameters:
      prefixes - which deny matching
      Returns:
      updated builder
    • deniedSuffixes

      public AllowList.Builder deniedSuffixes(List<String> suffixes)
      Adds suffixes a match by any of which denies matching for a candidate string.
      Parameters:
      suffixes - which deny matching
      Returns:
      updated builder
    • deniedPatterns

      public AllowList.Builder deniedPatterns(List<Pattern> patterns)
      Adds patterns a match by any of which denies matching for a candidate string.
      Parameters:
      patterns - which deny matching
      Returns:
      updated builder
    • addDenied

      public AllowList.Builder addDenied(String exact)
      Adds an exact string which, if matched, denies matching for a candidate string.
      Parameters:
      exact - match to deny matching
      Returns:
      updated builder
    • addDeniedPattern

      public AllowList.Builder addDeniedPattern(Pattern pattern)
      Adds a Pattern which, if matched, denies matching for a candidate string.
      Parameters:
      pattern - to deny matching
      Returns:
      updated builder
    • addDeniedPrefix

      public AllowList.Builder addDeniedPrefix(String prefix)
      Adds a prefix which, if matched, denies matching for a candidate string.
      Parameters:
      prefix - to deny matching
      Returns:
      updated builder
    • addDeniedSuffix

      public AllowList.Builder addDeniedSuffix(String suffix)
      Adds a suffix which, if matched, denies matching for a candidate string.
      Parameters:
      suffix - to deny matching
      Returns:
      updated builder
    • addDenied

      public AllowList.Builder addDenied(Predicate<String> predicate)
      Adds a predicate which, if matched, denies matching for a candidate string.
      Parameters:
      predicate - to deny matching
      Returns:
      updated builder