Interface AllowListConfig
- All Superinterfaces:
Prototype.Api, Prototype.Factory<AllowList>
- All Known Implementing Classes:
AllowListConfig.BuilderBase.AllowListConfigImpl
AllowList defines a list of allowed and/or denied matches and tests if a particular value conforms to
the conditions.
The algorithm of testing that a value is allowed:
- Iterate through all allowed patterns, if none matches, value is not permitted
- Iterate through all denied patterns, if any matches, value is not permitted
- Value is permitted
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forAllowList.static classAllowListConfig.BuilderBase<BUILDER extends AllowListConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends AllowListConfig>Fluent API builder base forAllowListConfig. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowAll()Allows all strings to match (subject to "deny" conditions).allowed()Exact strings to allow.Patterns specifying strings to allow.Allowed predicates.Prefixes specifying strings to allow.Suffixes specifying strings to allow.static AllowListConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static AllowListConfig.Builderbuilder(AllowListConfig instance) Create a new fluent API builder from an existing instance.static AllowListConfigcreate()Create a new instance with default values.static AllowListConfigCreate a new instance from configuration.denied()Exact strings to deny.Patterns specifying strings to deny.Deny predicates.Prefixes specifying strings to deny.Suffixes specifying strings to deny.Methods inherited from interface Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
-
allowAll
boolean allowAll()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.- Returns:
- whether to allow all strings to match (subject to "deny" conditions)
-
allowed
-
allowedPrefixes
-
allowedSuffixes
-
allowedPatterns
-
denied
-
deniedPrefixes
-
deniedSuffixes
-
deniedPatterns
-
allowedPredicates
-
deniedPredicates
-