Class JavaxElPolicyExecutor.Builder
java.lang.Object
io.helidon.security.abac.policy.el.JavaxElPolicyExecutor.Builder
- All Implemented Interfaces:
Builder<JavaxElPolicyExecutor.Builder,
,JavaxElPolicyExecutor> Supplier<JavaxElPolicyExecutor>
- Enclosing class:
JavaxElPolicyExecutor
public static final class JavaxElPolicyExecutor.Builder
extends Object
implements Builder<JavaxElPolicyExecutor.Builder,JavaxElPolicyExecutor>
A fluent API builder for
JavaxElPolicyExecutor
.-
Method Summary
Modifier and TypeMethodDescriptionAdd a custom method to be available in expressions without a prefix.Add a custom method to be available in expressions.build()
Build the instance from this builder.Updated builder from configuration.expressionFactory
(jakarta.el.ExpressionFactory factory) Configure a specific expression factory to use with this executor.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<JavaxElPolicyExecutor.Builder,
JavaxElPolicyExecutor> - Returns:
- instance of the built type
-
expressionFactory
Configure a specific expression factory to use with this executor. If this method is not called, the executor uses default expression factory (if one is on the classpath).- Parameters:
factory
- factory to use- Returns:
- updated builder instance
-
addMethod
Add a custom method to be available in expressions without a prefix. This method must be a static method.- Parameters:
localName
- name to call this function in an expressionmethod
- method to invoke (may have parameters - these can be passed from the script)- Returns:
- updated builder instance
- See Also:
-
addMethod
Add a custom method to be available in expressions. This method must be a static method.Example
prefix: fun
localName: inRole
method: public static boolean isSubjectInRole(Subject subject, String roleName)
expression: "${fun:inRole(user, "some_role"}"- Parameters:
prefix
- prefix to use before the name in an expressionlocalName
- name to call this function in an expressionmethod
- method to invoke (may have parameters - these can be passed from the script)- Returns:
- updated builder instance
-
config
Updated builder from configuration.- Parameters:
config
- configuration to update from- Returns:
- updated builder instance
-