Package org.axonframework.modelling.saga
Class PayloadAssociationResolver
java.lang.Object
org.axonframework.modelling.saga.PayloadAssociationResolver
- All Implemented Interfaces:
AssociationResolver
Used to derive the value of an association property by looking it up the event message's payload.
- Author:
- Sofia Guy Ang
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Objectresolve(String associationPropertyName, EventMessage<?> message, MessageHandlingMember<T> handler) Finds the association property value in the message's payload.<T> voidvalidate(String associationPropertyName, MessageHandlingMember<T> handler) Validates that the association property name exists as checked with the payload type.
-
Constructor Details
-
PayloadAssociationResolver
public PayloadAssociationResolver()
-
-
Method Details
-
validate
public <T> void validate(@Nonnull String associationPropertyName, @Nonnull MessageHandlingMember<T> handler) Validates that the association property name exists as checked with the payload type. This is done by attempting to create aProperty. It also caches the resultingPropertyinstance.- Specified by:
validatein interfaceAssociationResolver
-
resolve
public <T> Object resolve(@Nonnull String associationPropertyName, @Nonnull EventMessage<?> message, @Nonnull MessageHandlingMember<T> handler) Finds the association property value in the message's payload.- Specified by:
resolvein interfaceAssociationResolver
-