|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.framework.engine.source.AbstractSyncSource
com.funambol.email.cache.CrcCachedSyncSource
com.funambol.email.engine.source.EmailSyncSource
This class implements common methods of
EmailIMAPSyncSource EmailPOPSyncSourceversion $Id: EmailSyncSource.java,v 1.2 2006/02/06 09:00:20 gbmiglia Exp $
Field Summary | |
protected com.funambol.framework.server.Sync4jDevice |
device
Property for sync session |
protected java.lang.String |
deviceCharset
Property for sync session |
protected java.util.TimeZone |
deviceTimeZone
Property for sync session |
protected java.lang.String |
deviceTimeZoneDescr
Property for sync session |
protected EntityManager |
em
|
protected boolean |
encode
Should the content be encoded? |
protected int |
folderFilter
filter |
protected java.lang.String |
idFilter
|
protected java.lang.String |
inHost
Property Incoming Server get from the Connector Panel |
protected java.lang.String |
inPort
Property Incoming Server Port |
protected boolean |
isAttachFieldSet
|
protected boolean |
isBodyFieldSet
|
protected boolean |
isHeaderFieldSet
|
protected java.lang.String |
language
Property Mail Server Language |
protected java.util.logging.Logger |
log
|
protected IMailServerWrapper |
mswf
wrapper for the Mail Server |
protected int |
numBytes
|
protected java.lang.String |
outHost
Property Outgoing Server get from the Connector Panel |
protected java.security.Principal |
principal
Property Principal |
protected java.lang.String |
protocol
Property Mail Server Server protocol |
protected int |
sizeFilter
|
protected boolean |
ssl
Should the channel be ssl? |
protected int |
syncMode
Property syncMode |
protected java.util.Date |
timeFilter
|
Fields inherited from class com.funambol.email.cache.CrcCachedSyncSource |
itemsSent |
Fields inherited from class com.funambol.framework.engine.source.AbstractSyncSource |
howManyAdded, howManyDeleted, howManyUpdated, info, LOG_NAME, name, sourceQuery, sourceURI, type |
Constructor Summary | |
EmailSyncSource()
|
Method Summary | |
void |
beginSync(java.security.Principal principal,
int syncMode,
com.funambol.framework.filter.FilterClause filterClause)
BeginSync |
protected com.funambol.framework.engine.SyncItem |
createSyncItem(Email email,
char status)
|
protected com.funambol.framework.engine.SyncItem |
createSyncItem(java.lang.String uid,
char status)
create a single syncitem with UID and the empty content. |
protected com.funambol.framework.engine.SyncItem[] |
createSyncItems(java.util.List mails,
char status,
boolean delete)
Create SyncItem from Contact |
void |
endSync()
EndSync |
protected com.funambol.framework.server.Sync4jDevice |
getDevice(java.lang.String deviceId)
Return the device with the given deviceId |
protected Email |
getFoundationMailFromXML(java.lang.String content)
Get Data from XML message converting the xml item into a Email object |
java.lang.String |
getInPort()
Getter for property Incoming Mail Server Port. |
java.lang.String |
getLanguage()
Getter for property Mail Server Language |
java.lang.String |
getProtocol()
Getter for property Mail Server protocol. |
protected java.lang.String |
getXMLFromFoundationMail(Email mail)
Get Data from sync4j.foundation.pdi.mail.Email converting the Contact object into an xml item |
boolean |
isEncode()
Getter for property encode. |
boolean |
isSSL()
Getter for property ssl. |
void |
setEncode(boolean encode)
Setter for property encode. |
void |
setInPort(java.lang.String inPort)
Setter for property Incoming Mail Server Port. |
void |
setLanguage(java.lang.String language)
Setter for property Mail Server Language |
void |
setProtocol(java.lang.String protocol)
Setter for property Mail Server protocol. |
void |
setSSL(boolean ssl)
Setter for property ssl. |
Methods inherited from class com.funambol.email.cache.CrcCachedSyncSource |
getAllSyncItemInfo, getDeletedSyncItemKeys, getNewSyncItemKeys, getSyncItemStateFromId, getUpdatedSyncItemKeys, init, insertSentItem |
Methods inherited from class com.funambol.framework.engine.source.AbstractSyncSource |
addSyncItem, getAllSyncItemKeys, getInfo, getName, getSourceQuery, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, isSyncItemInFilterClause, isSyncItemInFilterClause, mergeSyncItems, removeSyncItem, removeSyncItem, setInfo, setName, setOperationStatus, setSourceURI, setType, toString, updateSyncItem |
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.SyncSource |
addSyncItem, getAllSyncItemKeys, getDeletedSyncItemKeys, getInfo, getName, getNewSyncItemKeys, getSourceQuery, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getSyncItemStateFromId, getType, getUpdatedSyncItemKeys, isSyncItemInFilterClause, isSyncItemInFilterClause, mergeSyncItems, removeSyncItem, removeSyncItem, setOperationStatus, updateSyncItem |
Field Detail |
protected java.util.logging.Logger log
protected com.funambol.framework.server.Sync4jDevice device
protected java.lang.String deviceTimeZoneDescr
protected java.util.TimeZone deviceTimeZone
protected java.lang.String deviceCharset
protected java.security.Principal principal
protected int syncMode
protected IMailServerWrapper mswf
protected EntityManager em
protected java.lang.String inHost
protected java.lang.String outHost
protected int folderFilter
protected java.lang.String idFilter
protected java.util.Date timeFilter
protected int sizeFilter
protected int numBytes
protected boolean isHeaderFieldSet
protected boolean isBodyFieldSet
protected boolean isAttachFieldSet
protected boolean ssl
protected java.lang.String inPort
protected java.lang.String protocol
protected java.lang.String language
protected boolean encode
Constructor Detail |
public EmailSyncSource()
Method Detail |
public boolean isSSL()
public void setSSL(boolean ssl)
ssl
- New value of property ssl.public java.lang.String getInPort()
public void setInPort(java.lang.String inPort)
inPort
- String New value of property Incoming Mail Server Port.public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
protocol
- String. New value of property Mail Server protocol.public java.lang.String getLanguage()
public void setLanguage(java.lang.String language)
language
- String New value of property Mail Server Languagepublic boolean isEncode()
public void setEncode(boolean encode)
encode
- New value of property encode.public void beginSync(java.security.Principal principal, int syncMode, com.funambol.framework.filter.FilterClause filterClause) throws com.funambol.framework.engine.source.SyncSourceException
CrcCachedSyncSource
beginSync
in interface com.funambol.framework.engine.source.SyncSource
beginSync
in class CrcCachedSyncSource
principal
- PrincipalsyncMode
- intfilterClause
- FilterClause
com.funambol.framework.engine.source.SyncSourceException
set the filter
folder filter
T D S O I
0 0 0 0 1 --> 1 inbox
0 0 0 1 1 --> 3 inbox + outbox
0 0 1 1 1 --> 7 inbox + outbox + sent
...
1 1 1 1 1 --> 31 all
time filter (timeFilter)
null --> all
"i.e. 20-10-2005" --> filter
size filter (sizeFilter / numbytes)
000001 = 1 FILTER_SIZE_H
000011 = 3 FILTER_SIZE_HPERC
000101 = 5 FILTER_SIZE_H_B
001111 = 15 FILTER_SIZE_H_BPERC
010101 = 21 FILTER_SIZE_H_B_A
111111 = 63 FILTER_SIZE_H_B_APERC
public void endSync() throws com.funambol.framework.engine.source.SyncSourceException
CrcCachedSyncSource
endSync
in interface com.funambol.framework.engine.source.SyncSource
endSync
in class CrcCachedSyncSource
com.funambol.framework.engine.source.SyncSourceException
SyncSource
protected com.funambol.framework.server.Sync4jDevice getDevice(java.lang.String deviceId) throws com.funambol.framework.server.store.PersistentStoreException
deviceId
- String
com.funambol.framework.server.store.PersistentStoreException
protected com.funambol.framework.engine.SyncItem createSyncItem(java.lang.String uid, char status)
uid
- Stringstatus
- char
protected com.funambol.framework.engine.SyncItem[] createSyncItems(java.util.List mails, char status, boolean delete) throws EntityException
mails
- Liststatus
- chardelete
- boolean
EntityException
protected Email getFoundationMailFromXML(java.lang.String content) throws EntityException
content
- String
EntityException
protected java.lang.String getXMLFromFoundationMail(Email mail) throws EntityException
mail
- Email
EntityException
protected com.funambol.framework.engine.SyncItem createSyncItem(Email email, char status) throws EntityException
email
- Emailstatus
- char
EntityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |