Class StringValueTestXPathMessageSelector
java.lang.Object
org.springframework.integration.xml.selector.AbstractXPathMessageSelector
org.springframework.integration.xml.selector.StringValueTestXPathMessageSelector
- All Implemented Interfaces:
GenericSelector<Message<?>>
,MessageSelector
- Author:
- Jonas Partner, Gary Russell
-
Constructor Summary
ConstructorDescriptionStringValueTestXPathMessageSelector
(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
(String expression, Map<String, String> namespaces, String valueToTestFor) Create a selector which tests for the given value and supports multiple namespaces.StringValueTestXPathMessageSelector
(XPathExpression expression, String valueToTestFor) Creates a selector with the providedXPathExpression
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Evaluate the payload and return true if the value returned by theXPathExpression
is equal to thevalueToTestFor
.void
setCaseSensitive
(boolean caseSensitive) Specify whether comparison of value returned byXPathExpression
to test value should be case sensitive.Methods inherited from class org.springframework.integration.xml.selector.AbstractXPathMessageSelector
getConverter, getXPathExpresion, setConverter
-
Constructor Details
-
StringValueTestXPathMessageSelector
public StringValueTestXPathMessageSelector(String expression, Map<String, String> namespaces, String valueToTestFor) Create a selector which tests for the given value and supports multiple namespaces.- Parameters:
expression
- XPath expression as a Stringnamespaces
- Map of namespaces where the keys are namespace prefixesvalueToTestFor
- value to test for
-
StringValueTestXPathMessageSelector
public StringValueTestXPathMessageSelector(String expression, String prefix, String namespace, String valueToTestFor) Creates a single namespace Xpath selector.- Parameters:
expression
- XPath expression as a Stringprefix
- namespace prefixnamespace
- namespace URIvalueToTestFor
- value to test for
-
StringValueTestXPathMessageSelector
Creates a non-namespaced testing selector.- Parameters:
expression
- XPath expression as a StringvalueToTestFor
- value to test for
-
StringValueTestXPathMessageSelector
Creates a selector with the providedXPathExpression
.- Parameters:
expression
- XPath expressionvalueToTestFor
- value to test for
-
-
Method Details
-
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive) Specify whether comparison of value returned byXPathExpression
to test value should be case sensitive. Default is 'true'.- Parameters:
caseSensitive
- true if the test should be case sensitive.
-
accept
Evaluate the payload and return true if the value returned by theXPathExpression
is equal to thevalueToTestFor
.
-