public final class ExpressionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
getProperty(String expression,
PropertyScope scope,
MuleMessage msg)
Gets a property or map/list of properties specified by an expression supporting
multiple return types as well as all and optional modifiers.
|
static <T> T |
getProperty(String expression,
PropertyScope scope,
MuleMessage msg,
Class<T> type)
Gets a property or map/list of properties specific by an expression supporting multiple return types as well as all and optional modifiers
|
protected static <T> T |
getPropertyInternal(String expression,
PropertyScope scope,
boolean parseScope,
MuleMessage msg,
Class<T> type)
Obtains a property or map/list of properties from a message using an expression that specifies which property or properties to evaluate.
|
static Object |
getPropertyWithScope(String expression,
MuleMessage msg)
Gets a property or map/list of properties specific by an expression supporting multiple return types as well as all and optional modifiers
Handles scope-aware expressions like "#[header:INBOUND:foo]
|
static <T> T |
getPropertyWithScope(String expression,
MuleMessage msg,
Class<T> type)
Gets a property or map/list of properties specific by an expression supporting multiple return types as well as all and optional modifiers
Handles scope-aware expressions like "#[header:INBOUND:foo]
|
protected static PropertyScope |
getScope(String expression) |
static TypedValue |
getTypedProperty(String expression,
MuleMessage msg) |
static TypedValue |
getTypedProperty(String expression,
MuleMessage msg,
PropertyScope scope) |
public static Object getPropertyWithScope(String expression, MuleMessage msg)
expression
- the header name to evaluate. this can be prefixed with a message scope such as INBOUND, OUTBOUND
or INVOCATION scope. If no scope is defined the default scope is OUTBOUNDmsg
- the message to evaluate onpublic static <T> T getPropertyWithScope(String expression, MuleMessage msg, Class<T> type)
expression
- the header name to evaluate. this can be prefixed with a message scope such as INBOUND, OUTBOUND
or INVOCATION scope. If no scope is defined the default scope is OUTBOUNDmsg
- the message to evaluate ontype
- the expected return type for this evaluationpublic static Object getProperty(String expression, PropertyScope scope, MuleMessage msg)
public static <T> T getProperty(String expression, PropertyScope scope, MuleMessage msg, Class<T> type)
msg
- the message to evaluate ontype
- the expected return type for this evaluationprotected static <T> T getPropertyInternal(String expression, PropertyScope scope, boolean parseScope, MuleMessage msg, Class<T> type)
expression
- the expression used to evaluator the messagescope
- the scope to be used when obtaining a property. This is the default if parseScopes is true.parseScope
- should scope we parsed from expression string. When true the scope acts as a default.msg
- the message to be evaluatedtype
- return type expectedpublic static TypedValue getTypedProperty(String expression, MuleMessage msg)
public static TypedValue getTypedProperty(String expression, MuleMessage msg, PropertyScope scope)
protected static PropertyScope getScope(String expression)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.