|
||||||||||
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.engine.cache.CrcCachedSyncSource
com.funambol.email.engine.source.EmailSyncSource
This class implements common methods of
EmailIMAPSyncSource EmailPOPSyncSourceversion $Id: EmailSyncSource.java,v 1.32 2006/06/14 08:33:09 gbmiglia Exp $
Field Summary | |
protected boolean |
allMailboxActivation
Should the channel be allMailboxActivation? |
protected DefaultFolder |
defaultFolder
|
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 boolean |
draftActivation
Should the channel be draftActivation |
protected EntityManager |
em
|
protected EmailFilter |
filter
|
protected static com.funambol.server.tools.IdSpaceGenerator |
idFolderSpace
|
protected static com.funambol.server.tools.IdSpaceGenerator |
idSentSpace
|
protected boolean |
inboxActivation
Should the channel be inboxActivation? |
protected java.lang.String |
inHost
Property Incoming Server |
protected java.lang.String |
inPort
Property Incoming Server Port |
protected java.lang.String |
keystorePassphrase
Property keystorePassphrase |
protected java.lang.String |
keystorePath
Property keystorePath |
protected java.util.logging.Logger |
log
|
protected IMailServerWrapper |
mswf
wrapper for the Mail Server |
protected boolean |
outboxActivation
Should the channel be outboxActivation? |
protected java.lang.String |
outHost
Property Incoming Server |
protected java.lang.String |
outPort
Property Incoming Server Port |
protected java.security.Principal |
principal
Property Principal |
protected java.lang.String |
protocol
Property Mail Server Server protocol |
protected boolean |
sentActivation
Should the channel be sentActivation? |
protected boolean |
smtpAuth
Property Outgoing authentication required |
protected boolean |
ssl
Should the channel be ssl? |
protected int |
syncMode
Property syncMode |
protected boolean |
trashActivation
Should the channel be 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 | |
EmailSyncSource()
|
Method Summary | |
void |
beginSync(com.funambol.framework.engine.source.SyncContext context)
Begin Sync Method before starting sync the method set the filter main 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 0 1 1 1 1 --> 15 inbox + outbox + sent + draft 1 1 1 1 1 --> 31 inbox + outbox + sent + draft + trash time filter (timeFilter) null --> all "i.e. 20-10-2005" --> filter size filter (sizeFilter / numbytes) 000001 --> 1 FILTER_SIZE_H 000011 --> 3 FILTER_SIZE_H_PERC 000101 --> 5 FILTER_SIZE_H_B 001111 --> 15 FILTER_SIZE_H_B_PERC 010101 --> 21 FILTER_SIZE_H_B_A 111111 --> 63 FILTER_SIZE_H_B_A_PERC |
protected com.funambol.framework.engine.SyncItem |
createSyncItem(Email email,
char status)
|
protected com.funambol.framework.engine.SyncItem |
createSyncItem(Folder folder,
char status)
|
void |
endSync()
End Sync Method |
DefaultFolder |
getDefaultFolder()
Getter for property defaultFolder. |
protected com.funambol.framework.server.Sync4jDevice |
getDevice(java.lang.String deviceId)
Return the device with the given deviceId |
Folder |
getFoundationFolderFromXML(java.lang.String content)
Get Data from XML message converting the xml item into a Folder object |
Email |
getFoundationMailFromXML(java.lang.String content)
Get Data from XML message converting the xml item into a Email object |
java.lang.String |
getInHost()
Getter for property Incoming Mail Server Host. |
java.lang.String |
getInPort()
Getter for property Incoming Mail Server Port. |
java.lang.String |
getKeystorePassphrase()
Getter for property keystorePassphrase |
java.lang.String |
getKeystorePath()
Getter for property keystorePath |
java.lang.String |
getOutHost()
Getter for property Outgoing Mail Server Host. |
java.lang.String |
getOutPort()
Getter for property Outgoing Mail Server Port. |
java.lang.String |
getProtocol()
Getter for property Mail Server protocol. |
java.lang.String |
getXMLFromFoundationFolder(Folder folder)
Get Data from foundation.pdi.mail.Folder converting the Folder object into an xml item |
java.lang.String |
getXMLFromFoundationMail(Email mail)
Get Data from sync4j.foundation.pdi.mail.Email converting the Contact object into an xml item |
protected void |
insertCustomFolder()
insert the default folder if needed |
protected void |
insertDefaultFolder()
insert the default folder if needed |
boolean |
isAllMailboxActivation()
Getter for property allMailboxActivation. |
boolean |
isDraftActivation()
Getter for property draftActivation. |
protected boolean |
isEmailFromContent(java.lang.String content)
Returns true if the syncitem is a Mail, false if the sycItem is a Folder |
protected boolean |
isEmailFromKey(java.lang.String parentId,
java.lang.String objectId)
Returns true if the syncitem is a Mail false if the sycItem is a Folder the key is composed by: parentId/objId (mailid or folderid) The key is created by the connector and it always creates the syncItemKey using parentId and mailId |
boolean |
isInboxActivation()
Getter for property inboxActivation. |
boolean |
isOutboxActivation()
Getter for property outboxActivation. |
boolean |
isSentActivation()
Getter for property sentActivation. |
boolean |
isSmtpAuth()
Getter for property Outgoing authentication required |
boolean |
isSSL()
Getter for property ssl. |
boolean |
isTrashActivation()
Getter for property trashActivation. |
void |
setAllMailboxActivation(boolean allMailboxActivation)
Setter for property allMailboxActivation. |
void |
setDefaultFolder(DefaultFolder defaultFolder)
Setter for property defaultFolder. |
void |
setDraftActivation(boolean draftActivation)
Setter for property draftActivation. |
void |
setInboxActivation(boolean inboxActivation)
Setter for property inboxActivation. |
void |
setInHost(java.lang.String inHost)
Setter for property Incoming Mail Server. |
void |
setInPort(java.lang.String inPort)
Setter for property Incoming Mail Server Port. |
void |
setKeystorePassphrase(java.lang.String keystorePassphrase)
Setter for keystorePassphrase |
void |
setKeystorePath(java.lang.String keystorePath)
Setter for property keystorePath |
void |
setOutboxActivation(boolean outboxActivation)
Setter for property outboxActivation. |
void |
setOutHost(java.lang.String outHost)
Setter for property Outgoing Mail Server. |
void |
setOutPort(java.lang.String outPort)
Setter for property Outgoing Mail Server Port. |
void |
setProtocol(java.lang.String protocol)
Setter for property Mail Server protocol. |
void |
setSentActivation(boolean sentActivation)
Setter for property sentActivation. |
void |
setSmtpAuth(boolean smtpAuth)
Setter for property Outgoing authentication required |
void |
setSSL(boolean ssl)
Setter for property ssl. |
void |
setTrashActivation(boolean trashActivation)
Setter for property trashActivation. |
Methods inherited from class com.funambol.email.engine.cache.CrcCachedSyncSource |
clearServerInfo, getAllSyncItemInfo, getDeletedSyncItemKeys, getNewSyncItemKeys, getSyncItemStateFromId, getUpdatedSyncItemKeys, init |
Methods inherited from class com.funambol.framework.engine.source.AbstractSyncSource |
addSyncItem, commitSync, getAllSyncItemKeys, getInfo, getName, getSourceQuery, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, 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.FilterableSyncSource |
getSyncItemStateFromId, isSyncItemInFilterClause, isSyncItemInFilterClause |
Methods inherited from interface com.funambol.framework.engine.source.SyncSource |
addSyncItem, commitSync, getAllSyncItemKeys, getDeletedSyncItemKeys, getInfo, getName, getNewSyncItemKeys, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, getUpdatedSyncItemKeys, 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 EmailFilter filter
protected static com.funambol.server.tools.IdSpaceGenerator idSentSpace
protected static com.funambol.server.tools.IdSpaceGenerator idFolderSpace
protected boolean ssl
protected java.lang.String keystorePath
protected java.lang.String keystorePassphrase
protected boolean allMailboxActivation
protected boolean inboxActivation
protected boolean outboxActivation
protected boolean sentActivation
protected boolean draftActivation
protected boolean trashActivation
protected java.lang.String inHost
protected java.lang.String inPort
protected java.lang.String outHost
protected java.lang.String outPort
protected boolean smtpAuth
protected java.lang.String protocol
protected DefaultFolder defaultFolder
Constructor Detail |
public EmailSyncSource()
Method Detail |
public boolean isSSL()
public void setSSL(boolean ssl)
ssl
- New value of property ssl.public java.lang.String getKeystorePath()
public void setKeystorePath(java.lang.String keystorePath)
keystorePath
- String. New value of property keystorePathpublic java.lang.String getKeystorePassphrase()
public void setKeystorePassphrase(java.lang.String keystorePassphrase)
keystorePassphrase
- String. New value of property keystorePassphrasepublic boolean isAllMailboxActivation()
public void setAllMailboxActivation(boolean allMailboxActivation)
allMailboxActivation
- New value of property allMailboxActivation.public boolean isInboxActivation()
public void setInboxActivation(boolean inboxActivation)
inboxActivation
- New value of property inboxActivation.public boolean isOutboxActivation()
public void setOutboxActivation(boolean outboxActivation)
outboxActivation
- New value of property outboxActivation.public boolean isSentActivation()
public void setSentActivation(boolean sentActivation)
sentActivation
- New value of property sentActivation.public boolean isDraftActivation()
public void setDraftActivation(boolean draftActivation)
draftActivation
- New value of property draftActivation.public boolean isTrashActivation()
public void setTrashActivation(boolean trashActivation)
trashActivation
- New value of property trashActivation.public java.lang.String getInHost()
public void setInHost(java.lang.String inHost)
inHost
- String New value of property Incoming Mail Server.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 getOutHost()
public void setOutHost(java.lang.String outHost)
outHost
- String New value of property Outgoing Mail Server.public java.lang.String getOutPort()
public void setOutPort(java.lang.String outPort)
outPort
- String New value of property Outgoing Mail Server Port.public boolean isSmtpAuth()
public void setSmtpAuth(boolean smtpAuth)
smtpAuth
- boolean New value of property Outgoing authentication required.public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
protocol
- String. New value of property Mail Server protocol.public DefaultFolder getDefaultFolder()
public void setDefaultFolder(DefaultFolder defaultFolder)
defaultFolder
- DefaultFolderpublic void beginSync(com.funambol.framework.engine.source.SyncContext context) throws com.funambol.framework.engine.source.SyncSourceException
beginSync
in interface com.funambol.framework.engine.source.SyncSource
beginSync
in class CrcCachedSyncSource
context
- SyncContext
com.funambol.framework.engine.source.SyncSourceException
public void endSync() throws com.funambol.framework.engine.source.SyncSourceException
endSync
in interface com.funambol.framework.engine.source.SyncSource
endSync
in class CrcCachedSyncSource
com.funambol.framework.engine.source.SyncSourceException
public java.lang.String getXMLFromFoundationMail(Email mail) throws EntityException
mail
- Email
EntityException
public java.lang.String getXMLFromFoundationFolder(Folder folder) throws EntityException
folder
- Folder
EntityException
protected boolean isEmailFromContent(java.lang.String content)
content
- String
protected boolean isEmailFromKey(java.lang.String parentId, java.lang.String objectId) throws com.funambol.framework.engine.source.SyncSourceException
parentId
- StringobjectId
- String
com.funambol.framework.engine.source.SyncSourceException
protected void insertDefaultFolder() throws com.funambol.framework.engine.source.SyncSourceException
com.funambol.framework.engine.source.SyncSourceException
protected void insertCustomFolder() throws com.funambol.framework.engine.source.SyncSourceException
com.funambol.framework.engine.source.SyncSourceException
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
public Email getFoundationMailFromXML(java.lang.String content) throws EntityException
content
- String
EntityException
public Folder getFoundationFolderFromXML(java.lang.String content) throws EntityException
content
- String
EntityException
protected com.funambol.framework.engine.SyncItem createSyncItem(Email email, char status) throws EntityException
email
- Emailstatus
- char
EntityException
protected com.funambol.framework.engine.SyncItem createSyncItem(Folder folder, char status) throws EntityException
folder
- Folderstatus
- char
EntityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |