public class ExpressionLanguageAdaptorHandler extends Object implements ExtendedExpressionLanguageAdaptor
ExtendedExpressionLanguageAdaptor which adapts MVEL and DW together, deciding via a prefix whether
one or the other should be call. It will allow MVEL and DW to be used together in compatibility mode.| Constructor and Description |
|---|
ExpressionLanguageAdaptorHandler(DataWeaveExpressionLanguageAdaptor defaultExtendedExpressionLanguage,
MVELExpressionLanguage mvelExpressionLanguage) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalBindings(org.mule.runtime.api.el.BindingContext bindingContext)
Registers the given
BindingContext entries as globals. |
void |
enrich(String expression,
Event event,
Event.Builder eventBuilder,
FlowConstruct flowConstruct,
Object object)
Enriches an event.
|
void |
enrich(String expression,
Event event,
Event.Builder eventBuilder,
FlowConstruct flowConstruct,
org.mule.runtime.api.metadata.TypedValue value)
Enriches an event using a typed value.
|
org.mule.runtime.api.metadata.TypedValue |
evaluate(String expression,
org.mule.runtime.api.metadata.DataType expectedOutputType,
Event event,
org.mule.runtime.api.el.BindingContext context)
Evaluates an expression according to a given
BindingContext and outputs . |
org.mule.runtime.api.metadata.TypedValue |
evaluate(String expression,
org.mule.runtime.api.metadata.DataType expectedOutputType,
Event event,
FlowConstruct flowConstruct,
org.mule.runtime.api.el.BindingContext context,
boolean failOnNull)
|
org.mule.runtime.api.metadata.TypedValue |
evaluate(String expression,
Event event,
org.mule.runtime.api.el.BindingContext context)
Evaluates an expression according to a given
BindingContext. |
org.mule.runtime.api.metadata.TypedValue |
evaluate(String expression,
Event event,
Event.Builder eventBuilder,
FlowConstruct flowConstruct,
org.mule.runtime.api.el.BindingContext bindingContext)
Execute the expression returning the result.
|
org.mule.runtime.api.metadata.TypedValue |
evaluate(String expression,
Event event,
FlowConstruct flowConstruct,
org.mule.runtime.api.el.BindingContext bindingContext)
|
boolean |
isMelDefault() |
Iterator<org.mule.runtime.api.metadata.TypedValue<?>> |
split(String expression,
Event event,
org.mule.runtime.api.el.BindingContext bindingContext)
Splits using the specified expression and group it with the batch size.
|
Iterator<org.mule.runtime.api.metadata.TypedValue<?>> |
split(String expression,
Event event,
FlowConstruct flowConstruct,
org.mule.runtime.api.el.BindingContext bindingContext)
Splits using the specified expression and group it with the batch size.
|
org.mule.runtime.api.el.ValidationResult |
validate(String expression)
Verifies whether an expression is valid or not syntactically.
|
public ExpressionLanguageAdaptorHandler(DataWeaveExpressionLanguageAdaptor defaultExtendedExpressionLanguage, MVELExpressionLanguage mvelExpressionLanguage)
public boolean isMelDefault()
public void addGlobalBindings(org.mule.runtime.api.el.BindingContext bindingContext)
ExpressionLanguageAdaptorBindingContext entries as globals. Notice globals cannot be removed once registered, only
overwritten by the registration of a binding with the same identifier.
Implementations should be thread safe to avoid race conditions between registration and expression evaluation.addGlobalBindings in interface ExpressionLanguageAdaptorbindingContext - the context to registerpublic org.mule.runtime.api.metadata.TypedValue evaluate(String expression, Event event, org.mule.runtime.api.el.BindingContext context) throws ExpressionRuntimeException
ExpressionLanguageAdaptorBindingContext.evaluate in interface ExpressionLanguageAdaptorexpression - the expression to be executedevent - the current event being processedExpressionRuntimeException - if a problem occurs evaluating the expressionpublic org.mule.runtime.api.metadata.TypedValue evaluate(String expression, org.mule.runtime.api.metadata.DataType expectedOutputType, Event event, org.mule.runtime.api.el.BindingContext context) throws ExpressionRuntimeException
ExpressionLanguageAdaptorBindingContext and outputs .evaluate in interface ExpressionLanguageAdaptorexpression - the expression to be executedexpectedOutputType - the expected output type so that automatic conversion can be performed for the resulting value
type.event - the current event being processedExpressionRuntimeException - if a problem occurs evaluating the expressionpublic org.mule.runtime.api.metadata.TypedValue evaluate(String expression, org.mule.runtime.api.metadata.DataType expectedOutputType, Event event, FlowConstruct flowConstruct, org.mule.runtime.api.el.BindingContext context, boolean failOnNull) throws ExpressionRuntimeException
ExpressionLanguageAdaptorevaluate in interface ExpressionLanguageAdaptorexpression - the expression to be executedexpectedOutputType - the expected output type so that automatic conversion can be performed for the resulting value
type.event - the current event being processedflowConstruct - the flow where the event is being processedcontext - the bindings to considerfailOnNull - indicates if should fail if the evaluation result is nullExpressionRuntimeException - if a problem occurs evaluating the expressionpublic org.mule.runtime.api.metadata.TypedValue evaluate(String expression, Event event, FlowConstruct flowConstruct, org.mule.runtime.api.el.BindingContext bindingContext) throws ExpressionRuntimeException
ExpressionLanguageAdaptorevaluate in interface ExpressionLanguageAdaptorexpression - the expression to be executedevent - the current event being processedflowConstruct - the flow where the event is being processedbindingContext - the bindings to considerExpressionRuntimeException - if a problem occurs evaluating the expressionpublic org.mule.runtime.api.el.ValidationResult validate(String expression)
ExpressionLanguageAdaptorvalidate in interface ExpressionLanguageAdaptorexpression - to be validatedValidationResult indicating whether the validation was successful or notpublic org.mule.runtime.api.metadata.TypedValue evaluate(String expression, Event event, Event.Builder eventBuilder, FlowConstruct flowConstruct, org.mule.runtime.api.el.BindingContext bindingContext) throws ExpressionRuntimeException
ExtendedExpressionLanguageAdaptorevaluate allows Event or InternalMessage mutation performed
within the expression to be maintained post-evaluation via the use of a result
Event.Builder which should be created from the original event before being passed and then
used to construct the post-evaluation event.evaluate in interface ExtendedExpressionLanguageAdaptorexpression - the expression to be executedevent - the current event being processedeventBuilder - event builder instance used to mutate the current message or event.flowConstruct - the flow where the event is being processedbindingContext - the bindings to considerExpressionRuntimeException - if a problem occurs evaluating the expressionpublic void enrich(String expression, Event event, Event.Builder eventBuilder, FlowConstruct flowConstruct, Object object)
ExtendedExpressionLanguageAdaptorenrich allows Event or InternalMessage mutation performed
within the expression to be maintained post-evaluation via the use of a result
Event.Builder which should be created from the original event before being passed and then
used to construct the post-evaluation event.enrich in interface ExtendedExpressionLanguageAdaptorexpression - a single expression i.e. header://foo that defines how the message should be enrichedevent - The event to be enrichedeventBuilder - event builder instance used to mutate the current message or event.flowConstruct - the flow where the event is being processedobject - The object used for enrichmentpublic void enrich(String expression, Event event, Event.Builder eventBuilder, FlowConstruct flowConstruct, org.mule.runtime.api.metadata.TypedValue value)
ExtendedExpressionLanguageAdaptorenrich allows Event or InternalMessage mutation performed
within the expression to be maintained post-evaluation via the use of a result
Event.Builder which should be created from the original event before being passed and then
used to construct the post-evaluation event.enrich in interface ExtendedExpressionLanguageAdaptorexpression - a single expression i.e. header://foo that defines how the message should be enrichedevent - The event to be enrichedeventBuilder - event builder instance used to mutate the current message or event.flowConstruct - the flow where the event is being processedvalue - The typed value used for enrichmentpublic Iterator<org.mule.runtime.api.metadata.TypedValue<?>> split(String expression, Event event, FlowConstruct flowConstruct, org.mule.runtime.api.el.BindingContext bindingContext) throws ExpressionRuntimeException
ExpressionLanguageAdaptorsplit in interface ExpressionLanguageAdaptorexpression - the expression to be executedevent - the current event being processedflowConstruct - the flow where the event is being processedbindingContext - the bindings to considerExpressionRuntimeException - if a problem occurs evaluating the expressionpublic Iterator<org.mule.runtime.api.metadata.TypedValue<?>> split(String expression, Event event, org.mule.runtime.api.el.BindingContext bindingContext) throws ExpressionRuntimeException
ExpressionLanguageAdaptorsplit in interface ExpressionLanguageAdaptorexpression - the expression to be executedevent - the current event being processedbindingContext - the bindings to considerExpressionRuntimeException - if a problem occurs evaluating the expressionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.