com.funambol.email.engine.cache
Class CrcCachedSyncSourceHelper

java.lang.Object
  extended bycom.funambol.email.engine.cache.CrcCachedSyncSourceHelper

public class CrcCachedSyncSourceHelper
extends java.lang.Object

This class includes the common methods for the OpenSource CrcCachedSyncSource and the Enterprise CrcCachedSyncSource.


Constructor Summary
CrcCachedSyncSourceHelper()
           
 
Method Summary
static char getSyncItemStateFromId(java.lang.String key, int syncMode, java.util.ArrayList newItemKeys, java.util.ArrayList deletedItemKeys, java.util.ArrayList updatedItemKeys)
           
static java.util.ArrayList setDeletedItemKeys(java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates deleted items id array
static java.util.ArrayList setDeletedItemKeysWithIdFilter(java.lang.String idfilter, java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates deleted items id array
static java.util.ArrayList setDeletedItemKeysWithTimeFilter(java.util.Date timefilter, int comparison, java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates deleted items id array
static java.util.ArrayList setNewItemKeys(java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates new items id array
static java.util.ArrayList setNewItemKeysWithIdFilter(java.lang.String idfilter, java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates new items id array
static java.util.ArrayList setNewItemKeysWithTimeFilter(java.util.Date timefilter, int comparison, java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates new items id array
static java.util.ArrayList setUpdatedIDFilter(java.lang.String idfilter, java.util.HashMap serverItems)
          in the updated list there is just the id in the filter
static java.util.ArrayList setUpdatedItemKeys(java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates updated items id array
static java.util.ArrayList setUpdatedItemKeysWithIdFilter(java.lang.String idfilter, java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates updated items id array
static java.util.ArrayList setUpdatedItemKeysWithTimeFilter(java.util.Date timefilter, int comparison, java.util.HashMap localItems, java.util.HashMap serverItems)
          Creates updated items id array
static java.util.ArrayList setUpdatedTimeFilter(java.util.Date timefilter, int comparison, java.util.HashMap serverItems)
          in the updated list there are just the emails related to the time filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrcCachedSyncSourceHelper

public CrcCachedSyncSourceHelper()
Method Detail

getSyncItemStateFromId

public static char getSyncItemStateFromId(java.lang.String key,
                                          int syncMode,
                                          java.util.ArrayList newItemKeys,
                                          java.util.ArrayList deletedItemKeys,
                                          java.util.ArrayList updatedItemKeys)
                                   throws com.funambol.framework.engine.source.SyncSourceException
Returns:
char
Throws:
com.funambol.framework.engine.source.SyncSourceException

setNewItemKeys

public static java.util.ArrayList setNewItemKeys(java.util.HashMap localItems,
                                                 java.util.HashMap serverItems)
                                          throws EntityException
Creates new items id array

Returns:
new items id array
Throws:
EntityException

setNewItemKeysWithTimeFilter

public static java.util.ArrayList setNewItemKeysWithTimeFilter(java.util.Date timefilter,
                                                               int comparison,
                                                               java.util.HashMap localItems,
                                                               java.util.HashMap serverItems)
                                                        throws EntityException
Creates new items id array

Returns:
new items id array
Throws:
EntityException

setNewItemKeysWithIdFilter

public static java.util.ArrayList setNewItemKeysWithIdFilter(java.lang.String idfilter,
                                                             java.util.HashMap localItems,
                                                             java.util.HashMap serverItems)
                                                      throws EntityException
Creates new items id array

Returns:
new items id array
Throws:
EntityException

setDeletedItemKeys

public static java.util.ArrayList setDeletedItemKeys(java.util.HashMap localItems,
                                                     java.util.HashMap serverItems)
                                              throws EntityException
Creates deleted items id array

Parameters:
localItems - map with all local CrcSyncItemInfo
serverItems - map with all Mail Server CrcSyncItemInfo
Returns:
deleted items id array
Throws:
EntityException

setDeletedItemKeysWithTimeFilter

public static java.util.ArrayList setDeletedItemKeysWithTimeFilter(java.util.Date timefilter,
                                                                   int comparison,
                                                                   java.util.HashMap localItems,
                                                                   java.util.HashMap serverItems)
                                                            throws EntityException
Creates deleted items id array

Parameters:
comparison - GE or LT
localItems - map with all local CrcSyncItemInfo
serverItems - map with all Mail Server CrcSyncItemInfo
Returns:
deleted items id array
Throws:
EntityException

setDeletedItemKeysWithIdFilter

public static java.util.ArrayList setDeletedItemKeysWithIdFilter(java.lang.String idfilter,
                                                                 java.util.HashMap localItems,
                                                                 java.util.HashMap serverItems)
                                                          throws EntityException
Creates deleted items id array

Parameters:
localItems - map with all local CrcSyncItemInfo
serverItems - map with all Mail Server CrcSyncItemInfo
Returns:
deleted items id array
Throws:
EntityException

setUpdatedItemKeys

public static java.util.ArrayList setUpdatedItemKeys(java.util.HashMap localItems,
                                                     java.util.HashMap serverItems)
                                              throws EntityException
Creates updated items id array

Parameters:
localItems - map with all local CrcSyncItemInfo
serverItems - map with all Mail Server CrcSyncItemInfo
Returns:
updated items id array
Throws:
EntityException

setUpdatedItemKeysWithTimeFilter

public static java.util.ArrayList setUpdatedItemKeysWithTimeFilter(java.util.Date timefilter,
                                                                   int comparison,
                                                                   java.util.HashMap localItems,
                                                                   java.util.HashMap serverItems)
                                                            throws EntityException
Creates updated items id array

Parameters:
comparison - GE or LT
Returns:
updated items id array
Throws:
EntityException

setUpdatedItemKeysWithIdFilter

public static java.util.ArrayList setUpdatedItemKeysWithIdFilter(java.lang.String idfilter,
                                                                 java.util.HashMap localItems,
                                                                 java.util.HashMap serverItems)
                                                          throws EntityException
Creates updated items id array

Returns:
updated items id array
Throws:
EntityException

setUpdatedTimeFilter

public static java.util.ArrayList setUpdatedTimeFilter(java.util.Date timefilter,
                                                       int comparison,
                                                       java.util.HashMap serverItems)
                                                throws EntityException
in the updated list there are just the emails related to the time filter

Parameters:
timefilter - Date
comparison - GE or LT
Throws:
EntityException

setUpdatedIDFilter

public static java.util.ArrayList setUpdatedIDFilter(java.lang.String idfilter,
                                                     java.util.HashMap serverItems)
                                              throws EntityException
in the updated list there is just the id in the filter

Parameters:
serverItems - map with all the CrcSyncItemInfo
Throws:
EntityException


Copyright © 2003-2006 Funambol.