Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.ircaccregwizz
Class IrcAccountRegistrationWizard

java.lang.Object
  extended by net.java.sip.communicator.service.gui.AccountRegistrationWizard
      extended by net.java.sip.communicator.plugin.ircaccregwizz.IrcAccountRegistrationWizard

public class IrcAccountRegistrationWizard
extends AccountRegistrationWizard

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

Author:
Lionel Ferreira & Michael Tarantino

Constructor Summary
IrcAccountRegistrationWizard(WizardContainer wizardContainer)
          Creates an instance of IrcAccountRegistrationWizard.
 
Method Summary
 Object getFirstPageIdentifier()
          Returns the identifier of the page to show first in the wizard.
 byte[] getIcon()
          Implements the AccountRegistrationWizard.getIcon method.
 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 pages contained in this wizard.
 String getProtocolDescription()
          Implements the AccountRegistrationWizard.getProtocolDescription method.
 String getProtocolName()
          Implements the AccountRegistrationWizard.getProtocolName method.
 IrcAccountRegistration 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 the set of data that user has entered through 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 password)
          Creates an account for the given user and password.
 boolean isSimpleFormEnabled()
          Indicates whether this wizard enables the simple "sign in" form shown when the user opens the application for the first time.
 void loadAccount(ProtocolProviderService protocolProvider)
          Fills the UserID and Password fields in this panel with the data coming from the given protocolProvider.
 ProtocolProviderService signin()
          Defines the operations that will be executed when the user clicks on the wizard "Signin" button.
 ProtocolProviderService signin(String userName, String password)
          Defines the operations that will be executed when the user clicks on the wizard "Signin" button.
 
Methods inherited from class net.java.sip.communicator.service.gui.AccountRegistrationWizard
accountRemoved, getForgotPasswordLink, getForgotPasswordLinkName, getWizardContainer, isHidden, isModification, isPreferredProtocol, isWebSignupSupported, setModification, setWizardContainer, webSignup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IrcAccountRegistrationWizard

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

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

getIcon

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

Specified by:
getIcon in class AccountRegistrationWizard
Returns:
byte[]

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()
Implements the AccountRegistrationWizard.getProtocolName method. Returns the protocol name for this wizard.

Specified by:
getProtocolName in class AccountRegistrationWizard
Returns:
String

getProtocolDescription

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

Specified by:
getProtocolDescription in class AccountRegistrationWizard
Returns:
String

getPages

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

Specified by:
getPages in class AccountRegistrationWizard
Returns:
Iterator

getSummary

public Iterator<Map.Entry<String,String>> getSummary()
Returns the set of data that user has entered through this wizard.

Specified by:
getSummary in class AccountRegistrationWizard
Returns:
Iterator

signin

public ProtocolProviderService signin()
                               throws OperationFailedException
Defines the operations that will be executed when the user clicks on the wizard "Signin" button.

Specified by:
signin in class AccountRegistrationWizard
Returns:
the created ProtocolProviderService corresponding to the new account
Throws:
OperationFailedException - if the operation didn't succeed

signin

public ProtocolProviderService signin(String userName,
                                      String password)
                               throws OperationFailedException
Defines the operations that will be executed when the user clicks on the wizard "Signin" 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 created ProtocolProviderService corresponding to the new account
Throws:
OperationFailedException - if the operation didn't succeed

installAccount

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

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

loadAccount

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

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

getRegistration

public IrcAccountRegistration 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.

isSimpleFormEnabled

public boolean isSimpleFormEnabled()
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.

Overrides:
isSimpleFormEnabled in class AccountRegistrationWizard
Returns:
true if the simple "Sign in" form is enabled or 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.