Class JsonTypeReferenceValidator<T>

java.lang.Object
org.qubership.nifi.processors.validator.AbstractJsonValidator<T>
org.qubership.nifi.processors.validator.JsonTypeReferenceValidator<T>
Type Parameters:
T - defines type of output value, e.g. JsonNode.
All Implemented Interfaces:
org.apache.nifi.components.Validator

public class JsonTypeReferenceValidator<T> extends AbstractJsonValidator<T>
Component validator for properties containing JSON that uses type references to parse JSON.
  • Field Summary

    Fields inherited from interface org.apache.nifi.components.Validator

    INVALID, VALID
  • Constructor Summary

    Constructors
    Constructor
    Description
    JsonTypeReferenceValidator(com.fasterxml.jackson.databind.ObjectMapper mapper, boolean allowEmpty, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
    Create instance of JsonTypeReferenceValidator
    JsonTypeReferenceValidator(com.fasterxml.jackson.databind.ObjectMapper mapper, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
    Create instance of JsonTypeReferenceValidator
  • Method Summary

    Modifier and Type
    Method
    Description
    protected T
    Converts JSON string into JSON object.

    Methods inherited from class org.qubership.nifi.processors.validator.AbstractJsonValidator

    validate, validate

    Methods inherited from class java.lang.Object

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

    • JsonTypeReferenceValidator

      public JsonTypeReferenceValidator(com.fasterxml.jackson.databind.ObjectMapper mapper, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
      Create instance of JsonTypeReferenceValidator
      Parameters:
      mapper - ObjectMapper to use
      typeRef - type reference for JSON parsing
    • JsonTypeReferenceValidator

      public JsonTypeReferenceValidator(com.fasterxml.jackson.databind.ObjectMapper mapper, boolean allowEmpty, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
      Create instance of JsonTypeReferenceValidator
      Parameters:
      mapper - ObjectMapper to use
      allowEmpty - if true, treats empty values as valid
      typeRef - type reference for JSON parsing
  • Method Details