diff options
Diffstat (limited to 'src/net/java/sip/communicator/plugin/yahooaccregwizz')
6 files changed, 0 insertions, 1027 deletions
diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java deleted file mode 100644 index 27e32c6..0000000 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Jitsi, the OpenSource Java VoIP and Instant Messaging client. - * - * Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.java.sip.communicator.plugin.yahooaccregwizz; - -import java.awt.*; - -import javax.swing.*; -import javax.swing.event.*; - -import net.java.sip.communicator.service.gui.*; -import net.java.sip.communicator.service.protocol.*; -import net.java.sip.communicator.plugin.desktoputil.*; - -/** - * The <tt>FirstWizardPage</tt> is the page, where user could enter the uin - * and the password of the account. - * - * @author Yana Stamcheva - * @author Damian Minkov - */ -public class FirstWizardPage - extends TransparentPanel - implements WizardPage, - DocumentListener -{ - /** - * Serial version UID. - */ - private static final long serialVersionUID = 0L; - - public static final String FIRST_PAGE_IDENTIFIER = "FirstPageIdentifier"; - - public static final String USER_NAME_EXAMPLE - = "Ex: johnsmith@yahoo.com or johnsmith"; - - private JPanel uinPassPanel = new TransparentPanel(new BorderLayout(10, 10)); - - private JPanel labelsPanel = new TransparentPanel(); - - private JPanel valuesPanel = new TransparentPanel(); - - private JLabel uinLabel = new JLabel( - Resources.getString("plugin.yahooaccregwizz.USERNAME")); - - private JLabel passLabel - = new JLabel(Resources.getString("service.gui.PASSWORD")); - - private JPanel emptyPanel = new TransparentPanel(); - - private JLabel uinExampleLabel = new JLabel(USER_NAME_EXAMPLE); - - private JTextField userIDField = new TrimTextField(); - - private JPasswordField passField = new JPasswordField(); - - private JCheckBox rememberPassBox = - new SIPCommCheckBox( - Resources.getString("service.gui.REMEMBER_PASSWORD")); - - private JPanel mainPanel = new TransparentPanel(); - - private Object nextPageIdentifier = WizardPage.SUMMARY_PAGE_IDENTIFIER; - - private YahooAccountRegistrationWizard wizard; - - private boolean isCommitted = false; - - /** - * Creates an instance of <tt>FirstWizardPage</tt>. - * - * @param wizard the parent wizard - */ - public FirstWizardPage(YahooAccountRegistrationWizard wizard) - { - - super(new BorderLayout()); - - this.wizard = wizard; - - mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); - - this.init(); - - this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - - this.labelsPanel - .setLayout(new BoxLayout(labelsPanel, BoxLayout.Y_AXIS)); - - this.valuesPanel - .setLayout(new BoxLayout(valuesPanel, BoxLayout.Y_AXIS)); - } - - /** - * Initializes all panels, buttons, etc. - */ - private void init() - { - this.mainPanel.setOpaque(false); - this.labelsPanel.setOpaque(false); - this.valuesPanel.setOpaque(false); - this.uinPassPanel.setOpaque(false); - this.emptyPanel.setOpaque(false); - - this.userIDField.getDocument().addDocumentListener(this); - this.rememberPassBox.setSelected(true); - - this.uinExampleLabel.setForeground(Color.GRAY); - this.uinExampleLabel.setFont(uinExampleLabel.getFont().deriveFont(8)); - this.emptyPanel.setMaximumSize(new Dimension(40, 35)); - this.uinExampleLabel.setBorder( - BorderFactory.createEmptyBorder(0, 0, 8, 0)); - - labelsPanel.add(uinLabel); - labelsPanel.add(emptyPanel); - labelsPanel.add(passLabel); - - valuesPanel.add(userIDField); - valuesPanel.add(uinExampleLabel); - valuesPanel.add(passField); - - uinPassPanel.add(labelsPanel, BorderLayout.WEST); - uinPassPanel.add(valuesPanel, BorderLayout.CENTER); - uinPassPanel.add(rememberPassBox, BorderLayout.SOUTH); - - uinPassPanel.setBorder(BorderFactory.createTitledBorder(Resources - .getString("plugin.yahooaccregwizz.USERID_AND_PASSWORD"))); - - mainPanel.add(uinPassPanel); - this.add(mainPanel, BorderLayout.NORTH); - } - - /** - * Implements the <code>WizardPage.getIdentifier</code> to return this - * page identifier. - */ - public Object getIdentifier() - { - return FIRST_PAGE_IDENTIFIER; - } - - /** - * Implements the <code>WizardPage.getNextPageIdentifier</code> to return - * the next page identifier - the summary page. - */ - public Object getNextPageIdentifier() - { - return nextPageIdentifier; - } - - /** - * Implements the <code>WizardPage.getBackPageIdentifier</code> to return - * the back identifier. In this case it's null because this is the first - * wizard page. - * @return the identifier of the previous wizard page - */ - public Object getBackPageIdentifier() - { - return null; - } - - /** - * Implements the <code>WizardPage.getWizardForm</code> to return this - * panel. - */ - public Object getWizardForm() - { - return this; - } - - /** - * Before this page is displayed enables or disables the "Next" wizard - * button according to whether the UIN field is empty. - */ - public void pageShowing() - { - this.setNextButtonAccordingToUIN(); - } - - /** - * Saves the user input when the "Next" wizard buttons is clicked. - */ - public void commitPage() - { - YahooAccountRegistration registration = wizard.getRegistration(); - - String userID = userIDField.getText(); - - if(userID == null || userID.trim().length() == 0) - throw new IllegalStateException("No user ID provided."); - - registration.setUserID(userID); - registration.setPassword(new String(passField.getPassword())); - registration.setRememberPassword(rememberPassBox.isSelected()); - - nextPageIdentifier = SUMMARY_PAGE_IDENTIFIER; - - isCommitted = true; - } - - /** - * Enables or disables the "Next" wizard button according to whether the UIN - * field is empty. - */ - private void setNextButtonAccordingToUIN() - { - if (userIDField.getText() == null || userIDField.getText().equals("")) - { - wizard.getWizardContainer().setNextFinishButtonEnabled(false); - } - else - { - wizard.getWizardContainer().setNextFinishButtonEnabled(true); - } - } - - /** - * Handles the <tt>DocumentEvent</tt> triggered when user types in the UIN - * field. Enables or disables the "Next" wizard button according to whether - * the UIN field is empty. - */ - public void insertUpdate(DocumentEvent e) - { - this.setNextButtonAccordingToUIN(); - } - - /** - * Handles the <tt>DocumentEvent</tt> triggered when user deletes letters - * from the UIN field. Enables or disables the "Next" wizard button - * according to whether the UIN field is empty. - */ - public void removeUpdate(DocumentEvent e) - { - this.setNextButtonAccordingToUIN(); - } - - public void changedUpdate(DocumentEvent e) - { - } - - public void pageHiding() - { - } - - public void pageShown() - { - } - - public void pageBack() - { - } - - /** - * Fills the UIN and Password fields in this panel with the data coming - * from the given protocolProvider. - * - * @param protocolProvider The <tt>ProtocolProviderService</tt> to load - * the data from. - */ - public void loadAccount(ProtocolProviderService protocolProvider) - { - AccountID accountID = protocolProvider.getAccountID(); - String password = YahooAccRegWizzActivator - .getYahooProtocolProviderFactory().loadPassword(accountID); - - this.userIDField.setEnabled(false); - this.userIDField.setText(accountID.getUserID()); - - if (password != null) - { - this.passField.setText(password); - this.rememberPassBox.setSelected(true); - } - } - - public Object getSimpleForm() - { - return uinPassPanel; - } - - public boolean isCommitted() - { - return isCommitted; - } -} diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java deleted file mode 100644 index c41a72f..0000000 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Jitsi, the OpenSource Java VoIP and Instant Messaging client. - * - * Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.java.sip.communicator.plugin.yahooaccregwizz; - -import net.java.sip.communicator.service.resources.*; - -import org.jitsi.service.resources.*; - -/** - * The <tt>Resources</tt> class manages the access to the internationalization - * properties files and the image resources used in this plugin. - * - * @author Yana Stamcheva - */ -public class Resources -{ - private static ResourceManagementService resourcesService; - - public static ImageID YAHOO_LOGO - = new ImageID("service.protocol.yahoo.YAHOO_16x16"); - - public static ImageID PAGE_IMAGE - = new ImageID("service.protocol.yahoo.YAHOO_64x64"); - - /** - * Returns an internationalized string corresponding to the given key. - * @param key The key of the string. - * @return An internationalized string corresponding to the given key. - */ - public static String getString(String key) - { - return getResources().getI18NString(key); - } - - /** - * Loads an image from a given image identifier. - * @param imageID The identifier of the image. - * @return The image for the given identifier. - */ - public static byte[] getImage(ImageID imageID) - { - return getResources().getImageInBytes(imageID.getId()); - } - - /** - * Returns the <tt>ResourceManagementService</tt>. - * - * @return the <tt>ResourceManagementService</tt>. - */ - public static ResourceManagementService getResources() - { - if (resourcesService == null) - resourcesService = - ResourceManagementServiceUtils - .getService(YahooAccRegWizzActivator.bundleContext); - return resourcesService; - } -} diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java deleted file mode 100644 index cd526a9..0000000 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Jitsi, the OpenSource Java VoIP and Instant Messaging client. - * - * Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.java.sip.communicator.plugin.yahooaccregwizz; - -import java.util.*; - -import net.java.sip.communicator.service.browserlauncher.*; -import net.java.sip.communicator.service.gui.*; -import net.java.sip.communicator.service.protocol.*; -import net.java.sip.communicator.util.*; - -import org.osgi.framework.*; - -/** - * Registers the <tt>YahooAccountRegistrationWizard</tt> in the UI Service. - * - * @author Yana Stamcheva - */ -public class YahooAccRegWizzActivator - extends AbstractServiceDependentActivator -{ - /** - * OSGi bundle context. - */ - public static BundleContext bundleContext; - - private static final Logger logger = - Logger.getLogger(YahooAccRegWizzActivator.class); - - private static BrowserLauncherService browserLauncherService; - - private static WizardContainer wizardContainer; - - private static YahooAccountRegistrationWizard yahooWizard; - - private static UIService uiService; - - /** - * Starts this bundle. - */ - @Override - public void start(Object dependentService) - { - uiService = (UIService)dependentService; - - wizardContainer = uiService.getAccountRegWizardContainer(); - - yahooWizard = new YahooAccountRegistrationWizard(wizardContainer); - - Hashtable<String, String> containerFilter - = new Hashtable<String, String>(); - - containerFilter.put( - ProtocolProviderFactory.PROTOCOL, - ProtocolNames.YAHOO); - - bundleContext.registerService( - AccountRegistrationWizard.class.getName(), - yahooWizard, - containerFilter); - } - - /** - * The dependent class. We are waiting for the ui service. - * @return the ui service class. - */ - @Override - public Class<?> getDependentServiceClass() - { - return UIService.class; - } - - /** - * The bundle context to use. - * @param context the context to set. - */ - @Override - public void setBundleContext(BundleContext context) - { - bundleContext = context; - } - - public void stop(BundleContext bundleContext) throws Exception - { - } - - /** - * Returns the <tt>ProtocolProviderFactory</tt> for the Yahoo protocol. - * @return the <tt>ProtocolProviderFactory</tt> for the Yahoo protocol - */ - public static ProtocolProviderFactory getYahooProtocolProviderFactory() - { - ServiceReference[] serRefs = null; - String osgiFilter - = "(" - + ProtocolProviderFactory.PROTOCOL - + "=" - + ProtocolNames.YAHOO - + ")"; - - try { - serRefs - = bundleContext.getServiceReferences( - ProtocolProviderFactory.class.getName(), - osgiFilter); - } - catch (InvalidSyntaxException ex){ - logger.error("YahooAccRegWizzActivator : " + ex); - } - - return - (serRefs == null) - ? null - : (ProtocolProviderFactory) - bundleContext.getService(serRefs[0]); - } - - /** - * Returns the <tt>UIService</tt>. - * - * @return the <tt>UIService</tt> - */ - public static UIService getUIService() - { - return uiService; - } - - /** - * Returns the <tt>BrowserLauncherService</tt> obtained from the bundle - * context. - * @return the <tt>BrowserLauncherService</tt> obtained from the bundle - * context - */ - public static BrowserLauncherService getBrowserLauncher() { - if (browserLauncherService == null) { - ServiceReference serviceReference = bundleContext - .getServiceReference(BrowserLauncherService.class.getName()); - - browserLauncherService = (BrowserLauncherService) bundleContext - .getService(serviceReference); - } - - return browserLauncherService; - } -} diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistration.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistration.java deleted file mode 100644 index 6cf7759..0000000 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistration.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Jitsi, the OpenSource Java VoIP and Instant Messaging client. - * - * Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.java.sip.communicator.plugin.yahooaccregwizz; - -/** - * The <tt>YahooAccountRegistration</tt> is used to store all user input data - * through the <tt>YahooAccountRegistrationWizard</tt>. - * - * @author Yana Stamcheva - */ -public class YahooAccountRegistration { - - private String uin; - - private String password; - - private boolean rememberPassword = true; - - /** - * Returns the password of the yahoo registration account. - * @return the password of the yahoo registration account. - */ - public String getPassword() { - return password; - } - - /** - * Sets the password of the yahoo registration account. - * @param password the password of the yahoo registration account. - */ - public void setPassword(String password) { - this.password = password; - } - - /** - * Returns TRUE if password has to remembered, FALSE otherwise. - * @return TRUE if password has to remembered, FALSE otherwise - */ - public boolean isRememberPassword() { - return rememberPassword; - } - - /** - * Sets the rememberPassword value of this yahoo account registration. - * @param rememberPassword TRUE if password has to remembered, FALSE - * otherwise - */ - public void setRememberPassword(boolean rememberPassword) { - this.rememberPassword = rememberPassword; - } - - /** - * Returns the UIN of the yahoo registration account. - * @return the UIN of the yahoo registration account. - */ - public String getUin() { - return uin; - } - - /** - * Sets the UIN of the yahoo registration account. - * @param uin the UIN of the yahoo registration account. - */ - public void setUserID(String uin) { - this.uin = uin; - } - -} diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java deleted file mode 100644 index 033f409..0000000 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Jitsi, the OpenSource Java VoIP and Instant Messaging client. - * - * Copyright @ 2015 Atlassian Pty Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.java.sip.communicator.plugin.yahooaccregwizz; - -import java.awt.*; -import java.util.*; - -import net.java.sip.communicator.service.gui.*; -import net.java.sip.communicator.service.protocol.*; -import net.java.sip.communicator.util.*; - -import org.osgi.framework.*; - -/** - * The <tt>YahooAccountRegistrationWizard</tt> is an implementation of the - * <tt>AccountRegistrationWizard</tt> for the Yahoo protocol. It should allow - * the user to create and configure a new Yahoo account. - * - * @author Yana Stamcheva - */ -public class YahooAccountRegistrationWizard - extends DesktopAccountRegistrationWizard -{ - private final Logger logger - = Logger.getLogger(YahooAccountRegistrationWizard.class); - - private FirstWizardPage firstWizardPage; - - private YahooAccountRegistration registration = - new YahooAccountRegistration(); - - private ProtocolProviderService protocolProvider; - - /** - * Creates an instance of <tt>YahooAccountRegistrationWizard</tt>. - * - * @param wizardContainer the wizard container, where this wizard is added - */ - public YahooAccountRegistrationWizard(WizardContainer wizardContainer) - { - setWizardContainer(wizardContainer); - - 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[] - */ - @Override - public byte[] getIcon() - { - return Resources.getImage(Resources.YAHOO_LOGO); - } - - /** - * Implements the <code>AccountRegistrationWizard.getPageImage</code> - * method. Returns the image used to decorate the wizard page - * - * @return byte[] the image used to decorate the wizard page - */ - @Override - 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 - */ - @Override - public String getProtocolName() - { - return Resources.getString("plugin.yahooaccregwizz.PROTOCOL_NAME"); - } - - /** - * Implements the <code>AccountRegistrationWizard.getProtocolDescription - * </code> - * method. Returns the description of the protocol for this wizard. - * - * @return String - */ - @Override - public String getProtocolDescription() - { - return Resources - .getString("plugin.yahooaccregwizz.PROTOCOL_DESCRIPTION"); - } - - /** - * Returns the set of pages contained in this wizard. - * - * @return Iterator - */ - @Override - public Iterator<WizardPage> getPages() - { - java.util.List<WizardPage> pages = new ArrayList<WizardPage>(); - firstWizardPage = new FirstWizardPage(this); - - pages.add(firstWizardPage); - - return pages.iterator(); - } - - /** - * Returns the set of data that user has entered through this wizard. - * - * @return Iterator - */ - @Override - public Iterator<Map.Entry<String, String>> getSummary() - { - Hashtable<String, String> summaryTable - = new Hashtable<String, String>(); - - summaryTable.put( - Resources.getString("plugin.yahooaccregwizz.USERNAME"), - registration.getUin()); - summaryTable.put( - Resources.getString("service.gui.REMEMBER_PASSWORD"), - Boolean.toString(registration.isRememberPassword())); - - return summaryTable.entrySet().iterator(); - } - - /** - * Defines the operations that will be executed when the user clicks on - * the wizard "Signin" button. - * - * @return the created <tt>ProtocolProviderService</tt> corresponding to the - * new account - * @throws OperationFailedException if the operation didn't succeed - */ - @Override - public ProtocolProviderService signin() - throws OperationFailedException - { - firstWizardPage.commitPage(); - - return signin( registration.getUin(), - registration.getPassword()); - } - - /** - * Defines the operations that will be executed when the user clicks on - * the wizard "Signin" button. - * - * @param userName the user name to sign in with - * @param password the password to sign in with - * @return the created <tt>ProtocolProviderService</tt> corresponding to the - * new account - * @throws OperationFailedException if the operation didn't succeed - */ - @Override - public ProtocolProviderService signin(String userName, String password) - throws OperationFailedException - { - ProtocolProviderFactory factory = - YahooAccRegWizzActivator.getYahooProtocolProviderFactory(); - - return this.installAccount( factory, - userName, - password); - } - - /** - * Creates an account for the given user and password. - * - * @param providerFactory the ProtocolProviderFactory which will create the - * account - * @param user the user identifier - * @param passwd the password - * @return the <tt>ProtocolProviderService</tt> for the new account. - */ - public ProtocolProviderService installAccount( - ProtocolProviderFactory providerFactory, String user, String passwd) - throws OperationFailedException - { - Hashtable<String, String> accountProperties - = new Hashtable<String, String>(); - - accountProperties.put(ProtocolProviderFactory.ACCOUNT_ICON_PATH, - "resources/images/protocol/yahoo/yahoo32x32.png"); - - if (registration.isRememberPassword()) - { - accountProperties.put(ProtocolProviderFactory.PASSWORD, passwd); - } - - if (isModification()) - { - providerFactory.modifyAccount( protocolProvider, - accountProperties); - - setModification(false); - - return protocolProvider; - } - - try - { - AccountID accountID = - providerFactory.installAccount(user, accountProperties); - - ServiceReference serRef = - providerFactory.getProviderForAccount(accountID); - - protocolProvider = - (ProtocolProviderService) YahooAccRegWizzActivator - .bundleContext.getService(serRef); - } - catch (IllegalStateException exc) - { - logger.warn(exc.getMessage()); - - throw new OperationFailedException( - "Account already exists.", - OperationFailedException.IDENTIFICATION_CONFLICT); - } - catch (Exception exc) - { - logger.warn(exc.getMessage()); - - throw new OperationFailedException( - "Failed to add account", - OperationFailedException.GENERAL_ERROR); - } - - return protocolProvider; - } - - /** - * Fills the UIN and Password fields in this panel with the data coming - * from the given protocolProvider. - * - * @param protocolProvider The <tt>ProtocolProviderService</tt> to load - * the data from. - */ - @Override - public void loadAccount(ProtocolProviderService protocolProvider) - { - setModification(true); - - this.protocolProvider = protocolProvider; - - this.registration = new YahooAccountRegistration(); - - this.firstWizardPage.loadAccount(protocolProvider); - } - - /** - * Returns the registration object, which will store all the data through - * the wizard. - * - * @return the registration object, which will store all the data through - * the wizard - */ - public YahooAccountRegistration getRegistration() - { - return registration; - } - - /** - * Returns the size of this wizard. - * @return the size of this wizard - */ - @Override - public Dimension getSize() - { - 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. - */ - @Override - public Object getFirstPageIdentifier() - { - return firstWizardPage.getIdentifier(); - } - - /** - * Returns the identifier of the page to show last in the wizard. - * @return the identifier of the page to show last in the wizard. - */ - @Override - public Object getLastPageIdentifier() - { - return firstWizardPage.getIdentifier(); - } - - /** - * 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 - * user name should look like. - */ - @Override - public String getUserNameExample() - { - return FirstWizardPage.USER_NAME_EXAMPLE; - } - - /** - * Defines the operation that will be executed when user clicks on the - * "Sign up" link. - * @throws UnsupportedOperationException if the web sign up operation is - * not supported by the current implementation. - */ - @Override - public void webSignup() - { - YahooAccRegWizzActivator.getBrowserLauncher() - .openURL("https://edit.yahoo.com/registration"); - } - - /** - * 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 - */ - @Override - public boolean isWebSignupSupported() - { - 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. - * - * @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 - */ - @Override - public Object getSimpleForm(boolean isCreateAccount) - { - firstWizardPage = new FirstWizardPage(this); - - return firstWizardPage.getSimpleForm(); - } - - /** - * Whether the advanced configuration is enabled. Gives an option - * to disable/hide advanced config button. - * @return whether the advanced configuration is enabled. - */ - public boolean isAdvancedConfigurationEnabled() - { - return false; - } -} diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf deleted file mode 100644 index a975e2e..0000000 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf +++ /dev/null @@ -1,33 +0,0 @@ -Bundle-Activator: net.java.sip.communicator.plugin.yahooaccregwizz.YahooAccRegWizzActivator -Bundle-Name: Yahoo account registration wizard -Bundle-Description: Yahoo account registration wizard. -Bundle-Vendor: jitsi.org -Bundle-Version: 0.0.1 -Bundle-SymbolicName: net.java.sip.communicator.plugin.yahooaccregwizz -Import-Package: org.osgi.framework, - net.java.sip.communicator.service.browserlauncher, - org.jitsi.service.configuration, - net.java.sip.communicator.service.contactlist, - net.java.sip.communicator.service.contactlist.event, - net.java.sip.communicator.service.gui, - net.java.sip.communicator.service.gui.event, - net.java.sip.communicator.service.protocol, - net.java.sip.communicator.service.protocol.event, - net.java.sip.communicator.service.protocol.icqconstants, - org.jitsi.service.resources, net.java.sip.communicator.service.resources, - net.java.sip.communicator.util, - net.java.sip.communicator.plugin.desktoputil, - javax.swing, - javax.swing.event, - javax.swing.table, - javax.swing.text, - javax.swing.text.html, - javax.accessibility, - javax.swing.plaf, - javax.swing.plaf.metal, - javax.swing.plaf.basic, - javax.imageio, - javax.swing.filechooser, - javax.swing.tree, - javax.swing.undo, - javax.swing.border |