|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.module.json.JsonExpressionEvaluator
public class JsonExpressionEvaluator
An expression evaluator to allow users to define json expressions in their mule configuration, i.e.
#[json:person/addresses[0]/postcode]
JsonData
object for mor information about the query syntax.
It is also possible to use this evaluator in ExpressionFilter
objects. For example
a filter could be defined as -
#[json:person/registered]
Where 'registered' is a boolean value. It is also possible to filter on the existence of a value i.e.
#[json:person/favouriteColour]
Which would return true if 'favouriteColour' has been set. This evaluator also dds two logic operators you can use
to create more sophisticated boolean expressions; equals and not equals -
#[json:person/favouriteColour = red]
or
#[json:person/favouriteColour != brown]
JsonData
Field Summary | |
---|---|
protected Log |
logger
logger used by this class |
Constructor Summary | |
---|---|
JsonExpressionEvaluator()
|
Method Summary | |
---|---|
java.lang.Object |
evaluate(java.lang.String expression,
MuleMessage message)
Extracts a single property from the message |
java.lang.String |
getName()
Gets the name of the object |
void |
setName(java.lang.String name)
Sets the name of the object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final transient Log logger
Constructor Detail |
---|
public JsonExpressionEvaluator()
Method Detail |
---|
public java.lang.Object evaluate(java.lang.String expression, MuleMessage message)
ExpressionEvaluator
evaluate
in interface ExpressionEvaluator
expression
- the property expression or expressionmessage
- the message to extract from
public void setName(java.lang.String name)
NamedObject
setName
in interface NamedObject
name
- the name of the objectpublic java.lang.String getName()
NamedObject
getName
in interface NamedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |