|
||||||||||
| 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 | |
|---|---|
Object |
evaluate(String expression,
MuleMessage message)
Extracts a single property from the message |
protected Object |
extractResultFromNode(org.codehaus.jackson.JsonNode result)
|
String |
getName()
Gets the name of the object |
void |
setName(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 Object evaluate(String expression,
MuleMessage message)
ExpressionEvaluator
evaluate in interface ExpressionEvaluatorexpression - the property expression or expressionmessage - the message to extract from
protected Object extractResultFromNode(org.codehaus.jackson.JsonNode result)
public void setName(String name)
NamedObject
setName in interface NamedObjectname - the name of the objectpublic String getName()
NamedObject
getName in interface NamedObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||