public class MutablePropertyMap extends HashMap<String,Object> implements PropertyMap
PropertyMap
implementation for use in testing with ConnectorTest
.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
MutablePropertyMap() |
Modifier and Type | Method and Description |
---|---|
Boolean |
getBooleanProperty(String key)
Gets the Boolean property for the given key.
|
Boolean |
getBooleanProperty(String key,
Boolean defaultValue)
Gets the Boolean property for the given key, returning the defaultValue if the located property value
null . |
Map<String,String> |
getCustomProperties(String key)
Gets the key/value pairs as a map for custom property type fields.
|
Long |
getLongProperty(String key)
Gets the Long property for the given key.
|
Long |
getLongProperty(String key,
Long defaultValue)
Gets the Long property for the given key, returning the defaultValue if the located property value
null . |
OAuth2Context |
getOAuth2Context(String key)
Gets the OAuth2Context property for the given key.
|
PrivateKeyStore |
getPrivateKeyStoreProperty(String key)
Gets the KeyStore property for the given key.
|
String |
getProperty(String key)
Gets the String property for the given key.
|
String |
getProperty(String key,
String defaultValue)
Gets the String property for the given key, returning the defaultValue if the located property value is blank
(
null or all characters are whitespace). |
PublicKeyStore |
getPublicKeyStoreProperty(String key)
Gets the KeyStore property for the given key.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
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
public String getProperty(String key)
PropertyMap
getProperty
in interface PropertyMap
key
- key of the desired propertynull
if not found.public String getProperty(String key, String defaultValue)
PropertyMap
null
or all characters are whitespace). This method may be used to retrieve properties of type "string"
or "password".getProperty
in interface PropertyMap
key
- key of the desired propertydefaultValue
- value to return if property value is blankpublic Boolean getBooleanProperty(String key)
PropertyMap
getBooleanProperty
in interface PropertyMap
key
- key of the desired propertynull
if not found.public Boolean getBooleanProperty(String key, Boolean defaultValue)
PropertyMap
null
. This method may be used to retrieve properties of type "boolean".getBooleanProperty
in interface PropertyMap
key
- key of the desired propertydefaultValue
- value to return if property value is null
public Long getLongProperty(String key)
PropertyMap
getLongProperty
in interface PropertyMap
key
- key of the desired propertynull
if not found.public Long getLongProperty(String key, Long defaultValue)
PropertyMap
null
.
This method may be used to retrieve properties of type "integer".getLongProperty
in interface PropertyMap
key
- key of the desired propertydefaultValue
- value to return if property value is null
public PrivateKeyStore getPrivateKeyStoreProperty(String key)
PropertyMap
getPrivateKeyStoreProperty
in interface PropertyMap
key
- key of the desired propertynull
if not found.public PublicKeyStore getPublicKeyStoreProperty(String key)
PropertyMap
getPublicKeyStoreProperty
in interface PropertyMap
key
- key of the desired propertynull
if not found.public OAuth2Context getOAuth2Context(String key)
PropertyMap
getOAuth2Context
in interface PropertyMap
key
- key of the desired propertynull
if not found.public Map<String,String> getCustomProperties(String key)
PropertyMap
getCustomProperties
in interface PropertyMap
key
- key of the desired property