Package com.consol.citrus.validation.xml
Class XpathMessageProcessor
- java.lang.Object
-
- com.consol.citrus.message.AbstractMessageProcessor
-
- com.consol.citrus.validation.xml.XpathMessageProcessor
-
- All Implemented Interfaces:
MessageDirectionAware,MessageProcessor,MessageTransformer,MessageTypeSelector
public class XpathMessageProcessor extends AbstractMessageProcessor
Processor implementation evaluating XPath expressions on message payload during message construction. Class identifies XML elements inside the message payload via XPath expressions in order to overwrite their value.- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXpathMessageProcessor.BuilderFluent builder.
-
Field Summary
-
Fields inherited from interface com.consol.citrus.message.MessageProcessor
RESOURCE_PATH, TYPE_RESOLVER
-
-
Constructor Summary
Constructors Constructor Description XpathMessageProcessor()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getXPathExpressions()Gets the xPathExpressions.voidprocessMessage(Message message, TestContext context)Intercept the message payload construction and replace elements identified via XPath expressions.booleansupportsMessageType(String messageType)-
Methods inherited from class com.consol.citrus.message.AbstractMessageProcessor
getDirection, getName, process, setDirection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.consol.citrus.message.MessageProcessor
transform
-
-
-
-
Method Detail
-
processMessage
public void processMessage(Message message, TestContext context)
Intercept the message payload construction and replace elements identified via XPath expressions. Method parses the message payload to DOM document representation, therefore message payload needs to be XML here.- Overrides:
processMessagein classAbstractMessageProcessor
-
supportsMessageType
public boolean supportsMessageType(String messageType)
- Specified by:
supportsMessageTypein interfaceMessageTypeSelector- Overrides:
supportsMessageTypein classAbstractMessageProcessor
-
-