Class BooleanTestXPathMessageSelector
java.lang.Object
org.springframework.integration.xml.selector.AbstractXPathMessageSelector
org.springframework.integration.xml.selector.BooleanTestXPathMessageSelector
- All Implemented Interfaces:
GenericSelector<Message<?>>
,MessageSelector
public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelector
Boolean XPath testing
MessageSelector
.
Requires an XPathExpression
which can be evaluated using XPathExpression.evaluateAsBoolean(Node)
.
Supports payloads of type Document
or String
.- Author:
- Jonas Partner, Gary Russell
-
Constructor Summary
Constructors Constructor Description BooleanTestXPathMessageSelector(String expression)
Create a boolean testing XPathMessageSelector
with no namespace support.BooleanTestXPathMessageSelector(String expression, String prefix, String namespace)
Create a boolean testing XPathMessageSelector
supporting a single namespace.BooleanTestXPathMessageSelector(String expression, Map<String,String> namespaces)
Create a boolean testing XPathMessageSelector
supporting multiple namespaces.BooleanTestXPathMessageSelector(XPathExpression expression)
Create a boolean testing XPathMessageSelector
using the providedXPathExpression
. -
Method Summary
Modifier and Type Method Description boolean
accept(Message<?> message)
Return true if theXPathExpression
evaluates totrue
Methods inherited from class org.springframework.integration.xml.selector.AbstractXPathMessageSelector
getConverter, getXPathExpresion, setConverter
-
Constructor Details
-
BooleanTestXPathMessageSelector
Create a boolean testing XPathMessageSelector
supporting multiple namespaces.- Parameters:
expression
- XPath expression as a Stringnamespaces
- Map of namespaces where the keys are namespace prefixes
-
BooleanTestXPathMessageSelector
Create a boolean testing XPathMessageSelector
supporting a single namespace.- Parameters:
expression
- XPath expression as a Stringprefix
- namespace prefixnamespace
- namespace URI
-
BooleanTestXPathMessageSelector
Create a boolean testing XPathMessageSelector
with no namespace support.- Parameters:
expression
- XPath expression as a String
-
BooleanTestXPathMessageSelector
Create a boolean testing XPathMessageSelector
using the providedXPathExpression
.- Parameters:
expression
- XPath expression
-
-
Method Details
-
accept
Return true if theXPathExpression
evaluates totrue
-