com.funambol.client.controller
Class AccountScreenController

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

public class AccountScreenController
extends SynchronizationController

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


Field Summary
protected  AppSyncSource configAppSource
           
protected  java.lang.Exception exp
           
protected  boolean failed
           
protected  java.lang.String originalPassword
           
protected  java.lang.String originalUrl
           
protected  java.lang.String originalUser
           
protected  AccountScreen screen
           
protected  boolean 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
AccountScreenController(Controller controller, AccountScreen accountScreen)
           
AccountScreenController(Controller controller, Customization customization, Configuration configuration, Localization localization, AppSyncSourceManager appSyncSourceManager, AccountScreen accountScreen)
          TODO: Remove once the com.funambol.client.controller package integration is finished
 
Method Summary
 void endSync(java.util.Vector sources, boolean hadErrors)
          The synchronizaion has been completed for the given sources.
 AccountScreen getAccountScreen()
           
protected  java.lang.String getMessageFromSyncException(SyncException ex)
           
 boolean hasChanges(java.lang.String serverUri, java.lang.String username, java.lang.String password)
           
 void hide()
           
 void initScreen()
           
 void initScreen(java.lang.String url, java.lang.String usr, java.lang.String pwd)
           
protected  boolean isSyncInProgress()
           
 void resetValues()
           
 void saveAndCheck()
           
 void saveAndCheck(java.lang.String serverUri, java.lang.String username, java.lang.String password)
           
protected  void showSyncInProgressMessage()
           
 void sourceFailed(AppSyncSource appSource, SyncException e)
          This method is invoked when the synchronization of a source throws an exception.
 void sourceStarted(AppSyncSource appSource)
          This method notifies that a new source is about to begin its synchronization.
 void switchToSignupScreen()
           
 void syncEnded()
          Invoked at the end of the synchronization (always invoked, regardless of success or failure)
protected  void userAuthenticated()
           
 
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, synchronize, syncStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

screen

protected AccountScreen screen

configAppSource

protected AppSyncSource configAppSource

failed

protected boolean failed

sourceStarted

protected boolean sourceStarted

exp

protected java.lang.Exception exp

originalUrl

protected java.lang.String originalUrl

originalUser

protected java.lang.String originalUser

originalPassword

protected java.lang.String originalPassword
Constructor Detail

AccountScreenController

public AccountScreenController(Controller controller,
                               AccountScreen accountScreen)

AccountScreenController

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

Method Detail

getAccountScreen

public AccountScreen getAccountScreen()

saveAndCheck

public void saveAndCheck()

saveAndCheck

public void saveAndCheck(java.lang.String serverUri,
                         java.lang.String username,
                         java.lang.String password)

isSyncInProgress

protected boolean isSyncInProgress()

sourceFailed

public void sourceFailed(AppSyncSource appSource,
                         SyncException e)
Description copied from interface: SyncEngineListener
This method is invoked when the synchronization of a source throws an exception. The exception is provided so the upper layers can decide if an error message shall be shown.

Specified by:
sourceFailed in interface SyncEngineListener
Overrides:
sourceFailed in class SynchronizationController

sourceStarted

public void sourceStarted(AppSyncSource appSource)
Description copied from interface: SyncEngineListener
This method notifies that a new source is about to begin its synchronization.

Specified by:
sourceStarted in interface SyncEngineListener
Overrides:
sourceStarted in class SynchronizationController

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 SynchronizationController

getMessageFromSyncException

protected java.lang.String getMessageFromSyncException(SyncException ex)

hasChanges

public boolean hasChanges(java.lang.String serverUri,
                          java.lang.String username,
                          java.lang.String password)

resetValues

public void resetValues()

endSync

public void endSync(java.util.Vector sources,
                    boolean hadErrors)
Description copied from interface: SyncEngineListener
The synchronizaion has been completed for the given sources.

Specified by:
endSync in interface SyncEngineListener
Overrides:
endSync in class SynchronizationController
Parameters:
sources - the list of sources being synchronized

hide

public void hide()

initScreen

public void initScreen()

initScreen

public void initScreen(java.lang.String url,
                       java.lang.String usr,
                       java.lang.String pwd)

showSyncInProgressMessage

protected void showSyncInProgressMessage()

userAuthenticated

protected void userAuthenticated()

switchToSignupScreen

public void switchToSignupScreen()


Copyright © 2001-2009 Funambol.