Class AbstractDataDictionary<T>
- java.lang.Object
-
- com.consol.citrus.message.AbstractMessageProcessor
-
- com.consol.citrus.variable.dictionary.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
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.core.io.Resource
mappingFile
mapping file resourceprotected Map<String,String>
mappings
Known mappings to this dictionary
-
Constructor Summary
Constructors Constructor Description AbstractDataDictionary()
-
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
-
-
-
-
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 interfacecom.consol.citrus.common.InitializingPhase
-
getName
public String getName()
- Specified by:
getName
in interfacecom.consol.citrus.variable.dictionary.DataDictionary<T>
- Overrides:
getName
in classcom.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 interfacecom.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
-
-
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 interfacecom.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
-
-
-