Package org.keycloak.models.workflow
Interface WorkflowEventProvider
- All Superinterfaces:
Provider
- All Known Implementing Classes:
AbstractWorkflowEventProvider,ClientAuthenticatedWorkflowEventProvider,ClientCreatedWorkflowEventProvider,UserAuthenticatedWorkflowEventProvider,UserCreatedWorkflowEventProvider,UserFedIdentityAddedWorkflowEventProvider,UserFedIdentityRemovedWorkflowEventProvider,UserGroupMembershipAddedWorkflowEventProvider,UserGroupMembershipRemovedWorkflowEventProvider,UserRoleGrantedWorkflowEventProvider,UserRoleRevokedWorkflowEventProvider
Defines a provider interface for handling and converting events into workflow events.
Implementations of this interface are responsible for determining whether specific
events (user events, admin events, or provider events) are supported, converting them
to workflow events, and evaluating workflow conditions based on these events.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()create(AdminEvent adminEvent) Creates aWorkflowEventfrom anAdminEvent.Creates aWorkflowEventfrom a userEvent.create(ProviderEvent providerEvent) Creates aWorkflowEventfrom aProviderEvent.booleanevaluate(WorkflowExecutionContext context) Evaluates whether the event in the workflow execution context matches this provider's criteria.Returns theResourceTypethat this event provider is capable of handling.booleansupports(AdminEvent adminEvent) Determines whether this provider supports the givenAdminEvent.booleanDetermines whether this provider supports the given userEvent.booleansupports(ProviderEvent providerEvent) Determines whether this provider supports the givenProviderEvent.
-
Method Details
-
getSupportedResourceType
ResourceType getSupportedResourceType()Returns theResourceTypethat this event provider is capable of handling.- Returns:
- the supported ResourceType for this event provider implementation
-
create
Creates aWorkflowEventfrom a userEvent.- Parameters:
event- the user event to convert- Returns:
- a WorkflowEvent representing the given event, or
nullif the event is not supported
-
create
Creates aWorkflowEventfrom anAdminEvent.- Parameters:
adminEvent- the admin event to convert- Returns:
- a WorkflowEvent representing the given admin event, or
nullif the event is not supported
-
create
Creates aWorkflowEventfrom aProviderEvent.- Parameters:
providerEvent- the provider event to convert- Returns:
- a WorkflowEvent representing the given provider event, or
nullif the event is not supported
-
supports
Determines whether this provider supports the given userEvent.- Parameters:
event- the user event to check- Returns:
trueif the event is supported,falseotherwise
-
supports
Determines whether this provider supports the givenAdminEvent.- Parameters:
adminEvent- the admin event to check- Returns:
trueif the event is supported,falseotherwise
-
supports
Determines whether this provider supports the givenProviderEvent.- Parameters:
providerEvent- the provider event to check- Returns:
trueif the event is supported,falseotherwise
-
evaluate
Evaluates whether the event in the workflow execution context matches this provider's criteria. Implementations should inspect the workflow event in the providedcontextand returntruewhen the event matches the provider's specific conditions.- Parameters:
context- the execution context for the workflow evaluation- Returns:
trueif the event matches the criteria,falseotherwise
-
close
default void close()
-