aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/plugin')
-rw-r--r--src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java6
-rw-r--r--src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java24
-rw-r--r--src/net/java/sip/communicator/plugin/dictaccregwizz/FirstWizardPage.java47
-rw-r--r--src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java5
-rw-r--r--src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java24
-rw-r--r--src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java35
-rw-r--r--src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java11
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java9
-rw-r--r--src/net/java/sip/communicator/plugin/simpleaccreg/SimpleAccountRegistrationActivator.java4
-rw-r--r--src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java77
-rw-r--r--src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java13
-rw-r--r--src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java10
-rw-r--r--src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java29
13 files changed, 132 insertions, 162 deletions
diff --git a/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java b/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java
index 3ef44b4..8b0bee9 100644
--- a/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java
+++ b/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java
@@ -71,9 +71,9 @@ public class AccountInfoForm
{
accountID = (AccountID) accountsList.get(i);
- boolean isHidden =
- accountID.getAccountProperties()
- .get(ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null;
+ boolean isHidden =
+ accountID
+ .getAccountProperty(ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null;
if(!isHidden)
hasRegisteredAccounts = true;
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
index 8df2f43..0e6a239 100644
--- a/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
@@ -392,8 +392,8 @@ public class FirstWizardPage
{
AccountID accountID = protocolProvider.getAccountID();
String password =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PASSWORD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PASSWORD);
this.uinField.setEnabled(false);
this.uinField.setText(accountID.getUserID());
@@ -406,24 +406,24 @@ public class FirstWizardPage
}
String proxyAddress =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_ADDRESS);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_ADDRESS);
String proxyPort =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_PORT);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_PORT);
String proxyType =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_TYPE);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_TYPE);
String proxyUsername =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_USERNAME);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_USERNAME);
String proxyPassword =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_PASSWORD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_PASSWORD);
if (proxyAddress != null || proxyPort != null
|| proxyType != null || proxyUsername != null
diff --git a/src/net/java/sip/communicator/plugin/dictaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/dictaccregwizz/FirstWizardPage.java
index 4c65b41..02a5489 100644
--- a/src/net/java/sip/communicator/plugin/dictaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/dictaccregwizz/FirstWizardPage.java
@@ -313,11 +313,14 @@ public class FirstWizardPage
boolean isModified = false;
if (this.initAccountID instanceof AccountID)
- { // We check if there is modifications to the server
- String accHost = (String) this.initAccountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_ADDRESS);
- int accPort = Integer.parseInt((String) this.initAccountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_PORT));
+ { // We check if there is modifications to the server
+ String accHost =
+ this.initAccountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
+ int accPort =
+ Integer
+ .parseInt(this.initAccountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT));
if (accHost != host || accPort != port)
{
@@ -470,12 +473,15 @@ public class FirstWizardPage
public void loadAccount(ProtocolProviderService protocolProvider)
{
AccountID accountID = protocolProvider.getAccountID();
- String host = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_ADDRESS);
- String port = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_PORT);
- String strategy = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.STRATEGY);
+ String host =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
+ String port =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT);
+ String strategy =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.STRATEGY);
this.initAccountID = accountID;
@@ -530,22 +536,23 @@ public class FirstWizardPage
ProtocolProviderFactory factory =
DictAccRegWizzActivator.getDictProtocolProviderFactory();
- ArrayList registeredAccounts = factory.getRegisteredAccounts();
-
String accHost;
int accPort;
- for (int i = 0; i < registeredAccounts.size(); i++)
+ for (AccountID accountID : factory.getRegisteredAccounts())
{
- AccountID accountID = (AccountID) registeredAccounts.get(i);
- accHost = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_ADDRESS);
+ accHost =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
if (host.equalsIgnoreCase(accHost))
{
- // We check the port, only if there is an account with the same host
- accPort = Integer.parseInt((String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_PORT));
+ // We check the port, only if there is an account with the same
+ // host
+ accPort =
+ Integer
+ .parseInt(accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT));
if (port == accPort)
{
diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java
index 51c249e..6fdecd4 100644
--- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java
@@ -280,8 +280,9 @@ public class FirstWizardPage
public void loadAccount(ProtocolProviderService protocolProvider)
{
AccountID accountID = protocolProvider.getAccountID();
- String password = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.PASSWORD);
+ String password =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PASSWORD);
this.userIDField.setEnabled(false);
this.userIDField.setText(accountID.getUserID());
diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
index 9cb54de..8492540 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
@@ -393,8 +393,8 @@ public class FirstWizardPage
{
AccountID accountID = protocolProvider.getAccountID();
String password =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PASSWORD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PASSWORD);
this.uinField.setText(accountID.getUserID());
@@ -408,24 +408,24 @@ public class FirstWizardPage
}
String proxyAddress =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_ADDRESS);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_ADDRESS);
String proxyPort =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_PORT);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_PORT);
String proxyType =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_TYPE);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_TYPE);
String proxyUsername =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_USERNAME);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_USERNAME);
String proxyPassword =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_PASSWORD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_PASSWORD);
if (proxyAddress != null || proxyPort != null
|| proxyType != null || proxyUsername != null
diff --git a/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java
index 5374020..65bcabe 100644
--- a/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java
@@ -6,8 +6,6 @@
*/
package net.java.sip.communicator.plugin.ircaccregwizz;
-import java.util.*;
-
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -371,20 +369,25 @@ public class FirstWizardPage
{
AccountID accountID = protocolProvider.getAccountID();
- String password = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.PASSWORD);
+ String password =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PASSWORD);
- String server = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_ADDRESS);
+ String server =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
- String port = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.SERVER_PORT);
+ String port =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT);
- String autoNickChange = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.AUTO_CHANGE_USER_NAME);
+ String autoNickChange =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.AUTO_CHANGE_USER_NAME);
- String noPasswordRequired = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactory.NO_PASSWORD_REQUIRED);
+ String noPasswordRequired =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.NO_PASSWORD_REQUIRED);
this.nickField.setEnabled(false);
this.nickField.setText(accountID.getUserID());
@@ -433,16 +436,10 @@ public class FirstWizardPage
ProtocolProviderFactory factory
= IrcAccRegWizzActivator.getIrcProtocolProviderFactory();
- ArrayList registeredAccounts = factory.getRegisteredAccounts();
-
- for (int i = 0; i < registeredAccounts.size(); i++)
+ for (AccountID accountID : factory.getRegisteredAccounts())
{
- AccountID accountID = (AccountID) registeredAccounts.get(i);
-
if (userID.equalsIgnoreCase(accountID.getUserID()))
- {
return true;
- }
}
return false;
}
diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
index b53e50c..e81805d 100644
--- a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
@@ -6,7 +6,6 @@
package net.java.sip.communicator.plugin.msnaccregwizz;
import java.awt.*;
-import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
@@ -272,8 +271,8 @@ public class FirstWizardPage
{
AccountID accountID = protocolProvider.getAccountID();
String password =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PASSWORD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PASSWORD);
this.uinField.setText(accountID.getUserID());
@@ -289,12 +288,8 @@ public class FirstWizardPage
ProtocolProviderFactory factory =
MsnAccRegWizzActivator.getMsnProtocolProviderFactory();
- ArrayList registeredAccounts = factory.getRegisteredAccounts();
-
- for (int i = 0; i < registeredAccounts.size(); i++)
+ for (AccountID accountID : factory.getRegisteredAccounts())
{
- AccountID accountID = (AccountID) registeredAccounts.get(i);
-
if (accountName.equalsIgnoreCase(accountID.getUserID()))
return true;
}
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java b/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java
index a3e989e..b1092b2 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/PluginTableModel.java
@@ -4,10 +4,10 @@
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
-
package net.java.sip.communicator.plugin.pluginmanager;
import java.util.*;
+
import javax.swing.table.*;
import org.osgi.framework.*;
@@ -103,10 +103,8 @@ public class PluginTableModel extends AbstractTableModel
Object sysBundleProp
= bundle.getHeaders().get("System-Bundle");
- if(sysBundleProp == null || !sysBundleProp.equals("yes"))
- return true;
- else
- return false;
+ return (sysBundleProp == null || !sysBundleProp
+ .equals("yes"));
}
}
}
@@ -213,5 +211,4 @@ public class PluginTableModel extends AbstractTableModel
this.bundles = this.bundleContext.getBundles();
Arrays.sort(this.bundles, bundleComparator);
}
-
}
diff --git a/src/net/java/sip/communicator/plugin/simpleaccreg/SimpleAccountRegistrationActivator.java b/src/net/java/sip/communicator/plugin/simpleaccreg/SimpleAccountRegistrationActivator.java
index 22a96ad..a5ace3b 100644
--- a/src/net/java/sip/communicator/plugin/simpleaccreg/SimpleAccountRegistrationActivator.java
+++ b/src/net/java/sip/communicator/plugin/simpleaccreg/SimpleAccountRegistrationActivator.java
@@ -89,8 +89,8 @@ public class SimpleAccountRegistrationActivator
{
AccountID accountID = registeredAccountIter.next();
boolean isHidden =
- accountID.getAccountProperties().get(
- ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null;
+ accountID
+ .getAccountProperty(ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null;
if (!isHidden)
{
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java
index 3835cf7..b69a003 100644
--- a/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java
@@ -532,56 +532,54 @@ public class FirstWizardPage
{
AccountID accountID = protocolProvider.getAccountID();
String password =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PASSWORD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PASSWORD);
String serverAddress =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.SERVER_ADDRESS);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
String serverPort =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.SERVER_PORT);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT);
String proxyAddress =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_ADDRESS);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_ADDRESS);
String proxyPort =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PROXY_PORT);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PROXY_PORT);
String preferredTransport =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PREFERRED_TRANSPORT);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PREFERRED_TRANSPORT);
- boolean enablePresence = new Boolean(
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.IS_PRESENCE_ENABLED)).booleanValue();
+ boolean enablePresence =
+ accountID.getAccountPropertyBoolean(
+ ProtocolProviderFactory.IS_PRESENCE_ENABLED, false);
- boolean forceP2P = new Boolean(
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.FORCE_P2P_MODE)).booleanValue();
-
- boolean enabledDefaultEncryption = new Boolean(
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.DEFAULT_ENCRYPTION)).booleanValue();
+ boolean forceP2P =
+ accountID.getAccountPropertyBoolean(
+ ProtocolProviderFactory.FORCE_P2P_MODE, false);
+
+ boolean enabledDefaultEncryption =
+ accountID.getAccountPropertyBoolean(
+ ProtocolProviderFactory.DEFAULT_ENCRYPTION, false);
String pollingPeriod =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.POLLING_PERIOD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.POLLING_PERIOD);
String subscriptionPeriod =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SUBSCRIPTION_EXPIRATION);
- String keepAliveMethod
- = (String) accountID.getAccountProperties()
- .get("KEEP_ALIVE_METHOD");
+ String keepAliveMethod =
+ accountID.getAccountPropertyString("KEEP_ALIVE_METHOD");
- String keepAliveInterval
- = (String) accountID.getAccountProperties()
- .get("KEEP_ALIVE_INTERVAL");
+ String keepAliveInterval =
+ accountID.getAccountPropertyString("KEEP_ALIVE_INTERVAL");
uinField.setEnabled(false);
this.uinField.setText((serverAddress == null) ? accountID.getUserID()
@@ -655,21 +653,6 @@ public class FirstWizardPage
}
}
- /**
- * Disables Next Button if Port field value is incorrect
- */
- private void setNextButtonAccordingToPort()
- {
- try
- {
- wizard.getWizardContainer().setNextFinishButtonEnabled(true);
- }
- catch (NumberFormatException ex)
- {
- wizard.getWizardContainer().setNextFinishButtonEnabled(false);
- }
- }
-
public void itemStateChanged(ItemEvent e)
{
if (e.getStateChange() == ItemEvent.SELECTED
diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
index 82cc6ba..5b3dbc9 100644
--- a/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
@@ -31,7 +31,8 @@ import net.java.sip.communicator.util.swing.*;
* @author Shobhit Jindal
*/
public class FirstWizardPage
- extends TransparentPanel implements WizardPage, DocumentListener
+ extends TransparentPanel
+ implements WizardPage, DocumentListener
{
public static final String FIRST_PAGE_IDENTIFIER = "FirstPageIdentifier";
@@ -260,11 +261,13 @@ public class FirstWizardPage
AccountID accountID = protocolProvider.getAccountID();
- String identityFile = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactorySSH.IDENTITY_FILE);
+ String identityFile =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactorySSH.IDENTITY_FILE);
- String knownHostsFile = (String) accountID.getAccountProperties()
- .get(ProtocolProviderFactorySSH.KNOWN_HOSTS_FILE);
+ String knownHostsFile =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactorySSH.KNOWN_HOSTS_FILE);
this.accountIDField.setText(accountID.getUserID());
diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
index a973db8..569c573 100644
--- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
@@ -269,8 +269,8 @@ public class FirstWizardPage
{
AccountID accountID = protocolProvider.getAccountID();
String password =
- (String) accountID.getAccountProperties().get(
- ProtocolProviderFactory.PASSWORD);
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.PASSWORD);
this.uinField.setEnabled(false);
this.uinField.setText(accountID.getUserID());
@@ -287,12 +287,8 @@ public class FirstWizardPage
ProtocolProviderFactory factory =
YahooAccRegWizzActivator.getYahooProtocolProviderFactory();
- ArrayList registeredAccounts = factory.getRegisteredAccounts();
-
- for (int i = 0; i < registeredAccounts.size(); i++)
+ for (AccountID accountID : factory.getRegisteredAccounts())
{
- AccountID accountID = (AccountID) registeredAccounts.get(i);
-
if (accountName.equalsIgnoreCase(accountID.getUserID()))
return true;
}
diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java
index a68c329..78dfcd0 100644
--- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java
@@ -6,9 +6,8 @@
*/
package net.java.sip.communicator.plugin.zeroconfaccregwizz;
-import java.util.*;
-
import java.awt.*;
+
import javax.swing.*;
import javax.swing.event.*;
@@ -339,16 +338,14 @@ public class FirstWizardPage
this.userIDField.setEnabled(false);
this.userIDField.setText(accountID.getUserID());
- this.firstField.setText((String)accountID.getAccountProperties()
- .get("first"));
- this.lastField.setText((String)accountID.getAccountProperties()
- .get("last"));
- this.mailField.setText((String)accountID.getAccountProperties()
- .get("mail"));
- Boolean remember = (Boolean)accountID.getAccountProperties()
- .get("rememberContacts");
- if (remember.booleanValue()) this.rememberContacts.setSelected(true);
-
+ this.firstField.setText(accountID.getAccountPropertyString("first"));
+ this.lastField.setText(accountID.getAccountPropertyString("last"));
+ this.mailField.setText(accountID.getAccountPropertyString("mail"));
+
+ Boolean remember =
+ (Boolean) accountID.getAccountProperty("rememberContacts");
+ if (remember.booleanValue())
+ this.rememberContacts.setSelected(true);
}
/**
@@ -364,16 +361,10 @@ public class FirstWizardPage
ProtocolProviderFactory factory
= ZeroconfAccRegWizzActivator.getZeroconfProtocolProviderFactory();
- ArrayList registeredAccounts = factory.getRegisteredAccounts();
-
- for (int i = 0; i < registeredAccounts.size(); i++)
+ for (AccountID accountID : factory.getRegisteredAccounts())
{
- AccountID accountID = (AccountID) registeredAccounts.get(i);
-
if (userID.equalsIgnoreCase(accountID.getUserID()))
- {
return true;
- }
}
return false;
}