Package com.boomi.connector.testutil
Class MutableDynamicPropertyMap
- java.lang.Object
-
- com.boomi.connector.testutil.MutableDynamicPropertyMap
-
- All Implemented Interfaces:
DynamicPropertyMap
public class MutableDynamicPropertyMap extends Object implements DynamicPropertyMap
-
-
Constructor Summary
Constructors Constructor Description MutableDynamicPropertyMap()
MutableDynamicPropertyMap(Map<String,Object> values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(String key, Object value)
Map<String,String>
getCustomProperties(String key)
Gets the key value pair(s) of a custom property as a map with the given key and any overrides applied.String
getProperty(String key)
Gets the String value (String.valueOf) of the Operation Property with the given key and any overrides applied.String
getProperty(String key, String defaultValue)
Gets the String value (String.valueOf) of the Operation Property with the given key and any overrides applied, returning the defaultValue if the located property value is blank (null
or all characters are whitespace).
-
-
-
Method Detail
-
getProperty
public String getProperty(String key)
Description copied from interface:DynamicPropertyMap
Gets the String value (String.valueOf) of the Operation Property with the given key and any overrides applied. Any Operation Property of type String, Integer or Boolean, that can be overridden should be obtained from this Map, all others should be obtained fromBrowseContext.getOperationProperties()
- Specified by:
getProperty
in interfaceDynamicPropertyMap
- Parameters:
key
- key of the desired property- Returns:
- String value of the Operation Property or
null
if not found
-
getProperty
public String getProperty(String key, String defaultValue)
Description copied from interface:DynamicPropertyMap
Gets the String value (String.valueOf) of the Operation Property with the given key and any overrides applied, returning the defaultValue if the located property value is blank (null
or all characters are whitespace). Any Operation Property of type String, Integer or Boolean, that can be overridden should be obtained from this Map, all others should be obtained fromBrowseContext.getOperationProperties()
- Specified by:
getProperty
in interfaceDynamicPropertyMap
- Parameters:
key
- key of the desired propertydefaultValue
- value to return if property value is blank- Returns:
- String property value or defaultValue if not found.
-
getCustomProperties
public Map<String,String> getCustomProperties(String key)
Description copied from interface:DynamicPropertyMap
Gets the key value pair(s) of a custom property as a map with the given key and any overrides applied. Any overridable operation property of type "customproperties" should be obtained from this method. This method returnsCollections.emptyMap()
if the property for given key is not found. For Operation Properties of type String, Integer or Boolean, please useDynamicPropertyMap.getProperty(String)
orDynamicPropertyMap.getProperty(String, String)
- Specified by:
getCustomProperties
in interfaceDynamicPropertyMap
- Parameters:
key
- key of the desired custom property- Returns:
- Immutable map of key-value pairs of the Operation custom property or
Collections.emptyMap()
if not found
-
-