public interface PropertyValue
A PropertyValue provides a mechanism whereby the currently configured value of a processor property can be obtained in different forms.
Modifier and Type | Method and Description |
---|---|
Boolean |
asBoolean() |
ControllerService |
asControllerService() |
<T extends ControllerService> |
asControllerService(Class<T> serviceType) |
Double |
asDataSize(DataUnit dataUnit) |
Double |
asDouble() |
Float |
asFloat() |
Integer |
asInteger() |
Long |
asLong() |
ResourceReference |
asResource() |
ResourceReferences |
asResources() |
Long |
asTimePeriod(TimeUnit timeUnit) |
PropertyValue |
evaluateAttributeExpressions()
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining.
|
PropertyValue |
evaluateAttributeExpressions(AttributeValueDecorator decorator)
Replaces values in the Property Value using the NiFi Expression Language.
|
PropertyValue |
evaluateAttributeExpressions(FlowFile flowFile)
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining.
|
PropertyValue |
evaluateAttributeExpressions(FlowFile flowFile,
AttributeValueDecorator decorator)
Replaces values in the Property Value using the NiFi Expression Language.
|
PropertyValue |
evaluateAttributeExpressions(FlowFile flowFile,
Map<String,String> additionalAttributes)
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining.
|
PropertyValue |
evaluateAttributeExpressions(FlowFile flowFile,
Map<String,String> additionalAttributes,
AttributeValueDecorator decorator)
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining.
|
PropertyValue |
evaluateAttributeExpressions(FlowFile flowFile,
Map<String,String> additionalAttributes,
AttributeValueDecorator decorator,
Map<String,String> stateValues)
Replaces values in the Property Value using the NiFi Expression
Language; a PropertyValue with the new value is then returned, supporting
call chaining.
|
PropertyValue |
evaluateAttributeExpressions(Map<String,String> attributes)
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining.
|
PropertyValue |
evaluateAttributeExpressions(Map<String,String> attributes,
AttributeValueDecorator decorator)
Replaces values in the Property Value using the NiFi Expression Language.
|
String |
getValue() |
boolean |
isExpressionLanguagePresent()
Indicates whether the value of the property uses Expression Language.
|
boolean |
isSet() |
String getValue()
Integer asInteger()
null
if not setNumberFormatException
- if not able to parseLong asLong()
null
if not setNumberFormatException
- if not able to parseBoolean asBoolean()
null
if not setFloat asFloat()
null
if not setNumberFormatException
- if not able to parseDouble asDouble()
null
if not setNumberFormatException
- if not able to parseLong asTimePeriod(TimeUnit timeUnit)
timeUnit
- specifies the TimeUnit to convert the time duration intonull
Double asDataSize(DataUnit dataUnit)
dataUnit
- specifies the DataUnit to convert the data size intonull
ControllerService asControllerService()
this
, or null
if either the value is not set or
the value does not identify a ControllerService<T extends ControllerService> T asControllerService(Class<T> serviceType) throws IllegalArgumentException
T
- the generic type of the controller serviceserviceType
- the class of the Controller Servicethis
, or null
if either the value is not set or
the value does not identify a ControllerService. The object returned by
this method is explicitly cast to type specified, if the type specified
is valid. Otherwise, throws an IllegalArgumentExceptionIllegalArgumentException
- if the value of this
points
to a ControllerService but that service is not of type
serviceType
or if serviceType
references a
class that is not an interfaceResourceReference asResource()
null
if no value was specified, or if the property references multiple resources.asResources()
ResourceReferences asResources()
null
.boolean isSet()
true
if the user has configured a value, or if the
PropertyDescriptor
for the associated property has a default
value, false
otherwisePropertyValue evaluateAttributeExpressions() throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownPropertyValue evaluateAttributeExpressions(Map<String,String> attributes) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
attributes
- a Map of attributes that the Expression can reference.
These will take precedence over any underlying variable registry values.ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownPropertyValue evaluateAttributeExpressions(Map<String,String> attributes, AttributeValueDecorator decorator) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language.
The supplied decorator is then given a chance to decorate the value, and
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
attributes
- a Map of attributes that the Expression can reference.
These will take precedence over any variables in any underlying variable
registry.decorator
- the decorator to use in order to update the values
returned after variable substitution and expression language evaluation.ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownPropertyValue evaluateAttributeExpressions(FlowFile flowFile) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
flowFile
- to evaluate attributes of. It's flow file properties and
then flow file attributes will take precedence over any underlying
variable registry.ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownPropertyValue evaluateAttributeExpressions(FlowFile flowFile, Map<String,String> additionalAttributes) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
flowFile
- to evaluate attributes of. It's flow file properties and
then flow file attributes will take precedence over any underlying
variable registry.additionalAttributes
- a Map of additional attributes that the
Expression can reference. These attributes will take precedence over any
conflicting attributes in the provided flowfile or any underlying
variable registry.ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownPropertyValue evaluateAttributeExpressions(FlowFile flowFile, Map<String,String> additionalAttributes, AttributeValueDecorator decorator) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language;
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
flowFile
- to evaluate attributes of. It's flow file properties and
then flow file attributes will take precedence over any underlying
variable registry.additionalAttributes
- a Map of additional attributes that the
Expression can reference. These attributes will take precedence over any
conflicting attributes in the provided flowfile or any underlying
variable registry.decorator
- the decorator to use in order to update the values
returned after variable substitution and expression language evaluation.ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownPropertyValue evaluateAttributeExpressions(FlowFile flowFile, Map<String,String> additionalAttributes, AttributeValueDecorator decorator, Map<String,String> stateValues) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language; a PropertyValue with the new value is then returned, supporting call chaining.
flowFile
- to evaluate attributes ofadditionalAttributes
- a Map of additional attributes that the Expression can reference. If entries in
this Map conflict with entries in the FlowFile's attributes, the entries in this Map are given a higher priority.decorator
- the decorator to use in order to update the values returned by the Expression LanguagestateValues
- a Map of the state values to be referenced explicitly by specific state accessing functionsProcessException
- if the Expression cannot be compiled or evaluating
the Expression against the given attributes causes an Exception to be thrownPropertyValue evaluateAttributeExpressions(AttributeValueDecorator decorator) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language.
The supplied decorator is then given a chance to decorate the value, and
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
decorator
- the decorator to use in order to update the values
returned after variable substitution and expression language evaluation.ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownPropertyValue evaluateAttributeExpressions(FlowFile flowFile, AttributeValueDecorator decorator) throws ProcessException
Replaces values in the Property Value using the NiFi Expression Language.
The supplied decorator is then given a chance to decorate the value, and
a PropertyValue with the new value is then returned, supporting call
chaining. Before executing the expression language statement any
variables names found within any underlying VariableRegistry
will
be substituted with their values.
flowFile
- to evaluate expressions againstdecorator
- the decorator to use in order to update the values
returned after variable substitution and expression language evaluation.ProcessException
- if the Expression cannot be compiled or
evaluating the Expression against the given attributes causes an
Exception to be thrownboolean isExpressionLanguagePresent()
Indicates whether the value of the property uses Expression Language.
true
if the property value makes use of the Expression Language, false
otherwise.Copyright © 2021 Apache NiFi Project. All rights reserved.