Class XpathMappingDataDictionary
- java.lang.Object
-
- com.consol.citrus.message.AbstractMessageProcessor
-
- com.consol.citrus.variable.dictionary.AbstractDataDictionary<Node>
-
- com.consol.citrus.variable.dictionary.xml.AbstractXmlDataDictionary
-
- com.consol.citrus.variable.dictionary.xml.XpathMappingDataDictionary
-
- All Implemented Interfaces:
InitializingPhase,MessageDirectionAware,MessageProcessor,MessageTransformer,MessageTypeSelector,Scoped,DataDictionary<Node>
public class XpathMappingDataDictionary extends AbstractXmlDataDictionary implements InitializingPhase
Xml data dictionary implementation maps elements via XPath expressions. When element is identified by some expression in dictionary value is overwritten accordingly. Namespace context is either evaluated on the fly or by global namespace context builder.- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.consol.citrus.variable.dictionary.DataDictionary
DataDictionary.PathMappingStrategy
-
Nested classes/interfaces inherited from interface com.consol.citrus.message.MessageProcessor
MessageProcessor.Builder<T extends MessageProcessor,B extends MessageProcessor.Builder<T,B>>
-
-
Field Summary
-
Fields inherited from class com.consol.citrus.variable.dictionary.AbstractDataDictionary
mappingFile, mappings
-
Fields inherited from interface com.consol.citrus.message.MessageProcessor
RESOURCE_PATH, TYPE_RESOLVER
-
-
Constructor Summary
Constructors Constructor Description XpathMappingDataDictionary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize()voidsetNamespaceContextBuilder(com.consol.citrus.xml.namespace.NamespaceContextBuilder namespaceContextBuilder)Sets the namespace context builder.<T> Ttranslate(Node node, T value, TestContext context)-
Methods inherited from class com.consol.citrus.variable.dictionary.xml.AbstractXmlDataDictionary
processMessage, supportsMessageType
-
Methods inherited from class com.consol.citrus.variable.dictionary.AbstractDataDictionary
convertIfNecessary, getMappingFile, getMappings, getName, getPathMappingStrategy, isGlobalScope, setGlobalScope, setMappingFile, setMappings, setName, setPathMappingStrategy
-
Methods inherited from class com.consol.citrus.message.AbstractMessageProcessor
getDirection, 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.MessageDirectionAware
getDirection
-
Methods inherited from interface com.consol.citrus.message.MessageProcessor
process, transform
-
-
-
-
Method Detail
-
translate
public <T> T translate(Node node, T value, TestContext context)
- Specified by:
translatein interfaceDataDictionary<Node>
-
initialize
public void initialize()
- Specified by:
initializein interfaceInitializingPhase- Overrides:
initializein classAbstractDataDictionary<Node>
-
setNamespaceContextBuilder
public void setNamespaceContextBuilder(com.consol.citrus.xml.namespace.NamespaceContextBuilder namespaceContextBuilder)
Sets the namespace context builder.- Parameters:
namespaceContextBuilder-
-
-