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.BuilderaddAllowed(String exact)Adds an exact string which, if matched, allows matching for a candidate string.AllowList.BuilderaddAllowed(Predicate<String> predicate)Adds a predicate which, if matched, allows matching for a candidate string.AllowList.BuilderaddAllowedPattern(Pattern pattern)Adds aPatternwhich, if matched, allows matching for a candidate string.AllowList.BuilderaddAllowedPrefix(String prefix)Adds a prefix which, if matched, allows matching for a candidate string.AllowList.BuilderaddAllowedSuffix(String suffix)Adds a suffix which, if matched, allows matching for a candidate string.AllowList.BuilderaddDenied(String exact)Adds an exact string which, if matched, denies matching for a candidate string.AllowList.BuilderaddDenied(Predicate<String> predicate)Adds a predicate which, if matched, denies matching for a candidate string.AllowList.BuilderaddDeniedPattern(Pattern pattern)Adds aPatternwhich, if matched, denies matching for a candidate string.AllowList.BuilderaddDeniedPrefix(String prefix)Adds a prefix which, if matched, denies matching for a candidate string.AllowList.BuilderaddDeniedSuffix(String suffix)Adds a suffix which, if matched, denies matching for a candidate string.AllowList.BuilderallowAll(boolean value)Allows all strings to match (subject to "deny" conditions).AllowList.Builderallowed(List<String> exacts)Adds a list of exact strings any of which, if matched, allows matching for a candidate string.AllowList.BuilderallowedPatterns(List<Pattern> patterns)Adds a list ofPatternany of which, if matched, allows matching for a candidate string.AllowList.BuilderallowedPrefixes(List<String> prefixes)Adds a list of prefixes any of which, if matched, allows matching for a candidate string.AllowList.BuilderallowedSuffixes(List<String> suffixes)Adds a list of suffixes any of which, if matched, allows matching for a candidate string.AllowListbuild()Build the instance from this builder.AllowList.Builderconfig(Config config)Update builder from configuration.AllowList.Builderdenied(List<String> exacts)Adds exact strings a match by any of which denies matching for a candidate string.AllowList.BuilderdeniedPatterns(List<Pattern> patterns)Adds patterns a match by any of which denies matching for a candidate string.AllowList.BuilderdeniedPrefixes(List<String> prefixes)Adds prefixes a match by any of which denies matching for a candidate string.AllowList.BuilderdeniedSuffixes(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:BuilderBuild 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.allsetting offalsedoes 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 ofPatternany 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 aPatternwhich, 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 aPatternwhich, 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
-
-