com.funambol.email.engine.source
Class PopEmailSyncSource

java.lang.Object
  extended by com.funambol.framework.engine.source.AbstractSyncSource
      extended by com.funambol.email.engine.cache.CrcCachedSyncSource
          extended by com.funambol.email.engine.source.EmailSyncSource
              extended by com.funambol.email.engine.source.PopEmailSyncSource
All Implemented Interfaces:
com.funambol.framework.engine.source.FilterableSyncSource, com.funambol.framework.engine.source.SyncSource, com.funambol.framework.tools.beans.LazyInitBean, java.io.Serializable

public final class PopEmailSyncSource
extends EmailSyncSource
implements com.funambol.framework.engine.source.FilterableSyncSource, java.io.Serializable, com.funambol.framework.tools.beans.LazyInitBean

This class implements common methods of EmailPOPSyncSource

version $Id: PopEmailSyncSource.java,v 1.23 2006/05/11 08:08:27 gbmiglia Exp $

See Also:
Serialized Form

Field Summary
protected  java.util.logging.Logger log
           
protected  PopEntityManager pem
           
 
Fields inherited from class com.funambol.email.engine.source.EmailSyncSource
allMailboxActivation, defaultFolder, device, deviceCharset, deviceTimeZone, deviceTimeZoneDescr, draftActivation, em, filter, idFolderSpace, idSentSpace, inboxActivation, inHost, inPort, keystorePassphrase, keystorePath, mswf, outboxActivation, outHost, outPort, principal, protocol, sentActivation, ssl, syncMode, trashActivation
 
Fields inherited from class com.funambol.email.engine.cache.CrcCachedSyncSource
itemsSent, jndiDataSourceName
 
Fields inherited from class com.funambol.framework.engine.source.AbstractSyncSource
howManyAdded, howManyDeleted, howManyUpdated, info, LOG_NAME, name, sourceQuery, sourceURI, type
 
Constructor Summary
PopEmailSyncSource()
           
 
Method Summary
 com.funambol.framework.engine.SyncItem addSyncItem(com.funambol.framework.engine.SyncItem syncItem)
          This method can only send the mail but not append the mail in the outbox and sent folder.
 void clearServerInfo()
           
 CrcSyncItemInfo[] getAllSyncItemInfo()
           
 com.funambol.framework.engine.SyncItemKey[] getAllSyncItemKeys()
           
 com.funambol.framework.engine.SyncItem getSyncItemFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
           
 com.funambol.framework.engine.SyncItemKey[] getSyncItemKeysFromTwin(com.funambol.framework.engine.SyncItem syncItem)
           
 void init()
          Init the syncSource
 boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItem syncItem)
           
 boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItemKey syncItemKey)
           
 void removeSyncItem(com.funambol.framework.engine.SyncItemKey syncItemKey, java.sql.Timestamp s, boolean softDelete)
           
 void setOperationStatus(java.lang.String operation, int statusCode, com.funambol.framework.engine.SyncItemKey[] keys)
           
 com.funambol.framework.engine.SyncItem updateSyncItem(com.funambol.framework.engine.SyncItem syncItem)
           
 
Methods inherited from class com.funambol.email.engine.source.EmailSyncSource
beginSync, createSyncItem, createSyncItem, endSync, getDefaultFolder, getDevice, getFoundationFolderFromXML, getFoundationMailFromXML, getInHost, getInPort, getKeystorePassphrase, getKeystorePath, getOutHost, getOutPort, getProtocol, getXMLFromFoundationFolder, getXMLFromFoundationMail, insertCustomFolder, insertDefaultFolder, isAllMailboxActivation, isDraftActivation, isEmailFromContent, isEmailFromKey, isInboxActivation, isOutboxActivation, isSentActivation, isSSL, isTrashActivation, setAllMailboxActivation, setDefaultFolder, setDraftActivation, setInboxActivation, setInHost, setInPort, setKeystorePassphrase, setKeystorePath, setOutboxActivation, setOutHost, setOutPort, setProtocol, setSentActivation, setSSL, setTrashActivation
 
Methods inherited from class com.funambol.email.engine.cache.CrcCachedSyncSource
getDeletedSyncItemKeys, getNewSyncItemKeys, getSyncItemStateFromId, getUpdatedSyncItemKeys, insertSentItem
 
Methods inherited from class com.funambol.framework.engine.source.AbstractSyncSource
commitSync, getInfo, getName, getSourceQuery, getSourceURI, getType, setInfo, setName, setSourceURI, setType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.funambol.framework.engine.source.FilterableSyncSource
getSyncItemStateFromId
 
Methods inherited from interface com.funambol.framework.engine.source.SyncSource
beginSync, commitSync, endSync, getDeletedSyncItemKeys, getInfo, getName, getNewSyncItemKeys, getSourceURI, getType, getUpdatedSyncItemKeys
 

Field Detail

log

protected java.util.logging.Logger log

pem

protected PopEntityManager pem
Constructor Detail

