Class AbstractDataDictionary<T>

  • 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<T>

    public abstract class AbstractDataDictionary<T>
    extends com.consol.citrus.message.AbstractMessageProcessor
    implements com.consol.citrus.variable.dictionary.DataDictionary<T>
    Abstract data dictionary implementation provides global scope handling.
    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 
      Modifier and Type Field Description
      protected org.springframework.core.io.Resource mappingFile
      mapping file resource
      protected Map<String,​String> mappings
      Known mappings to this dictionary
      • Fields inherited from interface com.consol.citrus.message.MessageProcessor

        LOG, RESOURCE_PATH, TYPE_RESOLVER
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected <V> V convertIfNecessary​(String value, V originalValue, com.consol.citrus.context.TestContext context)
      Convert to original value type if necessary.
      org.springframework.core.io.Resource getMappingFile()
      Gets the mapping file resource.
      Map<String,​String> getMappings()
      Gets the mappings.
      String getName()  
      com.consol.citrus.variable.dictionary.DataDictionary.PathMappingStrategy getPathMappingStrategy()  
      void initialize()  
      boolean isGlobalScope()  
      void setGlobalScope​(boolean scope)
      Sets the global scope property.
      void setMappingFile​(org.springframework.core.io.Resource mappingFile)
      Sets the mapping file resource.
      void setMappings​(Map<String,​String> mappings)
      Sets the mappings.
      void setName​(String name)
      Sets the data dictionary name.
      void setPathMappingStrategy​(com.consol.citrus.variable.dictionary.DataDictionary.PathMappingStrategy pathMappingStrategy)
      Sets the path mapping strategy.
      • Methods inherited from class com.consol.citrus.message.AbstractMessageProcessor

        getDirection, process, processMessage, setDirection, supportsMessageType
      • Methods inherited from interface com.consol.citrus.variable.dictionary.DataDictionary

        translate
      • Methods inherited from interface com.consol.citrus.message.MessageDirectionAware

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

        process, transform
    • Field Detail

      • mappings

        protected Map<String,​String> mappings
        Known mappings to this dictionary
      • mappingFile

        protected org.springframework.core.io.Resource mappingFile
        mapping file resource
    • Constructor Detail

      • AbstractDataDictionary

        public AbstractDataDictionary()
    • Method Detail

      • convertIfNecessary

        protected <V> V convertIfNecessary​(String value,
                                           V originalValue,
                                           com.consol.citrus.context.TestContext context)
        Convert to original value type if necessary.
        Type Parameters:
        V -
        Parameters:
        value -
        originalValue -
        context -
        Returns:
      • initialize

        public void initialize()
        Specified by:
        initialize in interface com.consol.citrus.common.InitializingPhase
      • getName

        public String getName()
        Specified by:
        getName in interface com.consol.citrus.variable.dictionary.DataDictionary<T>
        Overrides:
        getName in class com.consol.citrus.message.AbstractMessageProcessor
      • setName

        public void setName​(String name)
        Sets the data dictionary name.
        Parameters:
        name -
      • isGlobalScope

        public boolean isGlobalScope()
        Specified by:
        isGlobalScope in interface com.consol.citrus.Scoped
      • setGlobalScope

        public void setGlobalScope​(boolean scope)
        Sets the global scope property.
        Parameters:
        scope -
      • setMappings

        public void setMappings​(Map<String,​String> mappings)
        Sets the mappings.
        Parameters:
        mappings -
      • getMappings

        public Map<String,​String> getMappings()
        Gets the mappings.
        Returns:
      • getMappingFile

        public org.springframework.core.io.Resource getMappingFile()
        Gets the mapping file resource.
        Returns:
      • setMappingFile

        public void setMappingFile​(org.springframework.core.io.Resource mappingFile)
        Sets the mapping file resource.
        Parameters:
        mappingFile -
      • getPathMappingStrategy

        public com.consol.citrus.variable.dictionary.DataDictionary.PathMappingStrategy getPathMappingStrategy()
        Specified by:
        getPathMappingStrategy in interface com.consol.citrus.variable.dictionary.DataDictionary<T>
      • setPathMappingStrategy

        public void setPathMappingStrategy​(com.consol.citrus.variable.dictionary.DataDictionary.PathMappingStrategy pathMappingStrategy)
        Sets the path mapping strategy.
        Parameters:
        pathMappingStrategy -