Class AutoDetectionUtils
java.lang.Object
io.axoniq.framework.workflow.configuration.AutoDetectionUtils
Utilities for workflow auto-detection.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski, Steven van Beelen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordMethod with workflow attributes. -
Method Summary
Modifier and TypeMethodDescriptionstatusChangeListeners(@Nullable Object instance, String workflowName, AnnotatedHandlerInspector<Object> inspector) Retrievesworkflow lifecycle change listenersfor the workflow as contained in the giveninstance.static voidValidates attributes set viaWorkflowannotation (or its meta).workflowMethods(Class<?> type) Retrieve workflow methods.static @Nullable ObjectwrapIfPossible(Class<?> type, @Nullable WorkflowContext context) Wraps the context if possible.
-
Method Details
-
workflowMethods
public static Stream<AutoDetectionUtils.MethodWithWorkflowAttributes> workflowMethods(Class<?> type) Retrieve workflow methods.- Parameters:
type- type to detect methods on.- Returns:
- workflow methods.
-
statusChangeListeners
public static Map<WorkflowStatus,WorkflowStatusChangeListener> statusChangeListeners(@Nullable Object instance, String workflowName, AnnotatedHandlerInspector<Object> inspector) Retrievesworkflow lifecycle change listenersfor the workflow as contained in the giveninstance.- Parameters:
instance- instance to detectworkflow lifecycle change listenermethods onworkflowName- name of the workflowinspector- inspector holding the enhancedMessageHandlingMembers built forinstance's class- Returns:
- unmodifiable map of
lifecycle change listeners
-
wrapIfPossible
Wraps the context if possible.- Parameters:
type- type to wrap intocontext- context to wrap- Returns:
- wrapped context or null
-
validateAttributes
public static void validateAttributes(Map<String, @Nullable Object> attributes, Class<?> type, Method method) Validates attributes set viaWorkflowannotation (or its meta).- Parameters:
attributes- attributes read from annotation.type- class the method was present from which the annotation was read of.method- method the annotation was read of.
-