Class PayloadPropertyValueRetriever

java.lang.Object
io.axoniq.framework.workflow.runtime.association.PayloadPropertyValueRetriever
All Implemented Interfaces:
ValueRetriever

public class PayloadPropertyValueRetriever extends Object implements ValueRetriever
Retrieves the value based on a payload property.
Since:
5.4.0
Author:
Simon Zambrovski
  • Field Details

    • PAYLOAD_TYPE

      public static final com.fasterxml.jackson.core.type.TypeReference<Map<String,@Nullable Object>> PAYLOAD_TYPE
      Map type reference for easy access.
    • QUALIFIER

      public static final String QUALIFIER
      Qualifier for the association schema.
      See Also:
  • Constructor Details

    • PayloadPropertyValueRetriever

      @Internal public PayloadPropertyValueRetriever(String payloadPropertyName)
      Constructs a new instance reading a specified payload property.
      Parameters:
      payloadPropertyName - property to read from the message payload.
  • Method Details

    • payloadProperty

      public static ValueRetriever payloadProperty(String payloadPropertyName)
      Creates a value retriever based on the given payload property.
      Parameters:
      payloadPropertyName - property to read from the message payload.
      Returns:
      value retriever.
    • apply

      public Object apply(EventMessage eventMessage, ProcessingContext processingContext)
      Description copied from interface: ValueRetriever
      Retrieves association value from the event message.
      Specified by:
      apply in interface ValueRetriever
      Parameters:
      eventMessage - event message to retrieve value from
      processingContext - processing context for retrieving addition resources
      Returns:
      retrieved value
    • qualifier

      public String qualifier()
      Description copied from interface: ValueRetriever
      Returns the qualifier used in the serialized association form.
      Specified by:
      qualifier in interface ValueRetriever
      Returns:
      qualifier, for example payload or metadata
    • path

      public String path()
      Description copied from interface: ValueRetriever
      Returns the source-specific path used in the serialized association form.
      Specified by:
      path in interface ValueRetriever
      Returns:
      source-specific path, such as a payload property or metadata key