Spring Integration

org.springframework.integration.xml.selector
Class StringValueTestXPathMessageSelector

java.lang.Object
  extended by org.springframework.integration.xml.selector.AbstractXPathMessageSelector
      extended by org.springframework.integration.xml.selector.StringValueTestXPathMessageSelector
All Implemented Interfaces:
MessageSelector

public class StringValueTestXPathMessageSelector
extends AbstractXPathMessageSelector

XPath MessageSelector that tests if a provided value supports payloads of type Document or String.

Author:
Jonas Partner

Constructor Summary
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 non-namespaced testing selector.
StringValueTestXPathMessageSelector(String expression, String prefix, String namespace, String valueToTestFor)
          Creates a single namespace Xpath selector.
StringValueTestXPathMessageSelector(org.springframework.xml.xpath.XPathExpression expression, String valueToTestFor)
          Creates a selector with the provided XPathExpression.
 
Method Summary
 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.
 
Methods inherited from class org.springframework.integration.xml.selector.AbstractXPathMessageSelector
getConverter, getXPathExpresion, setConverter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 -
namespaces -
valueToTestFor -

StringValueTestXPathMessageSelector

public StringValueTestXPathMessageSelector(String expression,
                                           String prefix,
                                           String namespace,
                                           String valueToTestFor)
Creates a single namespace Xpath selector.

Parameters:
expression -
prefix -
namespace -
valueToTestFor -

StringValueTestXPathMessageSelector

public StringValueTestXPathMessageSelector(String expression,
                                           String valueToTestFor)
Creates non-namespaced testing selector.

Parameters:
expression -
valueToTestFor -

StringValueTestXPathMessageSelector

public StringValueTestXPathMessageSelector(org.springframework.xml.xpath.XPathExpression expression,
                                           String valueToTestFor)
Creates a selector with the provided XPathExpression.

Parameters:
expression -
valueToTestFor -
Method Detail

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Specify whether comparison of value returned by XPathExpression to test value should be case sensitive. Default is 'true'.

Parameters:
caseSensitive -

accept

public boolean accept(Message<?> message)
Evaluate the payload and return true if the value returned by the XPathExpression is equal to the valueToTestFor.


Spring Integration

Copyright © 2010. All Rights Reserved.