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.
  • Method Details

    • evaluate

      String evaluate() throws ProcessException
      Returns:
      Evaluates the expression without any additional attributes.
      Throws:
      ProcessException - if unable to evaluate
    • evaluate

      String evaluate(AttributeValueDecorator decorator) throws ProcessException
      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

      String evaluate(FlowFile flowFile) throws ProcessException
      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

      String evaluate(FlowFile flowFile, AttributeValueDecorator decorator) throws ProcessException
      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 evaluate
      decorator - for evaluation
      Returns:
      evaluated value
      Throws:
      ProcessException - if failed to evaluate
    • getResultType

      Returns:
      the type that is returned by the Expression