Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.account
Class EmptyAccountRegistrationWizard

java.lang.Object
  extended by net.java.sip.communicator.service.gui.AccountRegistrationWizard
      extended by net.java.sip.communicator.impl.gui.main.account.EmptyAccountRegistrationWizard

 class EmptyAccountRegistrationWizard
extends AccountRegistrationWizard

We use this class as a dummy implementation of the AccountRegistrationWizard only containing a blank page and not related to a specific protocol. We are using this class so that we could have the NewAccountDialog open without having a specific protocol selected. The point of having this empty page is to avoid users mistakenly filling in data for the default protocol without noticing that it is not really the protocol they had in mind.

Author:
Emil Ivov

Constructor Summary
EmptyAccountRegistrationWizard()
          Creates the wizard.
 
Method Summary
 Object getFirstPageIdentifier()
          Returns the ID of our only page.
 byte[] getIcon()
          Called by the NewAccountDialog protocol combo renderer.
 Object getLastPageIdentifier()
          Returns the ID of our last and only page.
 byte[] getPageImage()
          Returns null since we don't have any images associated with this wizard or no image in our case.
 Iterator<WizardPage> getPages()
          Returns an iterator over a list containing our only page.
 String getProtocolDescription()
          Returns a dummy protocol description.
 String getProtocolName()
          Returns the name of a dummy protocol which is actually a prompt to select a network.
 Object getSimpleForm(boolean isCreateAccount)
          Returns a simple account registration form that would be the first form shown to the user.
 Dimension getSize()
          Returns a dummy size that we never use here.
 Iterator<Map.Entry<String,String>> getSummary()
          Returns a dummy Iterator.
 String getUserNameExample()
          Returns an empty string since never used.
 void loadAccount(ProtocolProviderService protocolProvider)
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 ProtocolProviderService signin()
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 ProtocolProviderService signin(String userName, String password)
          Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard
 
Methods inherited from class net.java.sip.communicator.service.gui.AccountRegistrationWizard
accountRemoved, getForgotPasswordLink, getForgotPasswordLinkName, getWizardContainer, isHidden, isModification, isPreferredProtocol, isSimpleFormEnabled, isWebSignupSupported, setModification, setWizardContainer, webSignup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyAccountRegistrationWizard

public EmptyAccountRegistrationWizard()
Creates the wizard.

Method Detail

getFirstPageIdentifier

public Object getFirstPageIdentifier()
Returns the ID of our only page.

Specified by:
getFirstPageIdentifier in class AccountRegistrationWizard
Returns:
the ID of our only page

getIcon

public byte[] getIcon()
Called by the NewAccountDialog protocol combo renderer. We don't have an icon so we return null

Specified by:
getIcon in class AccountRegistrationWizard
Returns:
null;

getLastPageIdentifier

public Object getLastPageIdentifier()
Returns the ID of our last and only page.

Specified by:
getLastPageIdentifier in class AccountRegistrationWizard
Returns:
the id of our last (and only) page.

getPageImage

public byte[] getPageImage()
Returns null since we don't have any images associated with this wizard or no image in our case. return an empty byte[] array.

Specified by:
getPageImage in class AccountRegistrationWizard
Returns:
the image that will be shown on the left of the wizard pages

getPages

public Iterator<WizardPage> getPages()
Returns an iterator over a list containing our only page.

Specified by:
getPages in class AccountRegistrationWizard
Returns:
an iterator over a list containing our only page.

getProtocolDescription

public String getProtocolDescription()
Returns a dummy protocol description.

Specified by:
getProtocolDescription in class AccountRegistrationWizard
Returns:
a string containing a dummy protocol description.

getProtocolName

public String getProtocolName()
Returns the name of a dummy protocol which is actually a prompt to select a network.

Specified by:
getProtocolName in class AccountRegistrationWizard
Returns:
a string prompting the user to select a network.

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

getSize

public Dimension getSize()
Returns a dummy size that we never use here.

Specified by:
getSize in class AccountRegistrationWizard
Returns:
the preferred dimensions of this wizard.

getSummary

public Iterator<Map.Entry<String,String>> getSummary()
Returns a dummy Iterator. Never really called.

Specified by:
getSummary in class AccountRegistrationWizard
Returns:
an Empty iterator.

getUserNameExample

public String getUserNameExample()
Returns an empty string since never used.

Specified by:
getUserNameExample in class AccountRegistrationWizard
Returns:
an empty string as we never use this method.

loadAccount

public void loadAccount(ProtocolProviderService protocolProvider)
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

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

signin

public ProtocolProviderService signin()
                               throws OperationFailedException
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

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
Empty interface method implementation, unused in the case of the EmptyAccountRegistrationWizard

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

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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