Package com.boomi.connector.testutil
Class MutablePropertyMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- com.boomi.connector.testutil.MutablePropertyMap
-
- All Implemented Interfaces:
PropertyMap,Serializable,Cloneable,Map<String,Object>
public class MutablePropertyMap extends HashMap<String,Object> implements PropertyMap
SimplePropertyMapimplementation for use in testing withConnectorTest.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description MutablePropertyMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleangetBooleanProperty(String key)Gets the Boolean property for the given key.BooleangetBooleanProperty(String key, Boolean defaultValue)Gets the Boolean property for the given key, returning the defaultValue if the located property valuenull.Map<String,String>getCustomProperties(String key)Gets the key/value pairs as a map for custom property type fields.LonggetLongProperty(String key)Gets the Long property for the given key.LonggetLongProperty(String key, Long defaultValue)Gets the Long property for the given key, returning the defaultValue if the located property valuenull.OAuth2ContextgetOAuth2Context(String key)Gets the OAuth2Context property for the given key.PrivateKeyStoregetPrivateKeyStoreProperty(String key)Gets the KeyStore property for the given key.StringgetProperty(String key)Gets the String property for the given key.StringgetProperty(String key, String defaultValue)Gets the String property for the given key, returning the defaultValue if the located property value is blank (nullor all characters are whitespace).PublicKeyStoregetPublicKeyStoreProperty(String key)Gets the KeyStore property for the given key.-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
getProperty
public String getProperty(String key)
Description copied from interface:PropertyMapGets the String property for the given key. This method may be used to retrieve properties of type "string" or "password".- Specified by:
getPropertyin interfacePropertyMap- Parameters:
key- key of the desired property- Returns:
- String property value or
nullif not found.
-
getProperty
public String getProperty(String key, String defaultValue)
Description copied from interface:PropertyMapGets the String property for the given key, returning the defaultValue if the located property value is blank (nullor all characters are whitespace). This method may be used to retrieve properties of type "string" or "password".- Specified by:
getPropertyin interfacePropertyMap- Parameters:
key- key of the desired propertydefaultValue- value to return if property value is blank- Returns:
- String property value or defaultValue if not found.
-
getBooleanProperty
public Boolean getBooleanProperty(String key)
Description copied from interface:PropertyMapGets the Boolean property for the given key. This method may be used to retrieve properties of type "boolean".- Specified by:
getBooleanPropertyin interfacePropertyMap- Parameters:
key- key of the desired property- Returns:
- Boolean property value or
nullif not found.
-
getBooleanProperty
public Boolean getBooleanProperty(String key, Boolean defaultValue)
Description copied from interface:PropertyMapGets the Boolean property for the given key, returning the defaultValue if the located property valuenull. This method may be used to retrieve properties of type "boolean".- Specified by:
getBooleanPropertyin interfacePropertyMap- Parameters:
key- key of the desired propertydefaultValue- value to return if property value isnull- Returns:
- Boolean property value or defaultValue if not found.
-
getLongProperty
public Long getLongProperty(String key)
Description copied from interface:PropertyMapGets the Long property for the given key. This method may be used to retrieve properties of type "integer".- Specified by:
getLongPropertyin interfacePropertyMap- Parameters:
key- key of the desired property- Returns:
- Long property value or
nullif not found.
-
getLongProperty
public Long getLongProperty(String key, Long defaultValue)
Description copied from interface:PropertyMapGets the Long property for the given key, returning the defaultValue if the located property valuenull. This method may be used to retrieve properties of type "integer".- Specified by:
getLongPropertyin interfacePropertyMap- Parameters:
key- key of the desired propertydefaultValue- value to return if property value isnull- Returns:
- Long property value or defaultValue if not found.
-
getPrivateKeyStoreProperty
public PrivateKeyStore getPrivateKeyStoreProperty(String key)
Description copied from interface:PropertyMapGets the KeyStore property for the given key. This method may be used to retrieve properties of type PrivateKeyStore. The PrivateKeyStore contains a java KeyStore containing a single private key and the keystore password.- Specified by:
getPrivateKeyStorePropertyin interfacePropertyMap- Parameters:
key- key of the desired property- Returns:
- PrivateKeyStore property value or
nullif not found.
-
getPublicKeyStoreProperty
public PublicKeyStore getPublicKeyStoreProperty(String key)
Description copied from interface:PropertyMapGets the KeyStore property for the given key. This method may be used to retrieve properties of type PublicKeyStore. The PublicKeyStore contains a java KeyStore containing a single public key.- Specified by:
getPublicKeyStorePropertyin interfacePropertyMap- Parameters:
key- key of the desired property- Returns:
- PublicKeyStore property value or
nullif not found.
-
getOAuth2Context
public OAuth2Context getOAuth2Context(String key)
Description copied from interface:PropertyMapGets the OAuth2Context property for the given key. This method may be used to retrieve properties of type OAuth2Context. The OAuth2Context contains OAuth 2 configuration.- Specified by:
getOAuth2Contextin interfacePropertyMap- Parameters:
key- key of the desired property- Returns:
- OAuth2Context property value or
nullif not found.
-
getCustomProperties
public Map<String,String> getCustomProperties(String key)
Description copied from interface:PropertyMapGets the key/value pairs as a map for custom property type fields. This method may be used to retrieve the keys and values for properties of type "customproperties". If the property is not found for a given key an empty map will be returned.- Specified by:
getCustomPropertiesin interfacePropertyMap- Parameters:
key- key of the desired property- Returns:
- An immutable Map where the map entry key is a custom property key as a string and the map entry value is a string representing the value, decrypted when necessary.
-
-