public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSelector
Constructor and Description |
---|
StringValueTestXPathMessageSelector(String expression,
Map<String,String> namespaces,
String valueToTestFor)
Create a selector which tests for the given value and supports multiple namespaces.
|
StringValueTestXPathMessageSelector(String expression,
String valueToTestFor)
Creates a non-namespaced testing selector.
|
StringValueTestXPathMessageSelector(String expression,
String prefix,
String namespace,
String valueToTestFor)
Creates a single namespace Xpath selector.
|
StringValueTestXPathMessageSelector(XPathExpression expression,
String valueToTestFor)
Creates a selector with the provided
XPathExpression . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Message<?> message)
Evaluate the payload and return true if the value returned by the
XPathExpression is equal to the valueToTestFor . |
void |
setCaseSensitive(boolean caseSensitive)
Specify whether comparison of value returned by
XPathExpression
to test value should be case sensitive. |
getConverter, getXPathExpresion, setConverter
public StringValueTestXPathMessageSelector(String expression, Map<String,String> namespaces, String valueToTestFor)
expression
- XPath expression as a Stringnamespaces
- Map of namespaces where the keys are namespace prefixesvalueToTestFor
- value to test forpublic StringValueTestXPathMessageSelector(String expression, String prefix, String namespace, String valueToTestFor)
expression
- XPath expression as a Stringprefix
- namespace prefixnamespace
- namespace URIvalueToTestFor
- value to test forpublic StringValueTestXPathMessageSelector(String expression, String valueToTestFor)
expression
- XPath expression as a StringvalueToTestFor
- value to test forpublic StringValueTestXPathMessageSelector(XPathExpression expression, String valueToTestFor)
XPathExpression
.expression
- XPath expressionvalueToTestFor
- value to test forpublic void setCaseSensitive(boolean caseSensitive)
XPathExpression
to test value should be case sensitive. Default is 'true'.caseSensitive
- true if the test should be case sensitive.public boolean accept(Message<?> message)
XPathExpression
is equal to the valueToTestFor
.