org.openmobileis.synchro.openmsp.server.synctarget
Class OpenMSPDBSynchroTargetListener

java.lang.Object
  extended byorg.openmobileis.synchro.openmsp.server.synctarget.OpenMSPDBSynchroTargetListener
All Implemented Interfaces:
OpenMSPSynchroTargetListener
Direct Known Subclasses:
FODBOpenMSPSynchroTargetWrapper

public abstract class OpenMSPDBSynchroTargetListener
extends java.lang.Object
implements OpenMSPSynchroTargetListener

Title: OpenMobileIS project source
Description:

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

Constructor Summary
OpenMSPDBSynchroTargetListener()
           
 
Method Summary
protected abstract  void connect(Credential cred)
          validate the credential and connect if needed
protected abstract  void deleteTargetForSynchroObjectId(java.lang.String uid)
           
protected abstract  void disconnect()
           
protected abstract  SynchroAtomicObject[] getAllModifiedAtomicObjectSince(long syncNumber)
          return all atomic object uid modified since specified date for service
protected abstract  OpenMISFile[] getDatabaseImportFiles()
          call for complete DB synchro. return all the file needed to dump the terminal db for this service.
protected abstract  SynchroConflicResolver getSynchroConflicResolver()
           
abstract  java.lang.String getTargetName()
          return the target listener name
protected abstract  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.
 SyncTargetAnswer processCommand(Credential cred, ContainerMessage containerMessage)
           
protected  void processSyncActionMetaData(java.lang.String metadata)
          call to process sync command meta data Extends this method to manage sync command meta data.
protected abstract  void updateTargetWithSynchroObject(java.lang.Object syncObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenMSPDBSynchroTargetListener

public OpenMSPDBSynchroTargetListener()
Method Detail

processCommand

public SyncTargetAnswer processCommand(Credential cred,
                                       ContainerMessage containerMessage)
                                throws OpenMSPException
Specified by:
processCommand in interface OpenMSPSynchroTargetListener
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


processSyncActionMetaData

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

Throws:
ServiceException

getTargetName

public abstract java.lang.String getTargetName()
return the target listener name

Specified by:
getTargetName in interface OpenMSPSynchroTargetListener

connect

protected abstract void connect(Credential cred)
                         throws UserNotFoundException,
                                ServiceException
validate the credential and connect if needed

Throws:
UserNotFoundException
ServiceException

disconnect

protected abstract void disconnect()

getSynchroConflicResolver

protected abstract SynchroConflicResolver getSynchroConflicResolver()

getAllModifiedAtomicObjectSince

protected abstract SynchroAtomicObject[] getAllModifiedAtomicObjectSince(long syncNumber)
                                                                  throws OpenMSPException
return all atomic object uid modified since specified date for service

Throws:
OpenMSPException

updateTargetWithSynchroObject

protected abstract void updateTargetWithSynchroObject(java.lang.Object syncObject)
                                               throws OpenMSPException
Throws:
OpenMSPException

deleteTargetForSynchroObjectId

protected abstract void deleteTargetForSynchroObjectId(java.lang.String uid)
                                                throws OpenMSPException
Throws:
OpenMSPException

getTargetObjectWithId

protected abstract java.lang.Object getTargetObjectWithId(java.lang.String uid)
                                                   throws OpenMSPException
Throws:
OpenMSPException

getDatabaseImportFiles

protected abstract OpenMISFile[] getDatabaseImportFiles()
                                                 throws ServiceException
call for complete DB synchro. return all the file needed to dump the terminal db for this service.

Returns:
Throws:
ServiceException


Copyright 2006 OpenMobileIS. All Rights Reserved.