|
|
|
|
@ -248,17 +248,6 @@ public Map<String, String> getAccountProperties()
|
|
|
|
|
return new HashMap<String, String>(accountProperties);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the specific account property.
|
|
|
|
|
*
|
|
|
|
|
* @param key property key
|
|
|
|
|
* @return property value corresponding to property key
|
|
|
|
|
*/
|
|
|
|
|
public Object getAccountProperty(Object key)
|
|
|
|
|
{
|
|
|
|
|
return accountProperties.get(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the specific account property.
|
|
|
|
|
*
|
|
|
|
|
@ -342,10 +331,10 @@ public String getAccountPropertyString(Object key)
|
|
|
|
|
*/
|
|
|
|
|
public String getAccountPropertyString(Object key, String defValue)
|
|
|
|
|
{
|
|
|
|
|
Object value = getAccountProperty(key);
|
|
|
|
|
String value = accountProperties.get(key);
|
|
|
|
|
if(value == null)
|
|
|
|
|
value = getDefaultString(key.toString());
|
|
|
|
|
return (value == null) ? defValue : value.toString();
|
|
|
|
|
return (value == null) ? defValue : value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -715,7 +704,7 @@ public void setTlsClientCertificate(String id)
|
|
|
|
|
*/
|
|
|
|
|
public boolean isHidden()
|
|
|
|
|
{
|
|
|
|
|
return getAccountProperty(
|
|
|
|
|
return getAccountPropertyString(
|
|
|
|
|
ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1083,11 +1072,6 @@ public void storeProperties( String protocolIconPath,
|
|
|
|
|
if(accountIconPath != null)
|
|
|
|
|
setAccountIconPath(accountIconPath);
|
|
|
|
|
|
|
|
|
|
ensureDefaultValuePresent(ProtocolProviderFactory.DTMF_METHOD);
|
|
|
|
|
|
|
|
|
|
ensureDefaultValuePresent(
|
|
|
|
|
ProtocolProviderFactory.DTMF_MINIMAL_TONE_DURATION);
|
|
|
|
|
|
|
|
|
|
mergeProperties(this.accountProperties, accountProperties);
|
|
|
|
|
|
|
|
|
|
// Removes encrypted password property, as it will be restored during
|
|
|
|
|
@ -1095,23 +1079,6 @@ public void storeProperties( String protocolIconPath,
|
|
|
|
|
accountProperties.remove("ENCRYPTED_PASSWORD");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Ensures that there is value bound to given property key. If there isn't
|
|
|
|
|
* the default one will be used.
|
|
|
|
|
*
|
|
|
|
|
* @param key the property key
|
|
|
|
|
*/
|
|
|
|
|
public void ensureDefaultValuePresent(String key)
|
|
|
|
|
{
|
|
|
|
|
String value = accountProperties.get(key);
|
|
|
|
|
|
|
|
|
|
if(value != null && value.trim().isEmpty())
|
|
|
|
|
value = null;
|
|
|
|
|
|
|
|
|
|
if(value == null)
|
|
|
|
|
accountProperties.put(key, getDefaultString(key));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets default property value for given <tt>key</tt>.
|
|
|
|
|
*
|
|
|
|
|
|