Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.expression
Class ExpressionUtils

    java.lang.Object
      org.mule.expression.ExpressionUtils

    public final class ExpressionUtils

extends Object

Used by the different header expression evaluators to read message properties, honuouring scope and return type

Method Summary
`static Object` | `getProperty(String expression, PropertyScope scope, 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
`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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getPropertyWithScope

    public 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]

  Parameters:
    `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 OUTBOUND
    `msg` - the message to evaluate on

### getPropertyWithScope

    public 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]

  Parameters:
    `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 OUTBOUND
    `msg` - the message to evaluate on
    `type` - the expected return type for this evaluation
  Returns:
    an object of type 'type' corresponding to the message header requested or null if the header was not on the message in the specified scope

### getProperty

    public static Object getProperty(String expression,
                                     PropertyScope scope,
                                     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

  Parameters:
    `msg` - the message to evaluate on
    `type` - the expected return type for this evaluation
  Returns:
    an object of type 'type' corresponding to the message header requested or null if the header was not on the message in the specified scope

### getProperty

    public 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

  Parameters:
    `msg` - the message to evaluate on
    `type` - the expected return type for this evaluation
  Returns:
    an object of type 'type' corresponding to the message header requested or null if the header was not on the message in the specified scope

### getPropertyInternal

    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. This method can be used default scope

  Parameters:
    `expression` - the expression used to evaluator the message
    `scope` - 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 evaluated
    `type` - return type expected
  Returns:
    property or list/map of evaluated property values

### getScope

    protected static PropertyScope getScope(String expression)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.