Package io.helidon.security.abac.policy
Class PolicyValidator.PolicyConfig.Builder
- java.lang.Object
-
- io.helidon.security.abac.policy.PolicyValidator.PolicyConfig.Builder
-
- All Implemented Interfaces:
Builder<PolicyValidator.PolicyConfig>
,Supplier<PolicyValidator.PolicyConfig>
- Enclosing class:
- PolicyValidator.PolicyConfig
public static final class PolicyValidator.PolicyConfig.Builder extends Object implements Builder<PolicyValidator.PolicyConfig>
A fluent API builder forPolicyValidator.PolicyConfig
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolicyValidator.PolicyConfig
build()
Build the instance from this builder.PolicyValidator.PolicyConfig.Builder
config(Config config)
Update this builder from configuration.PolicyValidator.PolicyConfig.Builder
inherit(boolean inherit)
By default, all policy statements defined on all levels (application, class, method, field) are executed in order.PolicyValidator.PolicyConfig.Builder
statement(String policyStatement)
The statement of this policy.
-
-
-
Method Detail
-
statement
public PolicyValidator.PolicyConfig.Builder statement(String policyStatement)
The statement of this policy. Actual value depends on policy engine in use.- Parameters:
policyStatement
- statement to validate access against- Returns:
- updated builder instance
-
inherit
public PolicyValidator.PolicyConfig.Builder inherit(boolean inherit)
By default, all policy statements defined on all levels (application, class, method, field) are executed in order. If set to false, on the last policy in the list is executed (e.g. only on method for resource method of Jersey integration, if it is defined on method). NOTE: if there is no statement defined on current level, we will use a statement from nearest level above- Parameters:
inherit
- whether to inherit policies from annotations defined on higher level- Returns:
- updated builder instance
-
config
public PolicyValidator.PolicyConfig.Builder config(Config config)
Update this builder from configuration.- Parameters:
config
- config instance located on the keyPolicyValidator.configKey()
- Returns:
- updated builder instance
-
build
public PolicyValidator.PolicyConfig build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<PolicyValidator.PolicyConfig>
- Returns:
- instance of the built type
-
-