Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.aimaccregwizz
Class AimAccountRegistrationWizard

java.lang.Object
  extended by net.java.sip.communicator.service.gui.AccountRegistrationWizard
      extended by net.java.sip.communicator.plugin.aimaccregwizz.AimAccountRegistrationWizard

public class AimAccountRegistrationWizard
extends AccountRegistrationWizard

The AimAccountRegistrationWizard is an implementation of the AccountRegistrationWizard for the AIM protocol. It should allow the user to create and configure a new AIM account.

Author:
Yana Stamcheva

Constructor Summary
AimAccountRegistrationWizard(WizardContainer wizardContainer)
          Creates an instance of AimAccountRegistrationWizard.
 
Method Summary
 Object getFirstPageIdentifier()
          Returns the identifier of the page to show first in the wizard.
 byte[] getIcon()
          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.
 Object getLastPageIdentifier()
          Returns the identifier of the page to show last in the wizard.
 byte[] getPageImage()
          Implements the AccountRegistrationWizard.getPageImage method.
 Iterator<WizardPage> getPages()
          Returns the set of WizardPage-s for this wizard.
 String getProtocolDescription()
          Returns a short description of the protocol that will be shown on the right of the protocol name in the list, where user will choose the protocol to register to.
 String getProtocolName()
          Returns the protocol name that will be shown in the list, where user will choose the protocol to register to.
 AimAccountRegistration getRegistration()
          Returns the registration object, which will store all the data through the wizard.
 Object getSimpleForm(boolean isCreateAccount)
          Returns a simple account registration form that would be the first form shown to the user.
 Dimension getSize()
          Returns the size of this wizard.
 Iterator<Map.Entry<String,String>> getSummary()
          Returns a set of key-value pairs that will represent the summary for this wizard.
 String getUserNameExample()
          Returns an example string, which should indicate to the user how the user name should look like.
 ProtocolProviderService installAccount(ProtocolProviderFactory providerFactory, String user, 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 loadAccount(ProtocolProviderService protocolProvider)
          Fills the UIN and Password fields in this panel with the data comming from the given protocolProvider.
 ProtocolProviderService signin()
          Installs the account created through this wizard.
 ProtocolProviderService signin(String userName, String password)
          Defines the operations that will be executed when the user clicks on the wizard "service.gui.SIGN_IN" button.
 void webSignup()
          Defines the operation that will be executed when user clicks on the "Sign up" link.
 
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

AimAccountRegistrationWizard

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

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

getIcon

public byte[] getIcon()
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.

Specified by:
getIcon in class AccountRegistrationWizard
Returns:
a short description of the protocol.

getPageImage

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

Specified by:
getPageImage in class AccountRegistrationWizard
Returns:
byte[] the image used to decorate the wizard page

getProtocolName

public String getProtocolName()
Returns the protocol name that will be shown in the list, where user will choose the protocol to register to.

Specified by:
getProtocolName in class AccountRegistrationWizard
Returns:
the protocol name.

getProtocolDescription

public String getProtocolDescription()
Returns a short description of the protocol that will be shown on the right of the protocol name in the list, where user will choose the protocol to register to.

Specified by:
getProtocolDescription in class AccountRegistrationWizard
Returns:
a short description of the protocol.

getPages

public Iterator<WizardPage> getPages()
Returns the set of WizardPage-s for this wizard.

Specified by:
getPages in class AccountRegistrationWizard
Returns:
the set of WizardPage-s for this wizard.

getSummary

public Iterator<Map.Entry<String,String>> getSummary()
Returns a set of key-value pairs that will represent the summary for this wizard.

Specified by:
getSummary in class AccountRegistrationWizard
Returns:
a set of key-value pairs that will represent the summary for this wizard.

signin

public ProtocolProviderService signin()
                               throws OperationFailedException
Installs the account created through this wizard.

Specified by:
signin in class AccountRegistrationWizard
Returns:
the ProtocolProviderService for the newly created account.
Throws:
OperationFailedException

signin

public ProtocolProviderService signin(String userName,
                                      String password)
                               throws OperationFailedException
Defines the operations that will be executed when the user clicks on the wizard "service.gui.SIGN_IN" button.

Specified by:
signin in class AccountRegistrationWizard
Parameters:
userName - the user name to sign in with
password - the password to sign in with
Returns:
the ProtocolProviderService for the new account.
Throws:
OperationFailedException

installAccount

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

Parameters:
providerFactory - the ProtocolProviderFactory which will create the account
user - the user identifier
passwd - the password
Returns:
the ProtocolProviderService for the new account.
Throws:
OperationFailedException

loadAccount

public void loadAccount(ProtocolProviderService protocolProvider)
Fills the UIN and Password fields in this panel with the data comming from the given protocolProvider.

Specified by:
loadAccount in class AccountRegistrationWizard
Parameters:
protocolProvider - The ProtocolProviderService to load the data from.

getRegistration

public AimAccountRegistration getRegistration()
Returns the registration object, which will store all the data through the wizard.

Returns:
the registration object, which will store all the data through the wizard

getSize

public Dimension getSize()
Returns the size of this wizard.

Specified by:
getSize in class AccountRegistrationWizard
Returns:
the size of this wizard

getFirstPageIdentifier

public Object getFirstPageIdentifier()
Returns the identifier of the page to show first in the wizard.

Specified by:
getFirstPageIdentifier in class AccountRegistrationWizard
Returns:
the identifier of the page to show first in the wizard.

getLastPageIdentifier

public Object getLastPageIdentifier()
Returns the identifier of the page to show last in the wizard.

Specified by:
getLastPageIdentifier in class AccountRegistrationWizard
Returns:
the identifier of the page to show last in the wizard.

getUserNameExample

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

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

webSignup

public void webSignup()
Defines the operation that will be executed when user clicks on the "Sign up" link.

Overrides:
webSignup in class AccountRegistrationWizard
Throws:
UnsupportedOperationException - if the web sign up operation is not supported by the current implementation.

isWebSignupSupported

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

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

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.

Specified by:
getSimpleForm in class AccountRegistrationWizard
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

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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