Package io.helidon.common.configurable
Class AllowList.Builder
- java.lang.Object
-
- io.helidon.common.configurable.AllowList.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AllowList.Builder
addAllowed(String exact)
Adds an exact string which, if matched, allows matching for a candidate string.AllowList.Builder
addAllowed(Predicate<String> predicate)
Adds a predicate which, if matched, allows matching for a candidate string.AllowList.Builder
addAllowedPattern(Pattern pattern)
Adds aPattern
which, if matched, allows matching for a candidate string.AllowList.Builder
addAllowedPrefix(String prefix)
Adds a prefix which, if matched, allows matching for a candidate string.AllowList.Builder
addAllowedSuffix(String suffix)
Adds a suffix which, if matched, allows matching for a candidate string.AllowList.Builder
addDenied(String exact)
Adds an exact string which, if matched, denies matching for a candidate string.AllowList.Builder
addDenied(Predicate<String> predicate)
Adds a predicate which, if matched, denies matching for a candidate string.AllowList.Builder
addDeniedPattern(Pattern pattern)
Adds aPattern
which, if matched, denies matching for a candidate string.AllowList.Builder
addDeniedPrefix(String prefix)
Adds a prefix which, if matched, denies matching for a candidate string.AllowList.Builder
addDeniedSuffix(String suffix)
Adds a suffix which, if matched, denies matching for a candidate string.AllowList.Builder
allowAll(boolean value)
Allows all strings to match (subject to "deny" conditions).AllowList.Builder
allowed(List<String> exacts)
Adds a list of exact strings any of which, if matched, allows matching for a candidate string.AllowList.Builder
allowedPatterns(List<Pattern> patterns)
Adds a list ofPattern
any of which, if matched, allows matching for a candidate string.AllowList.Builder
allowedPrefixes(List<String> prefixes)
Adds a list of prefixes any of which, if matched, allows matching for a candidate string.AllowList.Builder
allowedSuffixes(List<String> suffixes)
Adds a list of suffixes any of which, if matched, allows matching for a candidate string.AllowList
build()
Build the instance from this builder.AllowList.Builder
config(Config config)
Update builder from configuration.AllowList.Builder
denied(List<String> exacts)
Adds exact strings a match by any of which denies matching for a candidate string.AllowList.Builder
deniedPatterns(List<Pattern> patterns)
Adds patterns a match by any of which denies matching for a candidate string.AllowList.Builder
deniedPrefixes(List<String> prefixes)
Adds prefixes a match by any of which denies matching for a candidate string.AllowList.Builder
deniedSuffixes(List<String> suffixes)
Adds suffixes a match by any of which denies matching for a candidate string.
-
-
-
Method Detail
-
build
public AllowList build()
Description copied from interface:Builder
Build the instance from this builder.
-
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). Anallow.all
setting offalse
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 ofPattern
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 aPattern
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 aPattern
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
-
-