Class UserAttributeWorkflowConditionProvider
java.lang.Object
org.keycloak.models.workflow.conditions.UserAttributeWorkflowConditionProvider
- All Implemented Interfaces:
WorkflowConditionProvider,Provider
public class UserAttributeWorkflowConditionProvider
extends Object
implements WorkflowConditionProvider
-
Constructor Summary
ConstructorsConstructorDescriptionUserAttributeWorkflowConditionProvider(KeycloakSession session, String expectedAttribute) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanevaluate(WorkflowExecutionContext context) static String[]parseKeyValuePair(String keyValuePair) Parses a key-value pair string in the format "key:value" and returns an array containing the key and value.jakarta.persistence.criteria.PredicatetoPredicate(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<String> query, jakarta.persistence.criteria.Root<?> path) voidvalidate()
-
Constructor Details
-
UserAttributeWorkflowConditionProvider
-
-
Method Details
-
evaluate
- Specified by:
evaluatein interfaceWorkflowConditionProvider
-
toPredicate
public jakarta.persistence.criteria.Predicate toPredicate(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<String> query, jakarta.persistence.criteria.Root<?> path) - Specified by:
toPredicatein interfaceWorkflowConditionProvider
-
validate
public void validate()- Specified by:
validatein interfaceWorkflowConditionProvider
-
close
public void close() -
parseKeyValuePair
Parses a key-value pair string in the format "key:value" and returns an array containing the key and value. It relies on Properties.load to handle edge cases like escaped colons.- Parameters:
keyValuePair- the key-value pair string to parse- Returns:
- a
Stringarray where the first element is the key and the second element is the value.
-