Class VariableParameterResolver

java.lang.Object
io.taktx.client.VariableParameterResolver
All Implemented Interfaces:
TaktParameterResolver

public class VariableParameterResolver extends Object implements TaktParameterResolver
A parameter resolver that extracts a variable from the ExternalTaskTriggerDTO's variables map and converts it to the specified type using Jackson's ObjectMapper.
  • Constructor Summary

    Constructors
    Constructor
    Description
    VariableParameterResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> type, String name)
    Constructs a VariableParameterResolver.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(io.taktx.dto.ExternalTaskTriggerDTO externalTaskTriggerDTO)
    Resolves the parameter by extracting the variable from the ExternalTaskTriggerDTO and converting it to the specified type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VariableParameterResolver

      public VariableParameterResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> type, String name)
      Constructs a VariableParameterResolver.
      Parameters:
      objectMapper - the ObjectMapper to use for conversion
      type - the target type to convert the variable to
      name - the name of the variable to extract
  • Method Details

    • resolve

      public Object resolve(io.taktx.dto.ExternalTaskTriggerDTO externalTaskTriggerDTO)
      Resolves the parameter by extracting the variable from the ExternalTaskTriggerDTO and converting it to the specified type.
      Specified by:
      resolve in interface TaktParameterResolver
      Parameters:
      externalTaskTriggerDTO - the ExternalTaskTriggerDTO containing the variables
      Returns:
      the resolved parameter value, or null if the variable is not found