Package org.apache.nifi.expression
Interface AttributeExpression
public interface AttributeExpression
Defines a type of expression language statement that can be applied
parametrized by various attributes and properties as specified in each of
the method calls. AttributeExpression evaluations may be also backed by a
EnvironmentVariables
used to substitute attributes and variables found in
the expression for which the registry has a value.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionevaluate()
evaluate
(AttributeValueDecorator decorator) Evaluates the expression without additional attributes but enables the expression result to be decorated before returning.Evaluates the expression providing access to additional variables including the flow file properties such as file size, identifier, etc..evaluate
(FlowFile flowFile, AttributeValueDecorator decorator) Evaluates the expression providing access to additional variables including the flow file properties such as file size, identifier, etc..
-
Method Details
-
evaluate
- Returns:
- Evaluates the expression without any additional attributes.
- Throws:
ProcessException
- if unable to evaluate
-
evaluate
Evaluates the expression without additional attributes but enables the expression result to be decorated before returning.- Parameters:
decorator
- to execute on the resulting expression value- Returns:
- evaluated value
- Throws:
ProcessException
- if failure in evaluation
-
evaluate
Evaluates the expression providing access to additional variables including the flow file properties such as file size, identifier, etc.. and also all of the flow file attributes.- Parameters:
flowFile
- to evaluate- Returns:
- evaluated value
- Throws:
ProcessException
- if failure evaluating
-
evaluate
Evaluates the expression providing access to additional variables including the flow file properties such as file size, identifier, etc.. and also all of the flow file attributes. The resulting value after executing any variable substitution and expression evaluation is run through the given decorator and returned.- Parameters:
flowFile
- to evaluatedecorator
- for evaluation- Returns:
- evaluated value
- Throws:
ProcessException
- if failed to evaluate
-
getResultType
AttributeExpression.ResultType getResultType()- Returns:
- the type that is returned by the Expression
-