Class XpathMappingDataDictionary
java.lang.Object
org.citrusframework.message.AbstractMessageProcessor
org.citrusframework.variable.dictionary.AbstractDataDictionary<Node>
org.citrusframework.variable.dictionary.xml.AbstractXmlDataDictionary
org.citrusframework.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 org.citrusframework.variable.dictionary.DataDictionary
DataDictionary.PathMappingStrategyNested classes/interfaces inherited from interface org.citrusframework.message.MessageProcessor
MessageProcessor.Builder<T extends MessageProcessor,B extends MessageProcessor.Builder<T, B>> -
Field Summary
Fields inherited from class org.citrusframework.variable.dictionary.AbstractDataDictionary
mappingFile, mappingsFields inherited from interface org.citrusframework.message.MessageProcessor
RESOURCE_PATH, TYPE_RESOLVER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidsetNamespaceContextBuilder(org.citrusframework.xml.namespace.NamespaceContextBuilder namespaceContextBuilder) Sets the namespace context builder.<T> Ttranslate(Node node, T value, TestContext context) Methods inherited from class org.citrusframework.variable.dictionary.xml.AbstractXmlDataDictionary
processMessage, supportsMessageTypeMethods inherited from class org.citrusframework.variable.dictionary.AbstractDataDictionary
convertIfNecessary, getMappingFile, getMappings, getName, getPathMappingStrategy, isGlobalScope, setGlobalScope, setMappingFile, setMappings, setName, setPathMappingStrategyMethods inherited from class org.citrusframework.message.AbstractMessageProcessor
getDirection, process, setDirectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.message.MessageDirectionAware
getDirectionMethods inherited from interface org.citrusframework.message.MessageProcessor
process, transform
-
Constructor Details
-
XpathMappingDataDictionary
public XpathMappingDataDictionary()
-
-
Method Details
-
translate
- Specified by:
translatein interfaceDataDictionary<Node>
-
initialize
public void initialize()- Specified by:
initializein interfaceInitializingPhase- Overrides:
initializein classAbstractDataDictionary<Node>
-
setNamespaceContextBuilder
public void setNamespaceContextBuilder(org.citrusframework.xml.namespace.NamespaceContextBuilder namespaceContextBuilder) Sets the namespace context builder.- Parameters:
namespaceContextBuilder-
-