Class ValueLookup
java.lang.Object
org.apache.nifi.attribute.expression.language.ValueLookup
A convenience class to encapsulate the logic of variable substitution
based first on any additional variable maps, then flow file properties,
then flow file attributes, and finally the provided system and env
variable registry.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionValueLookup(org.apache.nifi.flowfile.FlowFile flowFile, Map<String, String>... additionalMaps) Constructs a ValueLookup where values are looked up first based any provided additional maps, then flowfile properties, then flowfile attributes, then based on the provided system and env variable registry. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()extractFlowFileProperties(org.apache.nifi.flowfile.FlowFile flowFile) booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
maps
-
environmentVariables
private final org.apache.nifi.registry.EnvironmentVariables environmentVariables
-
-
Constructor Details
-
ValueLookup
Constructs a ValueLookup where values are looked up first based any provided additional maps, then flowfile properties, then flowfile attributes, then based on the provided system and env variable registry. The lookup is immutable and operations which attempt to alter state will throw UnsupportedOperationException- Parameters:
flowFile- the flowFile to pull attributes from; may be nulladditionalMaps- the maps to pull values from; may be null or empty
-
-
Method Details
-
extractFlowFileProperties
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,String>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,String>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
getKeysAddressableByMultiMatch
-
keySet
-
values
-
entrySet
-