diff options
21 files changed, 282 insertions, 946 deletions
diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties index e8e74b3..b65060e 100644 --- a/resources/languages/resources.properties +++ b/resources/languages/resources.properties @@ -85,11 +85,10 @@ service.gui.CALL_NOT_SUPPORTING_PARTICIPANT=This call only supports participants service.gui.CANCEL=&Cancel
service.gui.CHAT=Chat
service.gui.CHANGE_FONT=Change font
-service.gui.CHANGE_NICKNAME=Change nickname...
-service.gui.CHANGE_NICKNAME_LABEL=In the field below, you can enter your new nickname.
service.gui.CHANGE_ROOM_SUBJECT=Change room's subject...
service.gui.CHANGE_ROOM_SUBJECT_LABEL=In the field below, you can enter the new subject for this room.
-service.gui.CHANGE_VIDEO_QUALITY=Change remote video quality
+service.gui.CHANGE_NICKNAME=Change nickname...
+service.gui.CHANGE_NICKNAME_LABEL=In the field below, you can enter your new nickname.
service.gui.CHAT_ROOM_ALREADY_JOINED=The {0} chat room is already joined.
service.gui.CHAT_ROOM_CONFIGURATION={0} chat room configuration
service.gui.CHAT_ROOM_CONFIGURATION_FAILED=Failed to obtain the {0} chat room configuration form.
@@ -220,7 +219,6 @@ service.gui.GRANT_MEMBERSHIP=Grant membership service.gui.GRANT_VOICE=Grant voice
service.gui.GUEST=visitor
service.gui.HANG_UP=Hang up
-service.gui.HD_QUALITY=HD video
service.gui.HELP=&Help
service.gui.HIDE=Hide
service.gui.HIDE_OFFLINE_CONTACTS=Hide offline contacts
@@ -273,7 +271,6 @@ service.gui.LOGIN_GENERAL_ERROR=An error occurred while logging in with account: service.gui.LOGIN_INTERNAL_ERROR=An error occurred while logging in with account: User name: {0}, Server name: {1}. This is most probably an internal application error. Please report the problem to our developers mailing list (dev@jitsi.java.net).
service.gui.LOGIN_INVALID_PROPERTIES_ERROR=Unable to log in with account: User name: {0}, Server name: {1}, due to an account configuration problem. Please check your account configuration.
service.gui.LOGOFF_NOT_SUCCEEDED=An error occurred while logging off with the following account: User name: {0}, Server name: {1}.
-service.gui.LOW_QUALITY=Low quality
service.gui.MEMBER=member
service.gui.MESSAGE=Message:
service.gui.MISSED_CALLS_TOOL_TIP=Missed calls from:
@@ -318,7 +315,6 @@ service.gui.NO_GROUP_CHAT_ACCOUNT_AVAILABLE=No accounts, supporting multi user c service.gui.NO_ONLINE_TELEPHONY_ACCOUNT=At least one online telephony account is needed in order to make a call. Please login to one of your telephony accounts and try again.
service.gui.NON_EMPTY_CHAT_WINDOW_CLOSE=You're trying to close a chat with a non-sent message. Are you sure you want to close this chat?
service.gui.NON_EXISTING_USER_ID=The {0} server does not recognize specified user id.
-service.gui.SD_QUALITY=Standard quality
service.gui.OFFLINE=Offline
service.gui.OK=&OK
service.gui.OLDER_CALLS=Older calls
@@ -434,7 +430,6 @@ service.gui.TRANSFER_CALL_TITLE=Transfer Call service.gui.TRANSFER_CALL_TO=Transfer to:
service.gui.TRANSPARENCY_NOT_ENABLED=Transparency is not supported by your current configuration.
service.gui.TYPE_YOUR_REQUEST=Type your request here
-service.gui.UNABLE_TO_CHANGE_VIDEO_QUALITY=We were not able to change video quality for this call.
service.gui.UNMUTE=Unmute
service.gui.USER_IDENTIFIER=User identifier:
service.gui.USER_EXISTS_ERROR=This user already exists on the selected network. Please choose another user or network.
@@ -608,6 +603,14 @@ impl.ldap.SEARCH_BASE=Search base impl.ldap.SCOPE=Scope
impl.ldap.WRONG_CREDENTIALS=Wrong credentials for LDAP directory {0}
+# Address book plugin
+plugin.addrbook.ADDRESS_BOOKS=Address book
+plugin.addrbook.ENABLE_MACOSX_ADDRESSBOOK=Enable MacOSX Address Book search
+plugin.addrbook.ENABLE_MICROSOFT_OUTLOOK=Enable Microsoft Outlook search
+plugin.addrbook.DESCRIPTION=If enabled everything you type in the search field \
+ of the contact list will be also searched in your system address book and all \
+ matching contacts from your address book will appear in your contact list.
+
# Google Contacts
impl.googlecontacts.CONFIG_FORM_TITLE=Google Contacts
impl.googlecontacts.NEW=New
@@ -643,6 +646,7 @@ plugin.contactinfo.CONTACT_SUMMARY_DESCRIPTION=Summary of contact info for plugin.contactinfo.CONTACT_EXTENDED_DESCRIPTION=Extended contact info for
plugin.contactinfo.NOT_SPECIFIED=[Not specified]
plugin.contactinfo.USER_PICTURES=User pictures
+plugin.contactinfo.USER_STATUS_MESSAGE=Status Message
# aimaccregwizz
plugin.aimaccregwizz.PROTOCOL_NAME=AIM
@@ -722,8 +726,6 @@ plugin.generalconfig.ERROR_PORT_NUMBER=Wrong port number plugin.generalconfig.CHECK_FOR_UPDATES=Check for updates on startup
plugin.generalconfig.STARTUP_CONFIG=Startup
plugin.generalconfig.LEAVE_CHATROOM_ON_WINDOW_CLOSE=Leave chat rooms when closing window
-plugin.generalconfig.REMOVE_SPECIAL_PHONE_SYMBOLS=Remove special symbols before callng phone numbers
-plugin.generalconfig.SIP_CALL_CONFIG=SIP configuration
# gibberish accregwizz
plugin.gibberishaccregwizz.PROTOCOL_NAME=Gibberish
@@ -1186,6 +1188,9 @@ plugin.chatconfig.replacement.TITLE=Image/Video: plugin.chatconfig.replacement.ENABLE_SMILEY_STATUS=Enable smiley replacement
plugin.chatconfig.replacement.ENABLE_REPLACEMENT_STATUS=Enable Image/Video replacement
plugin.chatconfig.replacement.REPLACEMENT_SOURCES=Sources:
+plugin.chatconfig.spellcheck.TITLE=SpellCheck
+plugin.spellcheck.LANG=Language
+plugin.spellcheck.EDIT_PERSONAL_DICT=Edit
#provisioning plugin
plugin.provisioning.PROVISIONING=Provisioning
diff --git a/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizard.java b/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizard.java index ed5d593..52c2cb1 100644 --- a/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/impl/gui/main/account/EmptyAccountRegistrationWizard.java @@ -27,7 +27,7 @@ import net.java.sip.communicator.service.protocol.*; * @author Emil Ivov */ class EmptyAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { /** * The only page we need in this wizard, containing a prompt for the user @@ -171,44 +171,8 @@ class EmptyAccountRegistrationWizard * Empty interface method implementation, unused in the case of the * {@link EmptyAccountRegistrationWizard} */ - public boolean isModification() - { - return false; - } - - /** - * Empty interface method implementation, unused in the case of the - * {@link EmptyAccountRegistrationWizard} - */ - public boolean isSimpleFormEnabled() - { - return true; - } - - /** - * Empty interface method implementation, unused in the case of the - * {@link EmptyAccountRegistrationWizard} - */ - public boolean isWebSignupSupported() - { - return false; - } - - /** - * Empty interface method implementation, unused in the case of the - * {@link EmptyAccountRegistrationWizard} - */ public void loadAccount(ProtocolProviderService protocolProvider) { - - } - - /** - * Empty interface method implementation, unused in the case of the - * {@link EmptyAccountRegistrationWizard} - */ - public void setModification(boolean isModification) - { } /** @@ -229,17 +193,4 @@ class EmptyAccountRegistrationWizard { return null; } - - /** - * Empty interface method implementation, unused in the case of the - * {@link EmptyAccountRegistrationWizard} - */ - public void webSignup() throws UnsupportedOperationException {} - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java index 428cd0d..de394ba 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java @@ -19,8 +19,7 @@ import net.java.sip.communicator.impl.gui.customcontrols.*; import net.java.sip.communicator.impl.gui.main.*; import net.java.sip.communicator.impl.gui.main.contactlist.addgroup.*; import net.java.sip.communicator.service.contactlist.*; -import net.java.sip.communicator.service.contactlist.event.MetaContactEvent; -import net.java.sip.communicator.service.contactlist.event.MetaContactListAdapter; +import net.java.sip.communicator.service.contactlist.event.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; @@ -282,6 +281,9 @@ public class AddContactDialog continue; accountCombo.addItem(provider); + + if (isPreferredProvider(provider.getAccountID())) + accountCombo.setSelectedItem(provider); } // if we have only select account option and only one account @@ -655,4 +657,27 @@ public class AddContactDialog imageLabel.setVerticalAlignment(JLabel.TOP); } + + /** + * Returns the first <tt>ProtocolProviderService</tt> implementation + * corresponding to the preferred protocol + * + * @return the <tt>ProtocolProviderService</tt> corresponding to the + * preferred protocol + */ + private boolean isPreferredProvider(AccountID accountID) + { + String preferredProtocolProp + = accountID.getAccountPropertyString( + ProtocolProviderFactory.IS_PREFERRED_PROTOCOL); + + if (preferredProtocolProp != null + && preferredProtocolProp.length() > 0 + && Boolean.parseBoolean(preferredProtocolProp)) + { + return true; + } + + return false; + } } diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java index 00ae49a..061e846 100644 --- a/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java @@ -22,7 +22,7 @@ import org.osgi.framework.*; * @author Yana Stamcheva */ public class AimAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { /** * The logger. @@ -35,12 +35,8 @@ public class AimAccountRegistrationWizard private final AimAccountRegistration registration = new AimAccountRegistration(); - private WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>AimAccountRegistrationWizard</tt>. * @@ -48,9 +44,9 @@ public class AimAccountRegistrationWizard */ public AimAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer.setFinishButtonText( + wizardContainer.setFinishButtonText( Resources.getString("service.gui.SIGN_IN")); } @@ -196,11 +192,11 @@ public class AimAccountRegistrationWizard accountProperties.put(ProtocolProviderFactory.PASSWORD, passwd); } - if (isModification) + if (isModification()) { providerFactory.modifyAccount(protocolProvider, accountProperties); - this.isModification = false; + setModification(false); return protocolProvider; } @@ -247,7 +243,7 @@ public class AimAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -255,28 +251,6 @@ public class AimAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -316,18 +290,6 @@ public class AimAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -339,20 +301,6 @@ public class AimAccountRegistrationWizard } /** - * Indicates whether this wizard enables the simple "sign in" form shown - * when the user opens the application for the first time. The simple - * "sign in" form allows user to configure her account in one click, just - * specifying her username and password and leaving any other configuration - * as by default. - * @return <code>true</code> if the simple "Sign in" form is enabled or - * <code>false</code> otherwise. - */ - public boolean isSimpleFormEnabled() - { - return true; - } - - /** * Defines the operation that will be executed when user clicks on the * "Sign up" link. * @throws UnsupportedOperationException if the web sign up operation is @@ -393,11 +341,4 @@ public class AimAccountRegistrationWizard return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java index 59f03eb..e491323 100644 --- a/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java @@ -23,7 +23,7 @@ import org.osgi.framework.*; * @author LITZELMANN Cedric */ public class DictAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private final Logger logger = Logger.getLogger(DictAccountRegistrationWizard.class); @@ -39,28 +39,18 @@ public class DictAccountRegistrationWizard private DictAccountRegistration registration = new DictAccountRegistration(); /** - * The container of the wizard. - */ - private WizardContainer wizardContainer; - - /** * The protocole provider. */ private ProtocolProviderService protocolProvider; /** - * Tells us if the is a modification wiazrd or not. - */ - private boolean isModification; - - /** * Creates an instance of <tt>DictAccountRegistrationWizard</tt>. * * @param wizardContainer the wizard container, where this wizard is added */ public DictAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); } /** @@ -205,11 +195,11 @@ public class DictAccountRegistrationWizard // Save strategy accountProperties.put(ProtocolProviderFactory.STRATEGY, strategy); - if (isModification) + if (isModification()) { providerFactory.uninstallAccount(protocolProvider.getAccountID()); this.protocolProvider = null; - this.isModification = false; + setModification(false); } try @@ -255,7 +245,7 @@ public class DictAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -265,40 +255,6 @@ public class DictAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Sets if this wizard is opened for modification or for creating a - * new account. - * - * @param b <code>True</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public void setModification(boolean b) - { - this.isModification = b; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -347,9 +303,10 @@ public class DictAccountRegistrationWizard int nbAccounts = this.getNumberOfAccounts(); String host = this.registration.getHost(); int nbAccountsForHost = this.getNbAccountForHost(host); - + if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) || - nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1)) + nbAccountsForHost == 0 + || (this.isModification() && nbAccountsForHost == 1)) { // We create the first account or we edit the onlyone // Or we create the first account for this server or edit the onlyone @@ -374,7 +331,7 @@ public class DictAccountRegistrationWizard return factory.getRegisteredAccounts().size(); } - + /** * Returns the number of account for a given host * @param hostName the host @@ -428,26 +385,6 @@ public class DictAccountRegistrationWizard } /** - * Nothing to do here in the case of dictionary. - */ - public void webSignup() - { - throw new UnsupportedOperationException( - "The web sign up is not supproted by the dictionary wizard."); - } - - /** - * Returns <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise. - * @return <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise - */ - public boolean isWebSignupSupported() - { - return false; - } - - /** * Returns a simple account registration form that would be the first form * shown to the user. Only if the user needs more settings she'll choose * to open the advanced wizard, consisted by all pages. @@ -462,11 +399,4 @@ public class DictAccountRegistrationWizard return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java index 283c884..05e8c23 100644 --- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java @@ -23,7 +23,7 @@ import org.osgi.framework.*; * @author Emil Ivov */ public class GibberishAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private final Logger logger = Logger.getLogger(GibberishAccountRegistrationWizard.class); @@ -40,12 +40,8 @@ public class GibberishAccountRegistrationWizard private GibberishAccountRegistration registration = new GibberishAccountRegistration(); - private final WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>GibberishAccountRegistrationWizard</tt>. * @param wizardContainer the wizard container, where this wizard @@ -53,9 +49,10 @@ public class GibberishAccountRegistrationWizard */ public GibberishAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer.setFinishButtonText(Resources.getString("service.gui.SIGN_IN")); + wizardContainer.setFinishButtonText( + Resources.getString("service.gui.SIGN_IN")); } /** @@ -185,11 +182,11 @@ public class GibberishAccountRegistrationWizard registration.getPassword()); } - if (isModification) + if (isModification()) { providerFactory.uninstallAccount(protocolProvider.getAccountID()); this.protocolProvider = null; - this.isModification = false; + setModification(false); } try @@ -232,7 +229,7 @@ public class GibberishAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -242,28 +239,6 @@ public class GibberishAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -303,18 +278,6 @@ public class GibberishAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -324,7 +287,6 @@ public class GibberishAccountRegistrationWizard { return FirstWizardPage.USER_NAME_EXAMPLE; } - /** * Indicates whether this wizard enables the simple "sign in" form shown @@ -341,26 +303,6 @@ public class GibberishAccountRegistrationWizard } /** - * Nothing to do here in the case of Gibberish. - */ - public void webSignup() - { - throw new UnsupportedOperationException( - "The web sign up is not supproted by the gibberish wizard."); - } - - /** - * Returns <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise. - * @return <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise - */ - public boolean isWebSignupSupported() - { - return false; - } - - /** * Returns a simple account registration form that would be the first form * shown to the user. Only if the user needs more settings she'll choose * to open the advanced wizard, consisted by all pages. @@ -374,11 +316,4 @@ public class GibberishAccountRegistrationWizard firstWizardPage = new FirstWizardPage(this); return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java index c32b5cc..822433a 100644 --- a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java @@ -22,7 +22,7 @@ import org.osgi.framework.*; * @author Yana Stamcheva */ public class IcqAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { /** * The logger. @@ -34,12 +34,8 @@ public class IcqAccountRegistrationWizard private IcqAccountRegistration registration = new IcqAccountRegistration(); - private WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>IcqAccountRegistrationWizard</tt>. * @@ -47,9 +43,9 @@ public class IcqAccountRegistrationWizard */ public IcqAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer + wizardContainer .setFinishButtonText(Resources.getString("service.gui.SIGN_IN")); } @@ -197,12 +193,12 @@ public class IcqAccountRegistrationWizard accountProperties.put(ProtocolProviderFactory.PASSWORD, passwd); } - if (isModification) + if (isModification()) { providerFactory.modifyAccount( protocolProvider, accountProperties); - this.isModification = false; + setModification(false); return protocolProvider; } @@ -248,7 +244,7 @@ public class IcqAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -258,28 +254,6 @@ public class IcqAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -319,18 +293,6 @@ public class IcqAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -342,20 +304,6 @@ public class IcqAccountRegistrationWizard } /** - * Indicates whether this wizard enables the simple "sign in" form shown - * when the user opens the application for the first time. The simple - * "sign in" form allows user to configure her account in one click, just - * specifying her username and password and leaving any other configuration - * as by default. - * @return <code>true</code> if the simple "Sign in" form is enabled or - * <code>false</code> otherwise. - */ - public boolean isSimpleFormEnabled() - { - return true; - } - - /** * Opens the browser on the account registration page. */ public void webSignup() @@ -390,11 +338,4 @@ public class IcqAccountRegistrationWizard return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java index ddcaec3..112fc8c 100644 --- a/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java @@ -23,7 +23,7 @@ import net.java.sip.communicator.util.*; * @author Lionel Ferreira & Michael Tarantino */ public class IrcAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private final Logger logger = Logger.getLogger(IrcAccountRegistrationWizard.class); @@ -40,12 +40,8 @@ public class IrcAccountRegistrationWizard private IrcAccountRegistration registration = new IrcAccountRegistration(); - private WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>IrcAccountRegistrationWizard</tt>. * @param wizardContainer the wizard container, where this wizard @@ -53,9 +49,10 @@ public class IrcAccountRegistrationWizard */ public IrcAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer.setFinishButtonText(Resources.getString("service.gui.SIGN_IN")); + wizardContainer.setFinishButtonText( + Resources.getString("service.gui.SIGN_IN")); } /** @@ -223,11 +220,11 @@ public class IrcAccountRegistrationWizard ProtocolProviderFactory.NO_PASSWORD_REQUIRED, new Boolean(!registration.isRequiredPassword()).toString()); - if (isModification) + if (isModification()) { providerFactory.uninstallAccount(protocolProvider.getAccountID()); this.protocolProvider = null; - this.isModification = false; + setModification(false); } try @@ -270,7 +267,7 @@ public class IrcAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -280,28 +277,6 @@ public class IrcAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -321,7 +296,7 @@ public class IrcAccountRegistrationWizard { return new Dimension(600, 500); } - + /** * Returns the identifier of the page to show first in the wizard. * @return the identifier of the page to show first in the wizard. @@ -341,18 +316,6 @@ public class IrcAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -378,26 +341,6 @@ public class IrcAccountRegistrationWizard } /** - * Nothing to do here in the case of IRC. - */ - public void webSignup() - { - throw new UnsupportedOperationException( - "The web sign up is not supproted by the IRC wizard."); - } - - /** - * Returns <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise. - * @return <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise - */ - public boolean isWebSignupSupported() - { - return false; - } - - /** * Returns a simple account registration form that would be the first form * shown to the user. Only if the user needs more settings she'll choose * to open the advanced wizard, consisted by all pages. @@ -412,11 +355,4 @@ public class IrcAccountRegistrationWizard return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java index 218624b..e7f2a35 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java @@ -24,7 +24,7 @@ import org.osgi.framework.*; * @author Yana Stamcheva */ public class JabberAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { /** * The logger. @@ -54,30 +54,20 @@ public class JabberAccountRegistrationWizard private JabberAccountRegistration registration; /** - * The parent wizard container. - */ - private final WizardContainer wizardContainer; - - /** * The <tt>ProtocolProviderService</tt> of this account. */ private ProtocolProviderService protocolProvider; /** - * If the account has been modified. - */ - private boolean isModification; - - /** * Creates an instance of <tt>JabberAccountRegistrationWizard</tt>. * @param wizardContainer the wizard container, where this wizard * is added */ public JabberAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer + wizardContainer .setFinishButtonText(Resources.getString("service.gui.SIGN_IN")); } @@ -277,6 +267,8 @@ public class JabberAccountRegistrationWizard Hashtable<String, String> accountProperties = new Hashtable<String, String>(); + accountProperties.put(ProtocolProviderFactory.IS_PREFERRED_PROTOCOL, + Boolean.toString(isPreferredProtocol())); accountProperties.put(ProtocolProviderFactory.PROTOCOL, getProtocol()); String protocolIconPath = getProtocolIconPath(); if (protocolIconPath != null) @@ -385,12 +377,12 @@ public class JabberAccountRegistrationWizard accountProperties.put(ProtocolProviderFactory.IS_USE_UPNP, String.valueOf(registration.isUseUPNP())); - if (isModification) + if (isModification()) { providerFactory.modifyAccount( protocolProvider, accountProperties); - this.isModification = false; + setModification(false); return protocolProvider; } @@ -451,7 +443,7 @@ public class JabberAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -461,28 +453,6 @@ public class JabberAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -525,18 +495,6 @@ public class JabberAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -548,17 +506,6 @@ public class JabberAccountRegistrationWizard } /** - * Enables the simple "Sign in" form. - * - * @return <tt>true</tt> if the simple form is enabled and <tt>false</tt> - * otherwise. - */ - public boolean isSimpleFormEnabled() - { - return true; - } - - /** * Parse the server part from the jabber id and set it to server as default * value. If Advanced option is enabled Do nothing. * @@ -714,11 +661,4 @@ public class JabberAccountRegistrationWizard { return null; } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} }
\ No newline at end of file diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java index 8eb4ec9..734d8f8 100644 --- a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java @@ -22,7 +22,7 @@ import org.osgi.framework.*; * @author Yana Stamcheva */ public class MsnAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private final Logger logger = Logger.getLogger(MsnAccountRegistrationWizard.class); @@ -31,12 +31,8 @@ public class MsnAccountRegistrationWizard private MsnAccountRegistration registration = new MsnAccountRegistration(); - private final WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>MsnAccountRegistrationWizard</tt>. * @@ -44,9 +40,9 @@ public class MsnAccountRegistrationWizard */ public MsnAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer + wizardContainer .setFinishButtonText(Resources.getString("service.gui.SIGN_IN")); } @@ -189,12 +185,12 @@ public class MsnAccountRegistrationWizard accountProperties.put(ProtocolProviderFactory.PASSWORD, passwd); } - if (isModification) + if (isModification()) { providerFactory.modifyAccount( protocolProvider, accountProperties); - this.isModification = false; + setModification(false); return protocolProvider; } @@ -240,7 +236,7 @@ public class MsnAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -250,28 +246,6 @@ public class MsnAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -311,18 +285,6 @@ public class MsnAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -334,20 +296,6 @@ public class MsnAccountRegistrationWizard } /** - * Indicates whether this wizard enables the simple "sign in" form shown - * when the user opens the application for the first time. The simple - * "sign in" form allows user to configure her account in one click, just - * specifying her username and password and leaving any other configuration - * as by default. - * @return <code>true</code> if the simple "Sign in" form is enabled or - * <code>false</code> otherwise. - */ - public boolean isSimpleFormEnabled() - { - return true; - } - - /** * Opens the browser on the registration page for MSN. */ public void webSignup() @@ -381,11 +329,4 @@ public class MsnAccountRegistrationWizard firstWizardPage = new FirstWizardPage(this); return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java index 04b702e..2510aa6 100644 --- a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java @@ -23,7 +23,7 @@ import net.java.sip.communicator.util.*; * @author Emil Ivov */ public class RssAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private final Logger logger = Logger.getLogger(RssAccountRegistrationWizard.class); @@ -40,12 +40,8 @@ public class RssAccountRegistrationWizard private RssAccountRegistration registration = new RssAccountRegistration(); - private final WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>RssAccountRegistrationWizard</tt>. * @param wizardContainer the wizard container, where this wizard @@ -53,9 +49,9 @@ public class RssAccountRegistrationWizard */ public RssAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer + wizardContainer .setFinishButtonText(Resources.getString("service.gui.ACTIVATE")); } @@ -107,7 +103,8 @@ public class RssAccountRegistrationWizard public Iterator<WizardPage> getPages() { java.util.List<WizardPage> pages = new ArrayList<WizardPage>(); - firstWizardPage = new FirstWizardPage(registration, wizardContainer); + firstWizardPage + = new FirstWizardPage(registration, getWizardContainer()); pages.add(firstWizardPage); @@ -226,10 +223,9 @@ public class RssAccountRegistrationWizard public void loadAccount(ProtocolProviderService protocolProvider) { - this.protocolProvider = protocolProvider; - isModification = true; + setModification(true); } /** @@ -261,30 +257,6 @@ public class RssAccountRegistrationWizard } /** - * Indicates if this wizard is modifying an existing account or is creating - * a new one. - * - * @return <code>true</code> to indicate that this wizard is currently in - * modification mode, <code>false</code> - otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -310,26 +282,6 @@ public class RssAccountRegistrationWizard } /** - * Nothing to do for RSS here. - */ - public void webSignup() - { - throw new UnsupportedOperationException( - "The web sign up is not supported by the RSS wizard."); - } - - /** - * Returns <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise. - * @return <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise - */ - public boolean isWebSignupSupported() - { - return false; - } - - /** * Returns a simple account registration form that would be the first form * shown to the user. Only if the user needs more settings she'll choose * to open the advanced wizard, consisted by all pages. @@ -340,14 +292,8 @@ public class RssAccountRegistrationWizard */ public Object getSimpleForm(boolean isCreateAccount) { - firstWizardPage = new FirstWizardPage(registration, wizardContainer); + firstWizardPage + = new FirstWizardPage(registration, getWizardContainer()); return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/Sip2SipAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/Sip2SipAccountRegistrationWizard.java index a6999af..0224e72 100644 --- a/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/Sip2SipAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/Sip2SipAccountRegistrationWizard.java @@ -123,7 +123,6 @@ public class Sip2SipAccountRegistrationWizard .getImageInBytes(PAGE_IMAGE);
}
-
/**
* Implements the <code>AccountRegistrationWizard.getProtocolName</code>
* method. Returns the protocol name for this wizard.
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java index bcb62ed..1f7e32a 100644 --- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java @@ -24,7 +24,7 @@ import org.osgi.framework.*; * @author Grigorii Balutsel */ public class SIPAccountRegistrationWizard - implements ExtendedAccountRegistrationWizard + extends ExtendedAccountRegistrationWizard { /** * The first wizard page. @@ -38,21 +38,11 @@ public class SIPAccountRegistrationWizard = new SIPAccountRegistration(); /** - * The container. - */ - private final WizardContainer wizardContainer; - - /** * The protocol provider. */ private ProtocolProviderService protocolProvider; /** - * Is current wizard run as modification of an existing account. - */ - private boolean isModification; - - /** * The logger. */ private static final Logger logger @@ -65,9 +55,9 @@ public class SIPAccountRegistrationWizard */ public SIPAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer.setFinishButtonText( + wizardContainer.setFinishButtonText( Resources.getString("service.gui.SIGN_IN")); } @@ -522,13 +512,13 @@ public class SIPAccountRegistrationWizard ProtocolProviderFactory.VOICEMAIL_URI, registration.getVoicemailURI()); - if(isModification) + if(isModification()) { accountProperties.put(ProtocolProviderFactory.USER_ID, userName); providerFactory.modifyAccount( protocolProvider, accountProperties); - this.isModification = false; + setModification(false); return protocolProvider; } @@ -573,7 +563,7 @@ public class SIPAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -583,28 +573,6 @@ public class SIPAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -644,18 +612,6 @@ public class SIPAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -667,20 +623,6 @@ public class SIPAccountRegistrationWizard } /** - * Enables the simple "Sign in" form. - * @return <tt>true</tt> to indicate that the simple form is enabled - */ - public boolean isSimpleFormEnabled() - { - return true; - } - - /** - * Sign ups through the web. - */ - public void webSignup() {} - - /** * Returns the name of the web sign up link. * @return the name of the web sign up link */ @@ -690,17 +632,6 @@ public class SIPAccountRegistrationWizard } /** - * Returns <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise. - * @return <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise - */ - public boolean isWebSignupSupported() - { - return true; - } - - /** * Indicates if a sign up form is supported by this wizard. * * @return <tt>true</tt> if a sign up form is supported by this wizard, @@ -819,11 +750,4 @@ public class SIPAccountRegistrationWizard { return Resources.getString("plugin.sipaccregwizz.CREATE_ACCOUNT"); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java index 58e4ed0..6383ff8 100644 --- a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java @@ -32,7 +32,7 @@ import net.java.sip.communicator.util.*; * @author Shobhit Jindal */ public class SSHAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private final Logger logger = Logger.getLogger(SSHAccountRegistrationWizard.class); @@ -41,20 +41,16 @@ public class SSHAccountRegistrationWizard * The first page of the ssh account registration wizard. */ private FirstWizardPage firstWizardPage; - + /** * The object that we use to store details on an account that we will be * creating. */ private SSHAccountRegistration registration = new SSHAccountRegistration(); - - private final WizardContainer wizardContainer; - + private ProtocolProviderService protocolProvider; - - private boolean isModification; - + /** * Creates an instance of <tt>SSHAccountRegistrationWizard</tt>. * @param wizardContainer the wizard container, where this wizard @@ -62,21 +58,22 @@ public class SSHAccountRegistrationWizard */ public SSHAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer.setFinishButtonText( + wizardContainer.setFinishButtonText( Resources.getString("service.gui.SIGN_IN")); } - + /** * Implements the <code>AccountRegistrationWizard.getIcon</code> method. * Returns the icon to be used for this wizard. * @return byte[] */ - public byte[] getIcon() { + public byte[] getIcon() + { return Resources.getImage(Resources.SSH_LOGO); } - + /** * Implements the <code>AccountRegistrationWizard.getPageImage</code> * method. @@ -84,48 +81,54 @@ public class SSHAccountRegistrationWizard * * @return byte[] the image used to decorate the wizard page */ - public byte[] getPageImage() { + public byte[] getPageImage() + { return Resources.getImage(Resources.PAGE_IMAGE); } - + /** * Implements the <code>AccountRegistrationWizard.getProtocolName</code> * method. Returns the protocol name for this wizard. * @return String */ - public String getProtocolName() { + public String getProtocolName() + { return Resources.getString("plugin.sshaccregwizz.PROTOCOL_NAME"); } - + /** * Implements the <code>AccountRegistrationWizard.getProtocolDescription * </code> method. Returns the description of the protocol for this wizard. * @return String */ - public String getProtocolDescription() { + public String getProtocolDescription() + { return Resources.getString("plugin.sshaccregwizz.PROTOCOL_DESCRIPTION"); } - + /** * Returns the set of pages contained in this wizard. * @return Iterator */ - public Iterator<WizardPage> getPages() { + public Iterator<WizardPage> getPages() + { java.util.List<WizardPage> pages = new ArrayList<WizardPage>(); - firstWizardPage = new FirstWizardPage(registration, wizardContainer); - + firstWizardPage + = new FirstWizardPage(registration, getWizardContainer()); + pages.add(firstWizardPage); - + return pages.iterator(); } - + /** * Returns the set of data that user has entered through this wizard. * @return Iterator */ public Iterator<Map.Entry<String, String>> getSummary() { - Hashtable<String, String> summaryTable = new Hashtable<String, String>(); - + Hashtable<String, String> summaryTable + = new Hashtable<String, String>(); + /* * Hashtable arranges the entries alphabetically so the order * of appearance is @@ -133,11 +136,10 @@ public class SSHAccountRegistrationWizard * - Port * - User ID */ - summaryTable.put("Account ID", registration.getAccountID()); summaryTable.put("Known Hosts", registration.getKnownHostsFile()); summaryTable.put("Identity", registration.getIdentityFile()); - + return summaryTable.entrySet().iterator(); } @@ -244,13 +246,13 @@ public class SSHAccountRegistrationWizard * @param protocolProvider The <tt>ProtocolProviderService</tt> to load the * data from. */ - public void loadAccount(ProtocolProviderService protocolProvider) { - + public void loadAccount(ProtocolProviderService protocolProvider) + { this.protocolProvider = protocolProvider; - + this.firstWizardPage.loadAccount(protocolProvider); - - isModification = true; + + setModification(true); } /** @@ -280,30 +282,6 @@ public class SSHAccountRegistrationWizard } /** - * Indicates if this wizard is modifying an existing account or is creating - * a new one. - * - * @return <code>true</code> to indicate that this wizard is currently in - * modification mode, <code>false</code> - otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -329,26 +307,6 @@ public class SSHAccountRegistrationWizard } /** - * Nothing to do here in the case of SSH. - */ - public void webSignup() - { - throw new UnsupportedOperationException( - "The web sign up is not supported by the SSH wizard."); - } - - /** - * Returns <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise. - * @return <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise - */ - public boolean isWebSignupSupported() - { - return false; - } - - /** * Returns a simple account registration form that would be the first form * shown to the user. Only if the user needs more settings she'll choose * to open the advanced wizard, consisted by all pages. @@ -359,14 +317,7 @@ public class SSHAccountRegistrationWizard */ public Object getSimpleForm(boolean isCreateAccount) { - firstWizardPage = new FirstWizardPage(registration, wizardContainer); + firstWizardPage = new FirstWizardPage(registration, getWizardContainer()); return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java index e425520..cebefe6 100644 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java @@ -22,7 +22,7 @@ import org.osgi.framework.*; * @author Yana Stamcheva */ public class YahooAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private final Logger logger = Logger.getLogger(YahooAccountRegistrationWizard.class); @@ -32,12 +32,8 @@ public class YahooAccountRegistrationWizard private YahooAccountRegistration registration = new YahooAccountRegistration(); - private final WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>YahooAccountRegistrationWizard</tt>. * @@ -45,9 +41,9 @@ public class YahooAccountRegistrationWizard */ public YahooAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer + wizardContainer .setFinishButtonText(Resources.getString("service.gui.SIGN_IN")); } @@ -194,12 +190,12 @@ public class YahooAccountRegistrationWizard accountProperties.put(ProtocolProviderFactory.PASSWORD, passwd); } - if (isModification) + if (isModification()) { providerFactory.modifyAccount( protocolProvider, accountProperties); - this.isModification = false; + setModification(false); return protocolProvider; } @@ -245,7 +241,7 @@ public class YahooAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -255,28 +251,6 @@ public class YahooAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -316,18 +290,6 @@ public class YahooAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns an example string, which should indicate to the user how the * user name should look like. * @return an example string, which should indicate to the user how the @@ -339,20 +301,6 @@ public class YahooAccountRegistrationWizard } /** - * Indicates whether this wizard enables the simple "sign in" form shown - * when the user opens the application for the first time. The simple - * "sign in" form allows user to configure her account in one click, just - * specifying her username and password and leaving any other configuration - * as by default. - * @return <code>true</code> if the simple "Sign in" form is enabled or - * <code>false</code> otherwise. - */ - public boolean isSimpleFormEnabled() - { - return true; - } - - /** * Defines the operation that will be executed when user clicks on the * "Sign up" link. * @throws UnsupportedOperationException if the web sign up operation is @@ -390,11 +338,4 @@ public class YahooAccountRegistrationWizard return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java index 947f750..ae08991 100644 --- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java @@ -24,7 +24,7 @@ import net.java.sip.communicator.util.*; * @author Maxime Catelin */ public class ZeroconfAccountRegistrationWizard - implements AccountRegistrationWizard + extends AccountRegistrationWizard { private Logger logger = Logger.getLogger(ZeroconfAccountRegistrationWizard.class); @@ -41,12 +41,8 @@ public class ZeroconfAccountRegistrationWizard private ZeroconfAccountRegistration registration = new ZeroconfAccountRegistration(); - private final WizardContainer wizardContainer; - private ProtocolProviderService protocolProvider; - private boolean isModification; - /** * Creates an instance of <tt>ZeroconfAccountRegistrationWizard</tt>. * @param wizardContainer the wizard container, where this wizard @@ -54,9 +50,9 @@ public class ZeroconfAccountRegistrationWizard */ public ZeroconfAccountRegistrationWizard(WizardContainer wizardContainer) { - this.wizardContainer = wizardContainer; + setWizardContainer(wizardContainer); - this.wizardContainer + wizardContainer .setFinishButtonText(Resources.getString("service.gui.SIGN_IN")); } @@ -206,11 +202,11 @@ public class ZeroconfAccountRegistrationWizard accountProperties.put("rememberContacts", new Boolean(registration.isRememberContacts()).toString()); - if (isModification) + if (isModification()) { providerFactory.uninstallAccount(protocolProvider.getAccountID()); this.protocolProvider = null; - this.isModification = false; + setModification(false); } try @@ -254,7 +250,7 @@ public class ZeroconfAccountRegistrationWizard */ public void loadAccount(ProtocolProviderService protocolProvider) { - this.isModification = true; + setModification(true); this.protocolProvider = protocolProvider; @@ -264,28 +260,6 @@ public class ZeroconfAccountRegistrationWizard } /** - * Indicates if this wizard is opened for modification or for creating a - * new account. - * - * @return <code>true</code> if this wizard is opened for modification and - * <code>false</code> otherwise. - */ - public boolean isModification() - { - return isModification; - } - - /** - * Returns the wizard container, where all pages are added. - * - * @return the wizard container, where all pages are added - */ - public WizardContainer getWizardContainer() - { - return wizardContainer; - } - - /** * Returns the registration object, which will store all the data through * the wizard. * @@ -325,18 +299,6 @@ public class ZeroconfAccountRegistrationWizard } /** - * Sets the modification property to indicate if this wizard is opened for - * a modification. - * - * @param isModification indicates if this wizard is opened for modification - * or for creating a new account. - */ - public void setModification(boolean isModification) - { - this.isModification = isModification; - } - - /** * Returns the password label for the simplified account registration form. * @return the password label for the simplified account registration form. */ @@ -383,26 +345,6 @@ public class ZeroconfAccountRegistrationWizard } /** - * Nothing to do here in the case of Bonjour. - */ - public void webSignup() - { - throw new UnsupportedOperationException( - "The web sign up is not supported by the Zeroconf wizard."); - } - - /** - * Returns <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise. - * @return <code>true</code> if the web sign up is supported by the current - * implementation, <code>false</code> - otherwise - */ - public boolean isWebSignupSupported() - { - return false; - } - - /** * Returns a simple account registration form that would be the first form * shown to the user. Only if the user needs more settings she'll choose * to open the advanced wizard, consisted by all pages. @@ -421,11 +363,4 @@ public class ZeroconfAccountRegistrationWizard firstWizardPage = new FirstWizardPage(this); return firstWizardPage.getSimpleForm(); } - - /** - * Indicates that the account corresponding to the given - * <tt>protocolProvider</tt> has been removed. - * @param protocolProvider the protocol provider that has been removed - */ - public void accountRemoved(ProtocolProviderService protocolProvider) {} } diff --git a/src/net/java/sip/communicator/service/gui/AccountRegistrationWizard.java b/src/net/java/sip/communicator/service/gui/AccountRegistrationWizard.java index c1bf3bc..c7bfa3e 100644 --- a/src/net/java/sip/communicator/service/gui/AccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/service/gui/AccountRegistrationWizard.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.service.gui; import java.awt.*; import java.util.*; +import net.java.sip.communicator.service.gui.internal.*; import net.java.sip.communicator.service.protocol.*; /** @@ -28,29 +29,36 @@ import net.java.sip.communicator.service.protocol.*; * * @author Yana Stamcheva */ -public interface AccountRegistrationWizard +public abstract class AccountRegistrationWizard { /** + * Is current wizard run as modification of an existing account. + */ + private boolean isModification; + + private WizardContainer wizardContainer; + + /** * Returns the protocol icon that will be shown on the left of the protocol * name in the list, where user will choose the protocol to register to. * * @return a short description of the protocol. */ - public byte[] getIcon(); + public abstract byte[] getIcon(); /** * Returns the image that will be shown on the left of the wizard pages. * @return the image that will be shown on the left of the wizard pages */ - public byte[] getPageImage(); + public abstract byte[] getPageImage(); /** - * Returns the protocol name that will be shown in the list, where user - * will choose the protocol to register to. + * Returns the protocol display name that will be shown in the list, + * where user will choose the protocol to register to. * * @return the protocol name. */ - public String getProtocolName(); + public abstract String getProtocolName(); /** * Returns a short description of the protocol that will be shown on the @@ -59,7 +67,7 @@ public interface AccountRegistrationWizard * * @return a short description of the protocol. */ - public String getProtocolDescription(); + public abstract String getProtocolDescription(); /** * Returns an example string, which should indicate to the user how the @@ -67,7 +75,7 @@ public interface AccountRegistrationWizard * @return an example string, which should indicate to the user how the * user name should look like. */ - public String getUserNameExample(); + public abstract String getUserNameExample(); /** * Loads all data concerning the given <tt>ProtocolProviderService</tt>. @@ -77,7 +85,7 @@ public interface AccountRegistrationWizard * @param protocolProvider The <tt>ProtocolProviderService</tt> to * load data from. */ - public void loadAccount(ProtocolProviderService protocolProvider); + public abstract void loadAccount(ProtocolProviderService protocolProvider); /** * Returns the set of <tt>WizardPage</tt>-s for this @@ -86,7 +94,7 @@ public interface AccountRegistrationWizard * @return the set of <tt>WizardPage</tt>-s for this * wizard. */ - public Iterator<WizardPage> getPages(); + public abstract Iterator<WizardPage> getPages(); /** * Returns the identifier of the first account registration wizard page. @@ -95,7 +103,7 @@ public interface AccountRegistrationWizard * * @return the identifier of the first account registration wizard page */ - public Object getFirstPageIdentifier(); + public abstract Object getFirstPageIdentifier(); /** * Returns the identifier of the last account registration wizard page. This @@ -104,7 +112,7 @@ public interface AccountRegistrationWizard * * @return the identifier of the last account registration wizard page */ - public Object getLastPageIdentifier(); + public abstract Object getLastPageIdentifier(); /** * Returns a set of key-value pairs that will represent the summary for @@ -113,7 +121,7 @@ public interface AccountRegistrationWizard * @return a set of key-value pairs that will represent the summary for * this wizard. */ - public Iterator<Map.Entry<String, String>> getSummary(); + public abstract Iterator<Map.Entry<String, String>> getSummary(); /** * Defines the operations that will be executed when the user clicks on @@ -122,7 +130,7 @@ public interface AccountRegistrationWizard * new account * @throws OperationFailedException if the operation didn't succeed */ - public ProtocolProviderService signin() + public abstract ProtocolProviderService signin() throws OperationFailedException; /** @@ -135,7 +143,7 @@ public interface AccountRegistrationWizard * new account * @throws OperationFailedException if the operation didn't succeed */ - public ProtocolProviderService signin( String userName, + public abstract ProtocolProviderService signin( String userName, String password) throws OperationFailedException; @@ -144,7 +152,7 @@ public interface AccountRegistrationWizard * <tt>protocolProvider</tt> has been removed. * @param protocolProvider the protocol provider that has been removed */ - public void accountRemoved(ProtocolProviderService protocolProvider); + public void accountRemoved(ProtocolProviderService protocolProvider) {} /** * Returns <code>true</code> if the web sign up is supported by the current @@ -152,7 +160,10 @@ public interface AccountRegistrationWizard * @return <code>true</code> if the web sign up is supported by the current * implementation, <code>false</code> - otherwise */ - public boolean isWebSignupSupported(); + public boolean isWebSignupSupported() + { + return false; + } /** * Defines the operation that will be executed when user clicks on the @@ -161,14 +172,25 @@ public interface AccountRegistrationWizard * @throws UnsupportedOperationException if the web sign up operation is * not supported by the current implementation. */ - public void webSignup() throws UnsupportedOperationException; + public void webSignup() throws UnsupportedOperationException {} /** * Returns the preferred dimensions of this wizard. * * @return the preferred dimensions of this wizard. */ - public Dimension getSize(); + public abstract Dimension getSize(); + + /** + * Returns a simple account registration form that would be the first form + * shown to the user. Only if the user needs more settings she'll choose + * to open the advanced wizard, consisted by all pages. + * + * @param isCreateAccount indicates if the simple form should be opened as + * a create account form or as a login form + * @return a simple account registration form + */ + public abstract Object getSimpleForm(boolean isCreateAccount); /** * Sets the modification property to indicate if this wizard is opened for @@ -177,7 +199,10 @@ public interface AccountRegistrationWizard * @param isModification indicates if this wizard is opened for modification * or for creating a new account. */ - public void setModification(boolean isModification); + public void setModification(boolean isModification) + { + this.isModification = isModification; + } /** * Indicates if this wizard is modifying an existing account or is creating @@ -186,7 +211,10 @@ public interface AccountRegistrationWizard * @return <code>true</code> to indicate that this wizard is currently in * modification mode, <code>false</code> - otherwise. */ - public boolean isModification(); + public boolean isModification() + { + return isModification; + } /** * Indicates whether this wizard enables the simple "sign in" form shown @@ -197,16 +225,48 @@ public interface AccountRegistrationWizard * @return <code>true</code> if the simple "Sign in" form is enabled or * <code>false</code> otherwise. */ - public boolean isSimpleFormEnabled(); + public boolean isSimpleFormEnabled() + { + return true; + } /** - * Returns a simple account registration form that would be the first form - * shown to the user. Only if the user needs more settings she'll choose - * to open the advanced wizard, consisted by all pages. + * Returns the wizard container, where all pages are added. + * + * @return the wizard container, where all pages are added + */ + public WizardContainer getWizardContainer() + { + return wizardContainer; + } + + /** + * Sets the wizard container, where all pages are added. + * + * @param wizardContainer the wizard container, where all pages are added + */ + protected void setWizardContainer(WizardContainer wizardContainer) + { + this.wizardContainer = wizardContainer; + } + + /** + * Indicates if this wizard is for the preferred protocol. * - * @param isCreateAccount indicates if the simple form should be opened as - * a create account form or as a login form - * @return a simple account registration form + * @return <tt>true</tt> if this wizard corresponds to the preferred + * protocol, otherwise returns <tt>false</tt> */ - public Object getSimpleForm(boolean isCreateAccount); + public boolean isPreferredProtocol() + { + // Check for preferred account through the PREFERRED_ACCOUNT_WIZARD + // property. + String prefWName = GuiServiceActivator.getResources(). + getSettingsString("impl.gui.PREFERRED_ACCOUNT_WIZARD"); + + if(prefWName != null && prefWName.length() > 0 + && prefWName.equals(this.getClass().getName())) + return true; + + return false; + } } diff --git a/src/net/java/sip/communicator/service/gui/ExtendedAccountRegistrationWizard.java b/src/net/java/sip/communicator/service/gui/ExtendedAccountRegistrationWizard.java index 162f791..a32094a 100644 --- a/src/net/java/sip/communicator/service/gui/ExtendedAccountRegistrationWizard.java +++ b/src/net/java/sip/communicator/service/gui/ExtendedAccountRegistrationWizard.java @@ -11,7 +11,7 @@ package net.java.sip.communicator.service.gui; * * @author Yana Stamcheva */ -public interface ExtendedAccountRegistrationWizard +public abstract class ExtendedAccountRegistrationWizard extends AccountRegistrationWizard { /** @@ -20,10 +20,10 @@ public interface ExtendedAccountRegistrationWizard * @return <tt>true</tt> if a sign up form is supported by this wizard, * <tt>false</tt> - otherwise */ - public boolean isSignupSupported(); + public abstract boolean isSignupSupported(); /** * Sets the create account view of this registration wizard. */ - public void setCreateAccountView(); + public abstract void setCreateAccountView(); } diff --git a/src/net/java/sip/communicator/service/gui/gui.manifest.mf b/src/net/java/sip/communicator/service/gui/gui.manifest.mf index c33ba57..e35b3ec 100644 --- a/src/net/java/sip/communicator/service/gui/gui.manifest.mf +++ b/src/net/java/sip/communicator/service/gui/gui.manifest.mf @@ -5,7 +5,8 @@ Bundle-Vendor: sip-communicator.org Bundle-Version: 0.0.1 System-Bundle: yes Import-Package: org.osgi.framework, - net.java.sip.communicator.service.resources + net.java.sip.communicator.service.resources, + net.java.sip.communicator.util Export-Package: net.java.sip.communicator.service.gui, net.java.sip.communicator.service.gui.event, net.java.sip.communicator.service.shutdown diff --git a/src/net/java/sip/communicator/service/gui/internal/GuiServiceActivator.java b/src/net/java/sip/communicator/service/gui/internal/GuiServiceActivator.java index 008d523..dc07df5 100644 --- a/src/net/java/sip/communicator/service/gui/internal/GuiServiceActivator.java +++ b/src/net/java/sip/communicator/service/gui/internal/GuiServiceActivator.java @@ -5,10 +5,14 @@ */
package net.java.sip.communicator.service.gui.internal;
+import net.java.sip.communicator.service.resources.*;
+import net.java.sip.communicator.util.*;
+
import org.osgi.framework.*;
/**
* @author Lubomir Marinov
+ * @author Yana Stamcheva
*/
public class GuiServiceActivator
implements BundleActivator
@@ -19,6 +23,12 @@ public class GuiServiceActivator private static BundleContext bundleContext;
/**
+ * The <tt>ResourceManagementService</tt>, which gives access to application
+ * resources.
+ */
+ private static ResourceManagementService resourceService;
+
+ /**
* Returns the <tt>BundleContext</tt>.
*
* @return bundle context
@@ -48,4 +58,23 @@ public class GuiServiceActivator if (GuiServiceActivator.bundleContext == bundleContext)
GuiServiceActivator.bundleContext = null;
}
+
+ /**
+ * Returns the <tt>ResourceManagementService</tt>, through which we will
+ * access all resources.
+ *
+ * @return the <tt>ResourceManagementService</tt>, through which we will
+ * access all resources.
+ */
+ public static ResourceManagementService getResources()
+ {
+ if (resourceService == null)
+ {
+ resourceService
+ = ServiceUtils.getService(
+ bundleContext,
+ ResourceManagementService.class);
+ }
+ return resourceService;
+ }
}
diff --git a/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java b/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java index 4736ace..411e513 100644 --- a/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java +++ b/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java @@ -264,6 +264,11 @@ public abstract class ProtocolProviderFactory public static final String IS_PROTOCOL_HIDDEN = "IS_PROTOCOL_HIDDEN"; /** + * Indicates if the given account is the preferred account. + */ + public static final String IS_PREFERRED_PROTOCOL = "IS_PREFERRED_PROTOCOL"; + + /** * The name of the property that would indicate if a given account is * currently enabled or disabled. */ |