@NoImplement public interface ExpressionManager extends MuleExpressionLanguage
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EXPRESSION_POSTFIX |
static String |
DEFAULT_EXPRESSION_PREFIX |
Modifier and Type | Method and Description |
---|---|
TypedValue |
evaluate(String expression)
Execute the expression returning the result.
|
TypedValue |
evaluate(String expression,
CoreEvent event)
Execute the expression returning the result.
|
TypedValue |
evaluate(String expression,
CoreEvent event,
BindingContext context)
Execute the expression returning the result.
|
TypedValue |
evaluate(String expression,
CoreEvent event,
ComponentLocation componentLocation)
Execute the expression returning the result.
|
TypedValue |
evaluate(String expression,
CoreEvent event,
ComponentLocation componentLocation,
BindingContext context)
Execute the expression returning the result.
|
TypedValue |
evaluate(String expression,
DataType expectedOutputType)
Evaluates an expression according to the global
BindingContext and the DataType of the expected result. |
TypedValue |
evaluate(String expression,
DataType expectedOutputType,
BindingContext context,
CoreEvent event)
Evaluates an expression according to a given
BindingContext , the global one, the DataType of the expected
result and an CoreEvent . |
TypedValue |
evaluate(String expression,
DataType expectedOutputType,
BindingContext context,
CoreEvent event,
ComponentLocation componentLocation,
boolean failOnNull)
Evaluates an expression according to a given
BindingContext , the global one, the DataType of the expected
result and an CoreEvent . |
boolean |
evaluateBoolean(String expression,
CoreEvent event,
ComponentLocation componentLocation)
Evaluates an expression considering a
boolean as output. |
boolean |
evaluateBoolean(String expression,
CoreEvent event,
ComponentLocation componentLocation,
boolean nullReturnsTrue,
boolean nonBooleanReturnsTrue)
Evaluates an expression considering a
boolean as output. |
String |
parseLogTemplate(String template,
CoreEvent event,
ComponentLocation componentLocation,
BindingContext bindingContext)
Parses a logging expression template by iterating through each expression and evaluating it.
|
Iterator<TypedValue<?>> |
split(String expression,
CoreEvent event,
BindingContext bindingContext)
Evaluates an expression according to a given
BindingContext , an CoreEvent . |
Iterator<TypedValue<?>> |
split(String expression,
CoreEvent event,
ComponentLocation componentLocation,
BindingContext bindingContext)
Evaluates an expression according to a given
BindingContext , an CoreEvent and a flowName. |
isExpression, isValid
addGlobalBindings, evaluate, evaluate, evaluateLogExpression, split, validate
static final String DEFAULT_EXPRESSION_PREFIX
static final String DEFAULT_EXPRESSION_POSTFIX
TypedValue evaluate(String expression) throws ExpressionRuntimeException
expression
- the expression to be executedExpressionRuntimeException
- if a problem occurs evaluating the expressionTypedValue evaluate(String expression, CoreEvent event) throws ExpressionRuntimeException
This version of evaluate
performs expression evaulation on an immutable event. Any CoreEvent
or
InternalMessage
mutation performed within the expression will impact within the context of expression evaluation but
will not mutated the event
parameter.
expression
- the expression to be executedevent
- the current event being processedExpressionRuntimeException
- if a problem occurs evaluating the expressionTypedValue evaluate(String expression, CoreEvent event, ComponentLocation componentLocation) throws ExpressionRuntimeException
This version of evaluate
performs expression evaulation on an immutable event. Any CoreEvent
or
InternalMessage
mutation performed within the expression will impact within the context of expression evaluation but
will not mutated the event
parameter.
expression
- the expression to be executedevent
- the current event being processedcomponentLocation
- the location of the component where the event is being processedExpressionRuntimeException
- if a problem occurs evaluating the expressionTypedValue evaluate(String expression, CoreEvent event, BindingContext context) throws ExpressionRuntimeException
This version of evaluate
performs expression evaulation on an immutable event. Any CoreEvent
or
InternalMessage
mutation performed within the expression will impact within the context of expression evaluation but
will not mutated the event
parameter.
expression
- the expression to be executedevent
- the current event being processedcontext
- the bindings to be consideredExpressionRuntimeException
- if a problem occurs evaluating the expressionTypedValue evaluate(String expression, CoreEvent event, ComponentLocation componentLocation, BindingContext context) throws ExpressionRuntimeException
This version of evaluate
performs expression evaulation on an immutable event. Any CoreEvent
or
InternalMessage
mutation performed within the expression will impact within the context of expression evaluation but
will not mutated the event
parameter.
expression
- the expression to be executedevent
- the current event being processedcomponentLocation
- the location of the component where the event is being processedcontext
- the bindings to be consideredExpressionRuntimeException
- if a problem occurs evaluating the expressionTypedValue evaluate(String expression, DataType expectedOutputType) throws ExpressionRuntimeException
BindingContext
and the DataType
of the expected result.expression
- the EL expressionexpectedOutputType
- the expected output type so that automatic conversion can be performed for the resulting value
type.ExpressionRuntimeException
- if a problem occurs evaluating the expression or during transformationTypedValue evaluate(String expression, DataType expectedOutputType, BindingContext context, CoreEvent event) throws ExpressionRuntimeException
BindingContext
, the global one, the DataType
of the expected
result and an CoreEvent
.expression
- the EL expressionexpectedOutputType
- the expected output type so that automatic conversion can be performed for the resulting value
type.context
- an expression binding context to considerevent
- the current event to considerExpressionRuntimeException
- if a problem occurs evaluating the expression or during transformationTypedValue evaluate(String expression, DataType expectedOutputType, BindingContext context, CoreEvent event, ComponentLocation componentLocation, boolean failOnNull) throws ExpressionRuntimeException
BindingContext
, the global one, the DataType
of the expected
result and an CoreEvent
.expression
- the EL expressionexpectedOutputType
- the expected output type so that automatic conversion can be performed for the resulting value
type.context
- an expression binding context to considerevent
- the current event to considercomponentLocation
- the location of the component where the event is being processedfailOnNull
- indicates if should fail if the evaluation result is null
ExpressionRuntimeException
- if a problem occurs evaluating the expression or during transformationboolean evaluateBoolean(String expression, CoreEvent event, ComponentLocation componentLocation) throws ExpressionRuntimeException
boolean
as output. If the result cannot be clearly transformed or is
null
, false
will be returned.expression
- a single expression to be evaluated and transformedevent
- the CoreEvent
to considercomponentLocation
- the location of the component where the event is being processedtrue
if the expression evaluated to that or "true", false otherwiseExpressionRuntimeException
- if a problem occurs evaluating the expressionboolean evaluateBoolean(String expression, CoreEvent event, ComponentLocation componentLocation, boolean nullReturnsTrue, boolean nonBooleanReturnsTrue) throws ExpressionRuntimeException
boolean
as output.expression
- a single expression to be evaluated and transformedevent
- the CoreEvent
to considercomponentLocation
- the location of the component where the event is being processednullReturnsTrue
- whether or not a null
outcome should be considered a true
nonBooleanReturnsTrue
- whether or not a non boolean outcome should be considered a true
true
if the expression evaluated to that, "true" or the above flags where considered, false
otherwiseExpressionRuntimeException
- if a problem occurs evaluating the expressionIterator<TypedValue<?>> split(String expression, CoreEvent event, ComponentLocation componentLocation, BindingContext bindingContext) throws ExpressionRuntimeException
BindingContext
, an CoreEvent
and a flowName.expression
- the expression to be executedevent
- the current event being processedcomponentLocation
- the location of the component where the event is being processedbindingContext
- the bindings to considerExpressionRuntimeException
- if a problem occurs evaluating the expressionIterator<TypedValue<?>> split(String expression, CoreEvent event, BindingContext bindingContext) throws ExpressionRuntimeException
BindingContext
, an CoreEvent
.expression
- the expression to be executedevent
- the current event being processedbindingContext
- the bindings to considerExpressionRuntimeException
- if a problem occurs evaluating the expressionString parseLogTemplate(String template, CoreEvent event, ComponentLocation componentLocation, BindingContext bindingContext) throws ExpressionRuntimeException
evaluate(String, CoreEvent, ComponentLocation, BindingContext)
.template
- the string template featuring inner expressions to parseevent
- the current event being processedcomponentLocation
- the location of the component where the event is being processedbindingContext
- the bindings to considerExpressionRuntimeException
- if a problem occurs evaluating the expressionCopyright © 2018. All rights reserved.