org.apache.servicemix.expression
Class ExpressionHelper

java.lang.Object
  extended by org.apache.servicemix.expression.ExpressionHelper

public final class ExpressionHelper
extends java.lang.Object

A helper class for working with expressions.

Version:
$Revision: 564374 $

Method Summary
static java.lang.String asString(Expression expression, javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage message, java.lang.String defaultValue)
          Evaluates the given expression as a string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

asString

public static java.lang.String asString(Expression expression,
                                        javax.jbi.messaging.MessageExchange exchange,
                                        javax.jbi.messaging.NormalizedMessage message,
                                        java.lang.String defaultValue)
                                 throws javax.jbi.messaging.MessagingException
Evaluates the given expression as a string value.

Parameters:
expression - the expression to evaluate
exchange - the current exchange
message - the current message
defaultValue - the default value to use if the expression is null or the value of the expression is null
Returns:
the value of the expression as a string if it is not null or the defaultValue
Throws:
javax.jbi.messaging.MessagingException - if the expression failed to be evaluated


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.