Class AbstractJsonPathProcessor

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.AbstractJsonPathProcessor
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor
Direct Known Subclasses:
EvaluateJsonPath, SplitJson

public abstract class AbstractJsonPathProcessor extends org.apache.nifi.processor.AbstractProcessor
Provides common functionality used for processors interacting and manipulating JSON data via JsonPath.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final String
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    (package private) static final Map<String,String>
     
    (package private) static final String
     
    static final org.apache.nifi.components.PropertyDescriptor
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static com.jayway.jsonpath.Configuration
    createConfiguration(int maxStringLength)
     
    (package private) static String
    getResultRepresentation(com.jayway.jsonpath.spi.json.JsonProvider jsonProvider, Object jsonPathResult, String defaultValue)
     
    (package private) static boolean
    Determines the context by which JsonSmartJsonProvider would treat the value.
    (package private) static com.jayway.jsonpath.DocumentContext
    validateAndEstablishJsonContext(org.apache.nifi.processor.ProcessSession processSession, org.apache.nifi.flowfile.FlowFile flowFile, com.jayway.jsonpath.Configuration jsonPathConfiguration)
     

    Methods inherited from class org.apache.nifi.processor.AbstractProcessor

    onTrigger, onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getRelationships, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.processor.Processor

    isStateful, migrateProperties, migrateRelationships
  • Field Details

    • EMPTY_STRING_OPTION

      static final String EMPTY_STRING_OPTION
      See Also:
    • NULL_STRING_OPTION

      static final String NULL_STRING_OPTION
      See Also:
    • NULL_REPRESENTATION_MAP

      static final Map<String,String> NULL_REPRESENTATION_MAP
    • NULL_VALUE_DEFAULT_REPRESENTATION

      public static final org.apache.nifi.components.PropertyDescriptor NULL_VALUE_DEFAULT_REPRESENTATION
    • MAX_STRING_LENGTH

      public static final org.apache.nifi.components.PropertyDescriptor MAX_STRING_LENGTH
  • Constructor Details

    • AbstractJsonPathProcessor

      public AbstractJsonPathProcessor()
  • Method Details

    • createConfiguration

      static com.jayway.jsonpath.Configuration createConfiguration(int maxStringLength)
    • validateAndEstablishJsonContext

      static com.jayway.jsonpath.DocumentContext validateAndEstablishJsonContext(org.apache.nifi.processor.ProcessSession processSession, org.apache.nifi.flowfile.FlowFile flowFile, com.jayway.jsonpath.Configuration jsonPathConfiguration)
    • isJsonScalar

      static boolean isJsonScalar(Object obj)
      Determines the context by which JsonSmartJsonProvider would treat the value. Map and List objects can be rendered as JSON elements, everything else is treated as a scalar.
      Parameters:
      obj - item to be inspected if it is a scalar or a JSON element
      Returns:
      false, if the object is a supported type; true otherwise
    • getResultRepresentation

      static String getResultRepresentation(com.jayway.jsonpath.spi.json.JsonProvider jsonProvider, Object jsonPathResult, String defaultValue)