Package com.consol.citrus.message
Class MessageSelectorBuilder
- java.lang.Object
-
- com.consol.citrus.message.MessageSelectorBuilder
-
public class MessageSelectorBuilder extends Object
Constructs message selectors either from string value or from key value maps. Currently only AND logical combination of multiple expressions is supported.- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description MessageSelectorBuilder(String selectorString)
Constructor using fields.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
build()
Builds the message selector.static String
build(String messageSelector, Map<String,Object> messageSelectorMap, com.consol.citrus.context.TestContext context)
Build message selector from string expression or from key value map.static MessageSelectorBuilder
fromKeyValueMap(Map<String,Object> valueMap)
Static builder method using a key value map.Map<String,String>
toKeyValueMap()
Constructs a key value map from selector string representation.static MessageSelectorBuilder
withString(String selectorString)
Static builder method using a selector string.
-
-
-
Constructor Detail
-
MessageSelectorBuilder
public MessageSelectorBuilder(String selectorString)
Constructor using fields.- Parameters:
selectorString
-
-
-
Method Detail
-
build
public static String build(String messageSelector, Map<String,Object> messageSelectorMap, com.consol.citrus.context.TestContext context)
Build message selector from string expression or from key value map. Automatically replaces test variables.- Parameters:
messageSelector
-messageSelectorMap
-context
-- Returns:
-
withString
public static MessageSelectorBuilder withString(String selectorString)
Static builder method using a selector string.- Parameters:
selectorString
-- Returns:
-
fromKeyValueMap
public static MessageSelectorBuilder fromKeyValueMap(Map<String,Object> valueMap)
Static builder method using a key value map.- Parameters:
valueMap
-- Returns:
-
toKeyValueMap
public Map<String,String> toKeyValueMap()
Constructs a key value map from selector string representation.- Returns:
-
build
public String build()
Builds the message selector.- Returns:
-
-