return value;
}
private NetworkProxyConfiguration readNetworkProxyConfiguration( String prefix, Registry registry )
{
NetworkProxyConfiguration value = new NetworkProxyConfiguration();
//String id = registry.getString( prefix + "id", value.getId() );
List<String> idList = registry.getList( prefix + "id" );
String id = value.getId();
if (idList != null && !idList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = idList.size();i<size;i++)
{
sb.append( idList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
id = sb.toString();
}
value.setId( id );
//String protocol = registry.getString( prefix + "protocol", value.getProtocol() );
List<String> protocolList = registry.getList( prefix + "protocol" );
String protocol = value.getProtocol();
if (protocolList != null && !protocolList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = protocolList.size();i<size;i++)
{
sb.append( protocolList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
protocol = sb.toString();
}
value.setProtocol( protocol );
//String host = registry.getString( prefix + "host", value.getHost() );
List<String> hostList = registry.getList( prefix + "host" );
String host = value.getHost();
if (hostList != null && !hostList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = hostList.size();i<size;i++)
{
sb.append( hostList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
host = sb.toString();
}
value.setHost( host );
int port = registry.getInt( prefix + "port", value.getPort() );
value.setPort( port );
//String username = registry.getString( prefix + "username", value.getUsername() );
List<String> usernameList = registry.getList( prefix + "username" );
String username = value.getUsername();
if (usernameList != null && !usernameList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = usernameList.size();i<size;i++)
{
sb.append( usernameList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
username = sb.toString();
}
value.setUsername( username );
//String password = registry.getString( prefix + "password", value.getPassword() );
List<String> passwordList = registry.getList( prefix + "password" );
String password = value.getPassword();
if (passwordList != null && !passwordList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = passwordList.size();i<size;i++)
{
sb.append( passwordList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
password = sb.toString();
}
value.setPassword( password );
boolean useNtlm = registry.getBoolean( prefix + "useNtlm", value.isUseNtlm() );
value.setUseNtlm( useNtlm );
return value;
}