org.openmobileis.database.fastobjectdb.synchro.client
Class OpenMSPFODBSyncListener

java.lang.Object
  extended byorg.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener
      extended byorg.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener
          extended byorg.openmobileis.database.fastobjectdb.synchro.client.OpenMSPFODBSyncListener
All Implemented Interfaces:
OpenMSPSyncListener

public final class OpenMSPFODBSyncListener
extends OpenMSPDBSyncListener

Title: OpenMobileIS project source
Description:

Since:
JDK 1.1
Version:
1.0.
Author:
Philippe Delrieu

Field Summary
 
Fields inherited from class org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener
installPath
 
Fields inherited from class org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener
ADD_ERROR_MESSAGE, DELETE_ERROR_MESSAGE, ITEM_ERROR_MESSAGE, SYNC_ERROR_MESSAGE, SYNC_UNAUTHORIZED_MESSAGE, UPDATE_ERROR_MESSAGE
 
Fields inherited from interface org.openmobileis.synchro.openmsp.client.OpenMSPSyncListener
SYNCHRO_FAILLED, SYNCHRO_OK
 
Constructor Summary
OpenMSPFODBSyncListener(java.lang.String collectionName)
           
 
Method Summary
 void endSync()
          Fire this event once the current synchro is ended
protected  java.lang.String[] getDBDataForAdd(java.lang.String pdaUID)
          return the data conforme to the disptacher create AbstractQueryManager method for specified pdaUID .
protected  java.lang.String[] getDBDataForReplace(java.lang.String pdaUID)
          return the data conforme to the disptacher update AbstractQueryManager method for specified pdaUID .
protected  ImportQueryManager getImportQueryManager()
          return the ImportQueryManager use to make synchro data import.
protected  JournalLogRenderer getJournalLogRenderer()
           
protected  java.lang.String getSendCommandMetaData()
          Construct collection description to be use by server to generate collection files.
protected  java.lang.String getSynchroTarget()
          return the target of the SYNC command use to synchronize listener data.
 java.lang.String getSyncName()
          Return the name used to identiy the of the listener in the synchro processus.
protected  Credential getSyncroCredential()
          return the credential to use for data synchronization.
protected  void importCompletSynchroDatabaseFile(java.lang.String importFile)
          Call during complete synchronisation to dump the database with server data store in the specified file name.
 void notifySyncDataDone(java.lang.String pdaID, int actionType)
          Call when a client data modification (ActionDB) has been update on the server side.
 void registerSynchroListener(SynchroFODBReturnListener listener)
           
 void startSync(Credential cred, SynchroDescriptor synchrodescriptor)
          Fire this event once a synchro is starting
 
Methods inherited from class org.openmobileis.synchro.openmsp.client.OpenMSPDBSyncListener
getServerUIDForAOUID, getSyncDataForAtomicObjectUID, manageReturnStatusLog, notifyMAPofUID, receiveMapCommand, receiveResultCommand, receiveStatusCommand, receiveSyncItem, removeServerUIDForAOUID, sendData
 
Methods inherited from class org.openmobileis.synchro.openmsp.client.DefaultOpenMSPSyncListener
addCredentialToCommand, equals, getSynchroStatus, hashCode, initListener, isSyncOK, notifySynchroFailure, receiveAddCommand, receiveDeleteCommand, receiveGetCommand, receiveReplaceCommand, receiveSyncCommand, setSynchroStatus
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenMSPFODBSyncListener

public OpenMSPFODBSyncListener(java.lang.String collectionName)
Method Detail

registerSynchroListener

public void registerSynchroListener(SynchroFODBReturnListener listener)

getSendCommandMetaData

protected java.lang.String getSendCommandMetaData()
                                           throws OpenMSPException
Construct collection description to be use by server to generate collection files.

Overrides:
getSendCommandMetaData in class OpenMSPDBSyncListener
Throws:
OpenMSPException

importCompletSynchroDatabaseFile

protected void importCompletSynchroDatabaseFile(java.lang.String importFile)
                                         throws DatabaseException
Call during complete synchronisation to dump the database with server data store in the specified file name.

Overrides:
importCompletSynchroDatabaseFile in class OpenMSPDBSyncListener
Parameters:
importFile - : file containing server dump data file.
Throws:
DatabaseException

getDBDataForAdd

protected java.lang.String[] getDBDataForAdd(java.lang.String pdaUID)
                                      throws OpenMSPException
Description copied from class: OpenMSPDBSyncListener
return the data conforme to the disptacher create AbstractQueryManager method for specified pdaUID . Return null if no data found

Specified by:
getDBDataForAdd in class OpenMSPDBSyncListener
Throws:
OpenMSPException

getDBDataForReplace

protected java.lang.String[] getDBDataForReplace(java.lang.String pdaUID)
                                          throws OpenMSPException
Description copied from class: OpenMSPDBSyncListener
return the data conforme to the disptacher update AbstractQueryManager method for specified pdaUID . Return null if no data found

Specified by:
getDBDataForReplace in class OpenMSPDBSyncListener
Throws:
OpenMSPException

getSynchroTarget

protected java.lang.String getSynchroTarget()
Description copied from class: OpenMSPDBSyncListener
return the target of the SYNC command use to synchronize listener data.

Specified by:
getSynchroTarget in class OpenMSPDBSyncListener

getSyncName

public java.lang.String getSyncName()
Description copied from interface: OpenMSPSyncListener
Return the name used to identiy the of the listener in the synchro processus. This name correspond to the source in the OpenMS protocol.


getSyncroCredential

protected Credential getSyncroCredential()
Description copied from class: OpenMSPDBSyncListener
return the credential to use for data synchronization. If no need return null.

Specified by:
getSyncroCredential in class OpenMSPDBSyncListener

getImportQueryManager

protected ImportQueryManager getImportQueryManager()
Description copied from class: OpenMSPDBSyncListener
return the ImportQueryManager use to make synchro data import.

Specified by:
getImportQueryManager in class OpenMSPDBSyncListener

getJournalLogRenderer

protected JournalLogRenderer getJournalLogRenderer()
Overrides:
getJournalLogRenderer in class DefaultOpenMSPSyncListener

startSync

public void startSync(Credential cred,
                      SynchroDescriptor synchrodescriptor)
               throws OpenMSPException
Fire this event once a synchro is starting

Specified by:
startSync in interface OpenMSPSyncListener
Overrides:
startSync in class OpenMSPDBSyncListener
Throws:
OpenMSPException

endSync

public void endSync()
             throws OpenMSPException
Fire this event once the current synchro is ended

Specified by:
endSync in interface OpenMSPSyncListener
Overrides:
endSync in class DefaultOpenMSPSyncListener
Throws:
OpenMSPException

notifySyncDataDone

public void notifySyncDataDone(java.lang.String pdaID,
                               int actionType)
                        throws OpenMSPException
Call when a client data modification (ActionDB) has been update on the server side. The actionType is defined by the class ActionDB.

Overrides:
notifySyncDataDone in class OpenMSPDBSyncListener
Parameters:
pdaID - : Id of the object updated on the server side.
actionType - ActionDB modification type
Throws:
OpenMSPException


Copyright 2006 OpenMobileIS. All Rights Reserved.