public class DataWeaveExpressionLanguageAdaptor extends Object implements ExtendedExpressionLanguageAdaptor
| Modifier and Type | Field and Description |
|---|---|
static String |
APP |
static String |
ATTRIBUTES |
static String |
CORRELATION_ID |
static String |
DATA_TYPE |
static String |
ERROR |
static String |
FLOW |
static String |
ID |
static String |
MULE |
static String |
PARAMETERS |
static String |
PAYLOAD |
static String |
PROPERTIES |
static String |
SERVER |
static String |
VARIABLES |
| Constructor and Description |
|---|
DataWeaveExpressionLanguageAdaptor(MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalBindings(org.mule.runtime.api.el.BindingContext bindingContext)
Registers the given
BindingContext as global. |
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 context)
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)
|
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 static final String PAYLOAD
public static final String DATA_TYPE
public static final String ATTRIBUTES
public static final String ERROR
public static final String ID
public static final String CORRELATION_ID
public static final String VARIABLES
public static final String PROPERTIES
public static final String PARAMETERS
public static final String FLOW
public static final String SERVER
public static final String MULE
public static final String APP
@Inject public DataWeaveExpressionLanguageAdaptor(MuleContext muleContext)
public void addGlobalBindings(org.mule.runtime.api.el.BindingContext bindingContext)
BindingContext as global.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)
ExpressionLanguageAdaptorBindingContext.evaluate in interface ExpressionLanguageAdaptorexpression - the expression to be executedevent - the current event being processedpublic 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)
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 considerpublic org.mule.runtime.api.metadata.TypedValue evaluate(String expression, Event event, Event.Builder eventBuilder, FlowConstruct flowConstruct, org.mule.runtime.api.el.BindingContext context)
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 processedcontext - the bindings to considerpublic org.mule.runtime.api.el.ValidationResult validate(String expression)
ExpressionLanguageAdaptorvalidate in interface ExpressionLanguageAdaptorexpression - to be validatedValidationResult indicating whether the validation was successful or notpublic 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 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 enrichmentCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.