org.openmobileis.database.fastobjectdb.synchro.server
Class FODBOpenMSPSynchroTargetWrapper

java.lang.Object
  extended byorg.openmobileis.synchro.openmsp.server.synctarget.OpenMSPDBSynchroTargetListener
      extended byorg.openmobileis.database.fastobjectdb.synchro.server.FODBOpenMSPSynchroTargetWrapper
All Implemented Interfaces:
OpenMSPSynchroTargetListener

public final class FODBOpenMSPSynchroTargetWrapper
extends OpenMSPDBSynchroTargetListener

Title: OpenMobileIS project source
Description: To specify the temp directory where generated db file is use the property :org.openmobileis.database.fastobjectdb.synchro.server.generateddb.installpath

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

Constructor Summary
FODBOpenMSPSynchroTargetWrapper(FODBSyncTarget syncService)
          Use this constructor to generate DB file during synchronisation if needed (complete synchronisation) or when no complete synchronisation is needed.
FODBOpenMSPSynchroTargetWrapper(FODBSyncTarget syncService, java.lang.String pregenerateddbpath)
          Use this constructor to work with pregenerated DB file for complete synchronisation pregenerateddbpath is the path to the directory where pregenerated collection file are stored.
 
Method Summary
protected  void connect(Credential cred)
          validate the credential and connect if needed
protected  void deleteTargetForSynchroObjectId(java.lang.String uid)
           
protected  void disconnect()
           
protected  SynchroAtomicObject[] getAllModifiedAtomicObjectSince(long syncNumber)
          return all atomic object uid modified since specified date for service
protected  OpenMISFile[] getDatabaseImportFiles()
          call for complete DB synchro. return all the file needed to dump the terminal db for this service.
protected  SynchroConflicResolver getSynchroConflicResolver()
           
 java.lang.String getTargetName()
          return the target listener name
protected  java.lang.Object getTargetObjectWithId(java.lang.String uid)
           
protected  int getUpdateMaxNbRow()
          Return the max number of row that update file can contains If more than max row must be updated on the PDA, the database file will be send.
protected  void processSyncActionMetaData(java.lang.String metadata)
          call to process sync command meta data
protected  void updateTargetWithSynchroObject(java.lang.Object syncObject)
           
 
Methods inherited from class org.openmobileis.synchro.openmsp.server.synctarget.OpenMSPDBSynchroTargetListener
processCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FODBOpenMSPSynchroTargetWrapper

public FODBOpenMSPSynchroTargetWrapper(FODBSyncTarget syncService,
                                       java.lang.String pregenerateddbpath)
Use this constructor to work with pregenerated DB file for complete synchronisation pregenerateddbpath is the path to the directory where pregenerated collection file are stored.


FODBOpenMSPSynchroTargetWrapper

public FODBOpenMSPSynchroTargetWrapper(FODBSyncTarget syncService)
Use this constructor to generate DB file during synchronisation if needed (complete synchronisation) or when no complete synchronisation is needed.

Method Detail

getTargetName

public java.lang.String getTargetName()
Description copied from class: OpenMSPDBSynchroTargetListener
return the target listener name

Specified by:
getTargetName in interface OpenMSPSynchroTargetListener
Specified by:
getTargetName in class OpenMSPDBSynchroTargetListener

connect

protected void connect(Credential cred)
                throws UserNotFoundException,
                       ServiceException
Description copied from class: OpenMSPDBSynchroTargetListener
validate the credential and connect if needed

Specified by:
connect in class OpenMSPDBSynchroTargetListener
Throws:
UserNotFoundException
ServiceException

disconnect

protected void disconnect()
Specified by:
disconnect in class OpenMSPDBSynchroTargetListener

getSynchroConflicResolver

protected SynchroConflicResolver getSynchroConflicResolver()
Specified by:
getSynchroConflicResolver in class OpenMSPDBSynchroTargetListener

getAllModifiedAtomicObjectSince

protected SynchroAtomicObject[] getAllModifiedAtomicObjectSince(long syncNumber)
                                                         throws OpenMSPException
Description copied from class: OpenMSPDBSynchroTargetListener
return all atomic object uid modified since specified date for service

Specified by:
getAllModifiedAtomicObjectSince in class OpenMSPDBSynchroTargetListener
Throws:
OpenMSPException

updateTargetWithSynchroObject

protected void updateTargetWithSynchroObject(java.lang.Object syncObject)
                                      throws OpenMSPException
Specified by:
updateTargetWithSynchroObject in class OpenMSPDBSynchroTargetListener
Throws:
OpenMSPException

deleteTargetForSynchroObjectId

protected void deleteTargetForSynchroObjectId(java.lang.String uid)
                                       throws OpenMSPException
Specified by:
deleteTargetForSynchroObjectId in class OpenMSPDBSynchroTargetListener
Throws:
OpenMSPException

getTargetObjectWithId

protected java.lang.Object getTargetObjectWithId(java.lang.String uid)
                                          throws OpenMSPException
Specified by:
getTargetObjectWithId in class OpenMSPDBSynchroTargetListener
Throws:
OpenMSPException

getUpdateMaxNbRow

protected int getUpdateMaxNbRow()
Return the max number of row that update file can contains If more than max row must be updated on the PDA, the database file will be send. If return -1 (default implementation) max row in not taken into account (ie always update file) If return 0 the database file is always send

Overrides:
getUpdateMaxNbRow in class OpenMSPDBSynchroTargetListener

processSyncActionMetaData

protected void processSyncActionMetaData(java.lang.String metadata)
                                  throws ServiceException
call to process sync command meta data

Overrides:
processSyncActionMetaData in class OpenMSPDBSynchroTargetListener
Throws:
ServiceException

getDatabaseImportFiles

protected OpenMISFile[] getDatabaseImportFiles()
                                        throws ServiceException
Description copied from class: OpenMSPDBSynchroTargetListener
call for complete DB synchro. return all the file needed to dump the terminal db for this service.

Specified by:
getDatabaseImportFiles in class OpenMSPDBSynchroTargetListener
Returns:
Throws:
ServiceException


Copyright 2006 OpenMobileIS. All Rights Reserved.