diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java
index ff2746a4a..db920e8ae 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java
@@ -26,43 +26,43 @@
public class IcqAccRegWizzActivator implements BundleActivator {
public static BundleContext bundleContext;
-
+
private static Logger logger = Logger.getLogger(
IcqAccRegWizzActivator.class.getName());
-
+
/**
* Starts this bundle.
*/
public void start(BundleContext bc) throws Exception {
-
+
bundleContext = bc;
-
+
ServiceReference uiServiceRef = bundleContext
.getServiceReference(UIService.class.getName());
-
- UIService uiService
+
+ UIService uiService
= (UIService) bundleContext.getService(uiServiceRef);
-
+
AccountRegistrationWizardContainer wizardContainer
= uiService.getAccountRegWizardContainer();
-
+
IcqAccountRegistrationWizard icqWizard
= new IcqAccountRegistrationWizard(wizardContainer);
-
+
wizardContainer.addAccountRegistrationWizard(icqWizard);
}
public void stop(BundleContext bundleContext) throws Exception {
}
-
+
public static ProtocolProviderFactory getIcqProtocolProviderFactory() {
-
+
ServiceReference[] serRefs = null;
-
+
String osgiFilter = "("
- + ProtocolProviderFactory.PROTOCOL_PROPERTY_NAME
+ + ProtocolProviderFactory.PROTOCOL
+ "="+ProtocolNames.ICQ+")";
-
+
try {
serRefs = bundleContext.getServiceReferences(
ProtocolProviderFactory.class.getName(), osgiFilter);
diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java
index e2c63c546..9700d7758 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java
@@ -12,25 +12,24 @@
import net.java.sip.communicator.service.gui.AccountRegistrationWizard;
import net.java.sip.communicator.service.gui.WizardContainer;
-import net.java.sip.communicator.service.protocol.AccountProperties;
import net.java.sip.communicator.service.protocol.ProtocolProviderFactory;
/**
* The IcqAccountRegistrationWizard is an implementation of the
* AccountRegistrationWizard for the ICQ protocol. It should allow
- * the user to create and configure a new ICQ account.
- *
+ * the user to create and configure a new ICQ account.
+ *
* @author Yana Stamcheva
*/
public class IcqAccountRegistrationWizard implements AccountRegistrationWizard {
private FirstWizardPage firstWizardPage;
-
+
private ArrayList pages = new ArrayList();
-
+
private IcqAccountRegistration registration
= new IcqAccountRegistration();
-
+
/**
* Creates an instance of IcqAccountRegistrationWizard.
* @param wizardContainer the wizard container, where this wizard
@@ -38,10 +37,10 @@ public class IcqAccountRegistrationWizard implements AccountRegistrationWizard {
*/
public IcqAccountRegistrationWizard(WizardContainer wizardContainer) {
firstWizardPage = new FirstWizardPage(registration, wizardContainer);
-
- pages.add(firstWizardPage);
+
+ pages.add(firstWizardPage);
}
-
+
/**
* Implements the AccountRegistrationWizard.getIcon method.
* Returns the icon to be used for this wizard.
@@ -78,11 +77,11 @@ public Iterator getPages() {
*/
public Iterator getSummary() {
Hashtable summaryTable = new Hashtable();
-
+
summaryTable.put("UIN", registration.getUin());
- summaryTable.put("Remember password",
+ summaryTable.put("Remember password",
new Boolean(registration.isRememberPassword()));
-
+
return summaryTable.entrySet().iterator();
}
@@ -90,13 +89,13 @@ public Iterator getSummary() {
* Installs the account created through this wizard.
*/
public void finish() {
- ProtocolProviderFactory factory
+ ProtocolProviderFactory factory
= IcqAccRegWizzActivator.getIcqProtocolProviderFactory();
-
- this.installAccount(factory,
+
+ this.installAccount(factory,
registration.getUin(), registration.getPassword());
}
-
+
/**
* Creates an account for the given user and password.
* @param providerFactory the ProtocolProviderFactory which will create
@@ -109,13 +108,12 @@ public void installAccount( ProtocolProviderFactory providerFactory,
String passwd) {
Hashtable accountProperties = new Hashtable();
-
+
if(registration.isRememberPassword()) {
- accountProperties.put(AccountProperties.PASSWORD, passwd);
+ accountProperties.put(ProtocolProviderFactory.PASSWORD, passwd);
}
-
+
providerFactory.installAccount(
- IcqAccRegWizzActivator.bundleContext, user,
- accountProperties);
+ user, accountProperties);
}
}