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
(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 TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
extractFlowFileProperties
(FlowFile flowFile) boolean
isEmpty()
keySet()
void
int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
maps
-
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:
containsKey
in interfaceMap<String,
String>
-
containsValue
- Specified by:
containsValue
in interfaceMap<String,
String>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
getKeysAddressableByMultiMatch
-
keySet
-
values
-
entrySet
-