Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.sipaccregwizz
Class SIPAccountRegistrationWizard

java.lang.Object
  extended by net.java.sip.communicator.service.gui.AccountRegistrationWizard
      extended by net.java.sip.communicator.service.gui.ExtendedAccountRegistrationWizard
          extended by net.java.sip.communicator.plugin.sipaccregwizz.SIPAccountRegistrationWizard
Direct Known Subclasses:
IppiAccountRegistrationWizard, IptelAccountRegistrationWizard, Sip2SipAccountRegistrationWizard

public class SIPAccountRegistrationWizard
extends ExtendedAccountRegistrationWizard

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

Author:
Yana Stamcheva, Grigorii Balutsel

Constructor Summary
SIPAccountRegistrationWizard(WizardContainer wizardContainer)
          Creates an instance of IPPIAccountRegistrationWizard.
 
Method Summary
 String getAccountIconPath()
          Returns the account icon path.
protected  String getCreateAccountLabel()
          Return the string for create new account button.
protected  SIPAccountCreationFormService getCreateAccountService()
          Returns an instance of CreateAccountService through which the user could create an account.
protected  String getExistingAccountLabel()
          Return the string for add existing account button.
 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.
 Iterator<WizardPage> getPages(SIPAccountRegistration registration)
          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.
 SIPAccountRegistration 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.
 Object getSimpleForm(SIPAccountRegistration registration, boolean isCreateAccount)
          Returns the simple form.
 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.
protected  String getUsernameLabel()
          Returns the display label used for the sip id field.
 String getWebSignupLinkName()
          Returns the name of the web sign up link.
 boolean isSignupSupported()
          Indicates if a sign up form is supported by this wizard.
 boolean isWebSignupSupported()
          Returns true if the web sign up is supported by the current implementation, false - otherwise.
 void loadAccount(ProtocolProviderService protocolProvider)
          Fills the id and Password fields in this panel with the data coming from the given protocolProvider.
 void setCreateAccountView()
          Sets the create account view of this registration wizard.
protected  void setRegistration(SIPAccountRegistration registration)
          Sets the registration object, which will store all the data through the wizard.
 ProtocolProviderService signin()
          Installs the account created through this wizard.
 ProtocolProviderService signin(String userName, String password)
          Installs the account with the given user name and password.
 
Methods inherited from class net.java.sip.communicator.service.gui.AccountRegistrationWizard
accountRemoved, getForgotPasswordLink, getForgotPasswordLinkName, getWizardContainer, isHidden, isModification, isPreferredProtocol, isSimpleFormEnabled, setModification, setWizardContainer, webSignup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SIPAccountRegistrationWizard

public SIPAccountRegistrationWizard(WizardContainer wizardContainer)
Creates an instance of IPPIAccountRegistrationWizard.

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

getPages

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

Parameters:
registration - the registration object
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
Installs the account created through this wizard.

Specified by:
signin in class AccountRegistrationWizard
Returns:
ProtocolProviderService
Throws:
OperationFailedException - problem signing in.

signin

public ProtocolProviderService signin(String userName,
                                      String password)
                               throws OperationFailedException
Installs the account with the given user name and password.

Specified by:
signin in class AccountRegistrationWizard
Parameters:
userName - the account user name
password - the password
Returns:
the ProtocolProviderService corresponding to the newly created account.
Throws:
OperationFailedException - problem signing in.

loadAccount

public void loadAccount(ProtocolProviderService protocolProvider)
Fills the id 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 SIPAccountRegistration 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

setRegistration

protected void setRegistration(SIPAccountRegistration registration)
Sets the registration object, which will store all the data through the wizard.

Parameters:
registration - 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.

getWebSignupLinkName

public String getWebSignupLinkName()
Returns the name of the web sign up link.

Returns:
the name of the web sign up link

isSignupSupported

public boolean isSignupSupported()
Indicates if a sign up form is supported by this wizard.

Specified by:
isSignupSupported in class ExtendedAccountRegistrationWizard
Returns:
true if a sign up form is supported by this wizard, false - otherwise

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

setCreateAccountView

public void setCreateAccountView()
Sets the create account view of this registration wizard.

Specified by:
setCreateAccountView in class ExtendedAccountRegistrationWizard

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

getSimpleForm

public Object getSimpleForm(SIPAccountRegistration registration,
                            boolean isCreateAccount)
Returns the simple form.

Parameters:
registration - the registration object
Returns:
the simple form

getProtocol

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

Returns:
the protocol name

getProtocolIconPath

public String getProtocolIconPath()
Returns the protocol icon path.

Returns:
the protocol icon path

getAccountIconPath

public String getAccountIconPath()
Returns the account icon path.

Returns:
the account icon path

getCreateAccountService

protected SIPAccountCreationFormService 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.

Returns:
an instance of CreateAccountService

getUsernameLabel

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

Returns:
the sip id display label string.

getExistingAccountLabel

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

Returns:
the string for add existing account button.

getCreateAccountLabel

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

Returns:
the string for create new account button.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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