Class XpathMappingDataDictionary

  • All Implemented Interfaces:
    com.consol.citrus.common.InitializingPhase, com.consol.citrus.message.MessageDirectionAware, com.consol.citrus.message.MessageProcessor, com.consol.citrus.message.MessageTransformer, com.consol.citrus.message.MessageTypeSelector, com.consol.citrus.Scoped, com.consol.citrus.variable.dictionary.DataDictionary<Node>

    public class XpathMappingDataDictionary
    extends AbstractXmlDataDictionary
    implements com.consol.citrus.common.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

        com.consol.citrus.variable.dictionary.DataDictionary.PathMappingStrategy
      • Nested classes/interfaces inherited from interface com.consol.citrus.message.MessageProcessor

        com.consol.citrus.message.MessageProcessor.Builder<T extends com.consol.citrus.message.MessageProcessor,​B extends com.consol.citrus.message.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize()  
      void setNamespaceContextBuilder​(com.consol.citrus.xml.namespace.NamespaceContextBuilder namespaceContextBuilder)
      Sets the namespace context builder.
      <T> T translate​(Node node, T value, com.consol.citrus.context.TestContext context)  
      • 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 interface com.consol.citrus.message.MessageDirectionAware

        getDirection
      • Methods inherited from interface com.consol.citrus.message.MessageProcessor

        process, transform
    • Constructor Detail

      • XpathMappingDataDictionary

        public XpathMappingDataDictionary()
    • Method Detail

      • translate

        public <T> T translate​(Node node,
                               T value,
                               com.consol.citrus.context.TestContext context)
        Specified by:
        translate in interface com.consol.citrus.variable.dictionary.DataDictionary<Node>
      • initialize

        public void initialize()
        Specified by:
        initialize in interface com.consol.citrus.common.InitializingPhase
        Overrides:
        initialize in class com.consol.citrus.variable.dictionary.AbstractDataDictionary<Node>
      • setNamespaceContextBuilder

        public void setNamespaceContextBuilder​(com.consol.citrus.xml.namespace.NamespaceContextBuilder namespaceContextBuilder)
        Sets the namespace context builder.
        Parameters:
        namespaceContextBuilder -