aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2010-07-05 15:47:13 +0000
committerYana Stamcheva <yana@jitsi.org>2010-07-05 15:47:13 +0000
commit68337df58b03cb701971fc9e784dc54bea34d6a3 (patch)
tree84557fe73cb18c10a462a3754c01527f38d9a63d /src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
parentb44c93dccb9fe2aa578240a0fd59335c51dd4de6 (diff)
downloadjitsi-68337df58b03cb701971fc9e784dc54bea34d6a3.zip
jitsi-68337df58b03cb701971fc9e784dc54bea34d6a3.tar.gz
jitsi-68337df58b03cb701971fc9e784dc54bea34d6a3.tar.bz2
Configuration window improvements including reorganizing sections, user interface modifications, account loading/unloading functionality and more.
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
index 3d10637..2113386 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderFactoryIcqImpl.java
@@ -66,7 +66,7 @@ public class ProtocolProviderFactoryIcqImpl
// we are installing new aim account from the wizzard, so mark it as aim
if(isAimFactory)
accountProperties.put(IcqAccountID.IS_AIM, "true");
-
+
AccountID accountID = new IcqAccountID(userIDStr, accountProperties);
//make sure we haven't seen this account id before.
@@ -109,6 +109,29 @@ public class ProtocolProviderFactoryIcqImpl
return super.loadAccount(accountProperties);
}
+ /**
+ * Initializes and creates an account corresponding to the specified
+ * accountProperties.
+ *
+ * @param accountProperties a set of protocol (or implementation) specific
+ * properties defining the new account.
+ * @return the AccountID of the newly created account
+ */
+ public AccountID createAccount(Map<String, String> accountProperties)
+ {
+ // there are two factories - one for icq accounts and one for aim ones.
+ // if we are trying to load an icq account in aim factory - skip it
+ // and the same for aim accounts in icq factory
+ boolean accountPropertiesIsAIM = IcqAccountID.isAIM(accountProperties);
+ if ((accountPropertiesIsAIM && !isAimFactory)
+ || (!accountPropertiesIsAIM && isAimFactory))
+ {
+ return null;
+ }
+
+ return super.createAccount(accountProperties);
+ }
+
protected AccountID createAccountID(String userID, Map<String, String> accountProperties)
{
return new IcqAccountID(userID, accountProperties);