context.declareFunction("messageInboundProperty", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
{
@Override
public ElementMatcher build(String elementName, MuleMessage muleMessage)
{
return new ElementMatcher(muleMessage.getInboundProperty(elementName));
}
}));
context.declareFunction("messageOutboundProperty", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
{
@Override
public ElementMatcher build(String elementName, MuleMessage muleMessage)
{
return new ElementMatcher(muleMessage.getOutboundProperty(elementName));
}
}));
context.declareFunction("messageInvocationProperty", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
{
@Override
public ElementMatcher build(String elementName, MuleMessage muleMessage)
{
return new ElementMatcher(muleMessage.getInvocationProperty(elementName));
}
}));
context.declareFunction("messageInboundAttachment", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
{
@Override
public ElementMatcher build(String elementName, MuleMessage muleMessage)
{
return new ElementMatcher(muleMessage.getInboundAttachment(elementName));
}
}));
context.declareFunction("messageOutboundAttachment", new MessageMatchingAssertionMelFunction(new ElementMatcherFactory()
{
@Override
public ElementMatcher build(String elementName, MuleMessage muleMessage)
{
return new ElementMatcher(muleMessage.getOutboundAttachment(elementName));
}
}));
context.declareFunction("valueOf", new ElementMatchingAssertionMelFunction());