PopEmailSyncSource

public PopEmailSyncSource()
Method Detail

init

public void init()
          throws com.funambol.framework.tools.beans.BeanInitializationException
Init the syncSource

Specified by:
init in interface com.funambol.framework.tools.beans.LazyInitBean
Overrides:
init in class CrcCachedSyncSource
Throws:
com.funambol.framework.tools.beans.BeanInitializationException

isSyncItemInFilterClause

public boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItem syncItem)
                                 throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
isSyncItemInFilterClause in interface com.funambol.framework.engine.source.FilterableSyncSource
Parameters:
syncItem - SyncItem
Returns:
boolean
Throws:
com.funambol.framework.engine.source.SyncSourceException

isSyncItemInFilterClause

public boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItemKey syncItemKey)
                                 throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
isSyncItemInFilterClause in interface com.funambol.framework.engine.source.FilterableSyncSource
Parameters:
syncItemKey - SyncItemKey
Returns:
boolean
Throws:
com.funambol.framework.engine.source.SyncSourceException

setOperationStatus

public void setOperationStatus(java.lang.String operation,
                               int statusCode,
                               com.funambol.framework.engine.SyncItemKey[] keys)
Specified by:
setOperationStatus in interface com.funambol.framework.engine.source.SyncSource
Specified by:
setOperationStatus in class com.funambol.framework.engine.source.AbstractSyncSource
Parameters:
operation - String
statusCode - int
keys - SyncItemKey[]

removeSyncItem

public void removeSyncItem(com.funambol.framework.engine.SyncItemKey syncItemKey,
                           java.sql.Timestamp s,
                           boolean softDelete)
                    throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
removeSyncItem in interface com.funambol.framework.engine.source.SyncSource
Specified by:
removeSyncItem in class com.funambol.framework.engine.source.AbstractSyncSource
Parameters:
syncItemKey - SyncItemKey
s - Timestamp
softDelete - boolean
Throws:
com.funambol.framework.engine.source.SyncSourceException

getSyncItemFromId

public com.funambol.framework.engine.SyncItem getSyncItemFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
                                                         throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getSyncItemFromId in interface com.funambol.framework.engine.source.SyncSource
Specified by:
getSyncItemFromId in class com.funambol.framework.engine.source.AbstractSyncSource
Parameters:
syncItemKey - SyncItemKey
Returns:
SyncItem
Throws:
com.funambol.framework.engine.source.SyncSourceException
See Also:
SyncSource

getAllSyncItemKeys

public com.funambol.framework.engine.SyncItemKey[] getAllSyncItemKeys()
                                                               throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getAllSyncItemKeys in interface com.funambol.framework.engine.source.SyncSource
Specified by:
getAllSyncItemKeys in class com.funambol.framework.engine.source.AbstractSyncSource
Returns:
SyncItemKey[]
Throws:
com.funambol.framework.engine.source.SyncSourceException

getAllSyncItemInfo

public CrcSyncItemInfo[] getAllSyncItemInfo()
                                     throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getAllSyncItemInfo in class CrcCachedSyncSource
Returns:
SyncItemInfo[]
Throws:
com.funambol.framework.engine.source.SyncSourceException

clearServerInfo

public void clearServerInfo()
                     throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
clearServerInfo in class CrcCachedSyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

getSyncItemKeysFromTwin

public com.funambol.framework.engine.SyncItemKey[] getSyncItemKeysFromTwin(com.funambol.framework.engine.SyncItem syncItem)
                                                                    throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getSyncItemKeysFromTwin in interface com.funambol.framework.engine.source.SyncSource
Specified by:
getSyncItemKeysFromTwin in class com.funambol.framework.engine.source.AbstractSyncSource
Parameters:
syncItem - SyncItem
Returns:
SyncItemKey[]
Throws:
com.funambol.framework.engine.source.SyncSourceException

addSyncItem

public com.funambol.framework.engine.SyncItem addSyncItem(com.funambol.framework.engine.SyncItem syncItem)
                                                   throws com.funambol.framework.engine.source.SyncSourceException
This method can only send the mail but not append the mail in the outbox and sent folder.

Specified by:
addSyncItem in interface com.funambol.framework.engine.source.SyncSource
Specified by:
addSyncItem in class com.funambol.framework.engine.source.AbstractSyncSource
Parameters:
syncItem - SyncItem
Returns:
SyncItem
Throws:
com.funambol.framework.engine.source.SyncSourceException

updateSyncItem

public com.funambol.framework.engine.SyncItem updateSyncItem(com.funambol.framework.engine.SyncItem syncItem)
                                                      throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
updateSyncItem in interface com.funambol.framework.engine.source.SyncSource
Specified by:
updateSyncItem in class com.funambol.framework.engine.source.AbstractSyncSource
Parameters:
syncItem - SyncItem
Returns:
SyncItem
Throws:
com.funambol.framework.engine.source.SyncSourceException


Copyright © 2003-2006 Funambol.