Class AbacProvider.Builder
- java.lang.Object
-
- io.helidon.security.providers.abac.AbacProvider.Builder
-
- All Implemented Interfaces:
Builder<AbacProvider>
,Supplier<AbacProvider>
- Enclosing class:
- AbacProvider
public static final class AbacProvider.Builder extends Object implements Builder<AbacProvider>
A fluent API builder forAbacProvider
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbacProvider.Builder
addValidator(AbacValidator<? extends AbacValidatorConfig> validator)
Add an explicit (e.g.AbacProvider
build()
Build the instance from this builder.AbacProvider.Builder
config(Config config)
Update builder from configuration and set the config toconfiguration(io.helidon.config.Config)
.AbacProvider.Builder
configuration(Config config)
Configuration to use for validator instances.AbacProvider.Builder
failIfNoneValidated(boolean failIfNoneValidated)
Whether to fail if NONE of the attributes is validated.AbacProvider.Builder
failOnUnvalidated(boolean failOnUnvalidated)
Whether to fail if any attribute is left unvalidated.
-
-
-
Method Detail
-
build
public AbacProvider build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<AbacProvider>
- Returns:
- instance of the built type
-
addValidator
public AbacProvider.Builder addValidator(AbacValidator<? extends AbacValidatorConfig> validator)
Add an explicit (e.g. not configurable automatically from a java service) attribute validator.- Parameters:
validator
- validator to add- Returns:
- updated builder instance
- See Also:
AbacValidatorService
-
configuration
public AbacProvider.Builder configuration(Config config)
Configuration to use for validator instances. This builder is NOT updated from the provided config, useconfig(Config)
to update this builder.- Parameters:
config
- configuration- Returns:
- updated builder instance
-
failOnUnvalidated
public AbacProvider.Builder failOnUnvalidated(boolean failOnUnvalidated)
Whether to fail if any attribute is left unvalidated.- Parameters:
failOnUnvalidated
- true for failure on unvalidated, false if it is OK to fail some of the validations- Returns:
- updated builder instance
-
failIfNoneValidated
public AbacProvider.Builder failIfNoneValidated(boolean failIfNoneValidated)
Whether to fail if NONE of the attributes is validated.- Parameters:
failIfNoneValidated
- true for failure on unvalidated, false if it is OK not to validate any attribute- Returns:
- updated builder instance
-
config
public AbacProvider.Builder config(Config config)
Update builder from configuration and set the config toconfiguration(io.helidon.config.Config)
.- Parameters:
config
- configuration placed on the key of this provider- Returns:
- updated builder instance
-
-