com.funambol.client.controller
Class SignupScreenController

java.lang.Object
  extended by com.funambol.client.controller.SynchronizationController
      extended by com.funambol.client.controller.AccountScreenController
          extended by com.funambol.client.controller.SignupScreenController
All Implemented Interfaces:
SyncEngineListener

public abstract class SignupScreenController
extends AccountScreenController

This class is the controller (in the MVC model) for the SignupScreen.


Field Summary
protected  int state
           
protected  int STATE_BEGIN
           
protected  int STATE_CAPTCHA
           
protected  int STATE_LOGGED_IN
           
protected  int STATE_LOGIN_FAILED
           
protected  int STATE_SIGNED_UP
           
 
Fields inherited from class com.funambol.client.controller.AccountScreenController
configAppSource, exp, failed, originalPassword, originalUrl, originalUser, screen, sourceStarted
 
Fields inherited from class com.funambol.client.controller.SynchronizationController
appSyncSourceManager, configuration, controller, currentSource, customization, doCancel, engine, localization, logConnectivityError, MANUAL, PUSH, REFRESH_FROM_SERVER, REFRESH_TO_SERVER, SCHEDULED, showTCPAlert
 
Constructor Summary
SignupScreenController(Controller controller, Customization customization, Configuration configuration, Localization localization, AppSyncSourceManager appSyncSourceManager, SignupScreen signupScreen)
          TODO: Remove once the com.funambol.client.controller package integration is finished
 
Method Summary
protected  void captchaRequestFailed(java.lang.String msg)
           
protected  void captchaRequestStarted()
           
protected  void captchaRequestSucceeded(byte[] captcha)
           
 void continueWithSignup()
          Sign up the user with the information taken from the account screen and DeviceInfo
 java.lang.String getCurrentJSessionId()
           
protected abstract  DeviceInfoInterface getDeviceInfo()
           
protected  java.lang.String getMessageFromSyncException(SyncException ex)
           
protected  void hideProgressDialog()
           
 void initScreen()
           
 void initScreen(java.lang.String url, java.lang.String usr, java.lang.String pwd)
           
protected  void loginRequestFailed()
           
protected  void loginRequestStarted()
           
protected  void loginRequestSucceeded()
           
 void promptCaptcha()
           
 void promptCredentials()
           
protected  void requestLogin()
           
protected  void requestNewCaptcha(boolean unmatched)
           
 void setCurrentJSessionId(java.lang.String id)
           
protected  void showProgressDialog(java.lang.String label)
           
protected  void showSignupSucceededMessage(java.lang.String message)
           
 void signup()
          Sign up the user with the information taken from the account screen and DeviceInfo
protected  void signupFailed(java.lang.String msg)
           
protected  void signupFailed(java.lang.String msg, boolean promptCredentials)
           
 void signupStarted()
           
 void signupSucceeded()
           
 void switchToLoginScreen()
          Prompts the user to the login screen
 void syncEnded()
          Invoked at the end of the synchronization (always invoked, regardless of success or failure)
 void synchronize(java.lang.String syncType, java.util.Vector syncSources)
          Triggers a synchronization for the given syncSources.
protected  void userAuthenticated()
           
 
Methods inherited from class com.funambol.client.controller.AccountScreenController
endSync, getAccountScreen, hasChanges, hide, isSyncInProgress, resetValues, saveAndCheck, saveAndCheck, showSyncInProgressMessage, sourceFailed, sourceStarted, switchToSignupScreen
 
Methods inherited from class com.funambol.client.controller.SynchronizationController
beginSync, cancelSync, clearErrors, confirmDeletes, connectionClosed, connectionConfigurationChanged, connectionOpened, continueSynchronizationAfterBandwithSaverDialog, continueSynchronizationAfterFirstSyncDialog, createSyncEngine, forceSynchronization, getController, getCurrentSource, getRemoteUri, getSyncEngine, initSyncScheduler, isCancelled, isConnectionConfigurationAllowed, isSynchronizing, noConnection, noCredentials, noSignal, noSources, refresh, refreshSources, requestWritten, responseReceived, serverOperationFailed, setCancel, setIsUserConfirmationNeeded, setScreen, showMessage, showMessage, showPendingFirstSyncQuestion, sourceEnded, synchronize, synchronize, syncStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_BEGIN

