Class RoleWorkflowConditionProvider
java.lang.Object
org.keycloak.models.workflow.conditions.RoleWorkflowConditionProvider
- All Implemented Interfaces:
WorkflowConditionProvider,Provider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanevaluate(WorkflowExecutionContext context) Evaluates the condition against the given workflow execution context.Returns the ResourceType} that this condition is capable of evaluating.jakarta.persistence.criteria.PredicatetoPredicate(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<String> query, jakarta.persistence.criteria.Root<?> path) Creates a JPA Criteria APIPredicaterepresenting this condition for use in queries.voidvalidate()Validates the internal configuration/state of this condition provider.
-
Constructor Details
-
RoleWorkflowConditionProvider
-
-
Method Details
-
getSupportedResourceType
Description copied from interface:WorkflowConditionProviderReturns the ResourceType} that this condition is capable of evaluating.- Specified by:
getSupportedResourceTypein interfaceWorkflowConditionProvider- Returns:
- the supported ResourceType for this condition implementation
-
evaluate
Description copied from interface:WorkflowConditionProviderEvaluates the condition against the given workflow execution context. Implementations should inspect the providedcontextand returntruewhen the condition is satisfied andfalseotherwise. Typically, implementations use the resource found in the context to test if the condition holds or not, but sometimes the condition may depend on other aspects, such as the current time or other environmental conditions not directly related to the resource.- Specified by:
evaluatein interfaceWorkflowConditionProvider- Parameters:
context- the execution context for the workflow evaluation- Returns:
trueif the condition is met,falseotherwise
-
toPredicate
public jakarta.persistence.criteria.Predicate toPredicate(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<String> query, jakarta.persistence.criteria.Root<?> path) Description copied from interface:WorkflowConditionProviderCreates a JPA Criteria APIPredicaterepresenting this condition for use in queries. Implementations should construct and return a Predicate that can be applied to a query that targets the underlying resource. The method receives aCriteriaBuilder, theCriteriaQuerybeing built and the queryRootcorresponding to the resource being filtered.- Specified by:
toPredicatein interfaceWorkflowConditionProvider- Parameters:
cb- the CriteriaBuilder used to construct predicatesquery- the CriteriaQuery being constructedpath- the Root representing the resource entity in the query- Returns:
- a Predicate representing this condition for use in a CriteriaQuery
-
validate
Description copied from interface:WorkflowConditionProviderValidates the internal configuration/state of this condition provider. Implementations should perform any necessary self-checks and throw aWorkflowInvalidStateExceptionif the provider is not correctly configured or cannot operate safely.- Specified by:
validatein interfaceWorkflowConditionProvider- Throws:
WorkflowInvalidStateException- if the provider is in an invalid state
-
close
public void close()
-