public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSelector
Constructor and Description |
---|
StringValueTestXPathMessageSelector(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces,
java.lang.String valueToTestFor)
Create a selector which tests for the given value and supports multiple namespaces.
|
StringValueTestXPathMessageSelector(java.lang.String expression,
java.lang.String valueToTestFor)
Creates a non-namespaced testing selector.
|
StringValueTestXPathMessageSelector(java.lang.String expression,
java.lang.String prefix,
java.lang.String namespace,
java.lang.String valueToTestFor)
Creates a single namespace Xpath selector.
|
StringValueTestXPathMessageSelector(org.springframework.xml.xpath.XPathExpression expression,
java.lang.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(java.lang.String expression, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String valueToTestFor)
expression
- XPath expression as a Stringnamespaces
- Map of namespaces where the keys are namespace prefixesvalueToTestFor
- value to test forpublic StringValueTestXPathMessageSelector(java.lang.String expression, java.lang.String prefix, java.lang.String namespace, java.lang.String valueToTestFor)
expression
- XPath expression as a Stringprefix
- namespace prefixnamespace
- namespace URIvalueToTestFor
- value to test forpublic StringValueTestXPathMessageSelector(java.lang.String expression, java.lang.String valueToTestFor)
expression
- XPath expression as a StringvalueToTestFor
- value to test forpublic StringValueTestXPathMessageSelector(org.springframework.xml.xpath.XPathExpression expression, java.lang.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
- public boolean accept(Message<?> message)
XPathExpression
is equal to the valueToTestFor
.