Class SimpleKeyValueLookupService

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.lookup.SimpleKeyValueLookupService
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.controller.ControllerService, LookupService<String>, StringLookupService

@Tags({"lookup","enrich","key","value"}) @CapabilityDescription("Allows users to add key/value pairs as User-defined Properties. Each property that is added can be looked up by Property Name. The coordinates that are passed to the lookup must contain the key \'key\'.") @DynamicProperty(name="A key that can be looked up", value="The value for the key", expressionLanguageScope=ENVIRONMENT, description="Allows users to add key/value pairs as User-defined Properties. Each property that is added can be looked up by Property Name. The coordinates that are passed to the lookup must contain the key \'key\'.") public class SimpleKeyValueLookupService extends org.apache.nifi.controller.AbstractControllerService implements StringLookupService
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String
     
    private Map<String,String>
     
    private static final Set<String>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cacheConfiguredValues(org.apache.nifi.controller.ConfigurationContext context)
     
     
    protected org.apache.nifi.components.PropertyDescriptor
     
    lookup(Map<String,Object> coordinates)
     

    Methods inherited from class org.apache.nifi.controller.AbstractControllerService

    abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabled

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

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, 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

    getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.controller.ControllerService

    initialize, isStateful, migrateProperties

    Methods inherited from interface org.apache.nifi.lookup.LookupService

    lookup

    Methods inherited from interface org.apache.nifi.lookup.StringLookupService

    getValueType
  • Field Details

  • Constructor Details

    • SimpleKeyValueLookupService

      public SimpleKeyValueLookupService()
  • Method Details

    • getSupportedDynamicPropertyDescriptor

      protected org.apache.nifi.components.PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
      Overrides:
      getSupportedDynamicPropertyDescriptor in class org.apache.nifi.components.AbstractConfigurableComponent
    • cacheConfiguredValues

      @OnEnabled public void cacheConfiguredValues(org.apache.nifi.controller.ConfigurationContext context)
    • lookup

      public Optional<String> lookup(Map<String,Object> coordinates)
      Specified by:
      lookup in interface LookupService<String>
    • getRequiredKeys

      public Set<String> getRequiredKeys()
      Specified by:
      getRequiredKeys in interface LookupService<String>