Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.facebookaccregwizz
Class FacebookAccountRegistrationWizard

java.lang.Object
  extended by net.java.sip.communicator.service.gui.AccountRegistrationWizard
      extended by net.java.sip.communicator.plugin.jabberaccregwizz.JabberAccountRegistrationWizard
          extended by net.java.sip.communicator.plugin.facebookaccregwizz.FacebookAccountRegistrationWizard

public class FacebookAccountRegistrationWizard
extends JabberAccountRegistrationWizard

The FacebookAccountRegistrationWizard is an implementation of the AccountRegistrationWizard for the Facebook Chat protocol. It allows the user to create and configure a new Facebook account.

Author:
Dai Zhiwei, Yana Stamcheva

Constructor Summary
FacebookAccountRegistrationWizard(WizardContainer wizardContainer)
          Creates an instance of FacebookAccountRegistrationWizard.
 
Method Summary
 String getAccountIconPath()
          Returns the account icon path.
protected  String getCreateAccountButtonLabel()
          Return the string for add existing account button.
protected  String getCreateAccountLabel()
          Return the string for create new account button.
protected  JabberAccountCreationFormService getCreateAccountService()
          Returns an instance of CreateAccountService through which the user could create an account.
 byte[] getIcon()
          Implements the AccountRegistrationWizard.getIcon method.
 byte[] getPageImage()
          Implements the AccountRegistrationWizard.getPageImage method.
 Iterator<WizardPage> getPages()
          Returns the set of pages contained in this wizard.
 String getProtocol()
          Returns the protocol name as listed in "ProtocolNames" or just the name of the service.
 String getProtocolDescription()
          Implements the AccountRegistrationWizard.getProtocolDescription method.
 String getProtocolIconPath()
          Returns the protocol icon path.
 String getProtocolName()
          Implements the AccountRegistrationWizard.getProtocolName method.
 Object getSimpleForm(boolean isCreateAccount)
          Returns a simple account registration form that would be the first form shown to the user.
 String getUserNameExample()
          Returns an example string, which should indicate to the user how the user name should look like.
protected  String getUsernameLabel()
          Returns the display label used for the sip id field.
protected  ProtocolProviderService installAccount(ProtocolProviderFactory providerFactory, String userName, String passwd)
          Creates an account for the given user and password.
 boolean isWebSignupSupported()
          Returns true if the web sign up is supported by the current implementation, false - otherwise.
 void webSignup()
          Opens a browser on the sign up page.
 
Methods inherited from class net.java.sip.communicator.plugin.jabberaccregwizz.JabberAccountRegistrationWizard
getExistingAccountLabel, getFirstPageIdentifier, getHomeLinkLabel, getLastPageIdentifier, getPages, getRegistration, getServerFromUserName, getSimpleForm, getSize, getSummary, loadAccount, signin, signin
 
Methods inherited from class net.java.sip.communicator.service.gui.AccountRegistrationWizard
accountRemoved, getForgotPasswordLink, getForgotPasswordLinkName, getWizardContainer, isHidden, isModification, isPreferredProtocol, isSimpleFormEnabled, setModification, setWizardContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacebookAccountRegistrationWizard

public FacebookAccountRegistrationWizard(WizardContainer wizardContainer)
Creates an instance of FacebookAccountRegistrationWizard.

Parameters:
wizardContainer - the wizard container, where this wizard is added
Method Detail

getPages

public Iterator<WizardPage> getPages()
Returns the set of pages contained in this wizard.

Overrides:
getPages in class JabberAccountRegistrationWizard
Returns:
Iterator

getSimpleForm

public Object getSimpleForm(boolean isCreateAccount)
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.

Overrides:
getSimpleForm in class JabberAccountRegistrationWizard
Parameters:
isCreateAccount - indicates if the simple form should be opened as a create account form or as a login form
Returns:
a simple account registration form

getIcon

public byte[] getIcon()
Implements the AccountRegistrationWizard.getIcon method. Returns the icon to be used for this wizard.

Overrides:
getIcon in class JabberAccountRegistrationWizard
Returns:
byte[]

getPageImage

public byte[] getPageImage()
Implements the AccountRegistrationWizard.getPageImage method. Returns the image used to decorate the wizard page

Overrides:
getPageImage in class JabberAccountRegistrationWizard
Returns:
byte[] the image used to decorate the wizard page

getProtocolName

public String getProtocolName()
Implements the AccountRegistrationWizard.getProtocolName method. Returns the protocol name for this wizard.

Overrides:
getProtocolName in class JabberAccountRegistrationWizard
Returns:
String

getProtocolDescription

public String getProtocolDescription()
Implements the AccountRegistrationWizard.getProtocolDescription method. Returns the description of the protocol for this wizard.

Overrides:
getProtocolDescription in class JabberAccountRegistrationWizard
Returns:
String

getUserNameExample

public String getUserNameExample()
Returns an example string, which should indicate to the user how the user name should look like.

Overrides:
getUserNameExample in class JabberAccountRegistrationWizard
Returns:
an example string, which should indicate to the user how the user name should look like.

getUsernameLabel

protected String getUsernameLabel()
Returns the display label used for the sip id field.

Overrides:
getUsernameLabel in class JabberAccountRegistrationWizard
Returns:
the sip id display label string.

getCreateAccountButtonLabel

protected String getCreateAccountButtonLabel()
Return the string for add existing account button.

Overrides:
getCreateAccountButtonLabel in class JabberAccountRegistrationWizard
Returns:
the string for add existing account button.

getCreateAccountLabel

protected String getCreateAccountLabel()
Return the string for create new account button.

Overrides:
getCreateAccountLabel in class JabberAccountRegistrationWizard
Returns:
the string for create new account button.

getProtocol

public String getProtocol()
Returns the protocol name as listed in "ProtocolNames" or just the name of the service.

Overrides:
getProtocol in class JabberAccountRegistrationWizard
Returns:
the protocol name

getProtocolIconPath

public String getProtocolIconPath()
Returns the protocol icon path.

Overrides:
getProtocolIconPath in class JabberAccountRegistrationWizard
Returns:
the protocol icon path

getAccountIconPath

public String getAccountIconPath()
Returns the account icon path.

Overrides:
getAccountIconPath in class JabberAccountRegistrationWizard
Returns:
the account icon path

webSignup

public void webSignup()
Opens a browser on the sign up page.

Overrides:
webSignup in class JabberAccountRegistrationWizard

isWebSignupSupported

public boolean isWebSignupSupported()
Returns true if the web sign up is supported by the current implementation, false - otherwise.

Overrides:
isWebSignupSupported in class JabberAccountRegistrationWizard
Returns:
true if the web sign up is supported by the current implementation, false - otherwise

installAccount

protected ProtocolProviderService installAccount(ProtocolProviderFactory providerFactory,
                                                 String userName,
                                                 String passwd)
                                          throws OperationFailedException
Creates an account for the given user and password.

Overrides:
installAccount in class JabberAccountRegistrationWizard
Parameters:
providerFactory - the ProtocolProviderFactory which will create the account
userName - the user identifier
passwd - the password
Returns:
the ProtocolProviderService for the new account.
Throws:
OperationFailedException - if the operation didn't succeed

getCreateAccountService

protected JabberAccountCreationFormService getCreateAccountService()
Returns an instance of CreateAccountService through which the user could create an account. This method is meant to be implemented by specific protocol provider wizards.

Overrides:
getCreateAccountService in class JabberAccountRegistrationWizard
Returns:
an instance of CreateAccountService

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.