protected final int STATE_BEGIN
See Also:
Constant Field Values

STATE_LOGGED_IN

protected final int STATE_LOGGED_IN
See Also:
Constant Field Values

STATE_LOGIN_FAILED

protected final int STATE_LOGIN_FAILED
See Also:
Constant Field Values

STATE_CAPTCHA

protected final int STATE_CAPTCHA
See Also:
Constant Field Values

STATE_SIGNED_UP

protected final int STATE_SIGNED_UP
See Also:
Constant Field Values

state

protected int state
Constructor Detail

SignupScreenController

public SignupScreenController(Controller controller,
                              Customization customization,
                              Configuration configuration,
                              Localization localization,
                              AppSyncSourceManager appSyncSourceManager,
                              SignupScreen signupScreen)
TODO: Remove once the com.funambol.client.controller package integration is finished

Method Detail

getDeviceInfo

protected abstract DeviceInfoInterface getDeviceInfo()
Returns:
the deviceInfo implementation for the current controller

initScreen

public void initScreen()
Overrides:
initScreen in class AccountScreenController

initScreen

public void initScreen(java.lang.String url,
                       java.lang.String usr,
                       java.lang.String pwd)
Overrides:
initScreen in class AccountScreenController

promptCredentials

public void promptCredentials()

promptCaptcha

public void promptCaptcha()

switchToLoginScreen

public void switchToLoginScreen()
Prompts the user to the login screen


continueWithSignup

public void continueWithSignup()
Sign up the user with the information taken from the account screen and DeviceInfo


requestLogin

protected void requestLogin()

loginRequestStarted

protected void loginRequestStarted()

loginRequestSucceeded

protected void loginRequestSucceeded()

loginRequestFailed

protected void loginRequestFailed()

requestNewCaptcha

protected void requestNewCaptcha(boolean unmatched)

captchaRequestStarted

protected void captchaRequestStarted()

captchaRequestSucceeded

protected void captchaRequestSucceeded(byte[] captcha)

captchaRequestFailed

protected void captchaRequestFailed(java.lang.String msg)

signup

public void signup()
Sign up the user with the information taken from the account screen and DeviceInfo


signupStarted

public void signupStarted()

signupSucceeded

public void signupSucceeded()

signupFailed

protected void signupFailed(java.lang.String msg)

signupFailed

protected void signupFailed(java.lang.String msg,
                            boolean promptCredentials)

synchronize

public void synchronize(java.lang.String syncType,
                        java.util.Vector syncSources)
Description copied from class: SynchronizationController
Triggers a synchronization for the given syncSources. The caller can specify its type (manual, scheduled, push) to change the error handling behavior

Overrides:
synchronize in class SynchronizationController
Parameters:
syncType - the caller type (SYNC_TYPE_MANUAL, SYNC_TYPE_SCHEDULED)
syncSources - is a vector of AppSyncSource to be synced

syncEnded

public void syncEnded()
Description copied from interface: SyncEngineListener
Invoked at the end of the synchronization (always invoked, regardless of success or failure)

Specified by:
syncEnded in interface SyncEngineListener
Overrides:
syncEnded in class AccountScreenController

userAuthenticated

protected void userAuthenticated()
Overrides:
userAuthenticated in class AccountScreenController

showSignupSucceededMessage

protected void showSignupSucceededMessage(java.lang.String message)

showProgressDialog

protected void showProgressDialog(java.lang.String label)

hideProgressDialog

protected void hideProgressDialog()

getMessageFromSyncException

protected java.lang.String getMessageFromSyncException(SyncException ex)
Overrides:
getMessageFromSyncException in class AccountScreenController

getCurrentJSessionId

public java.lang.String getCurrentJSessionId()
Returns:
the jsessionid of the latest CAPTCHA request session

setCurrentJSessionId

public void setCurrentJSessionId(java.lang.String id)


Copyright © 2001-2009 Funambol.