com.funambol.email.items.dao
Class PopEntityDAO

java.lang.Object
  extended bycom.funambol.email.items.dao.EntityDAO
      extended bycom.funambol.email.items.dao.PopEntityDAO

public class PopEntityDAO
extends EntityDAO

This class implements methods to access data in Mail Server datastore.


Field Summary
 
Fields inherited from class com.funambol.email.items.dao.EntityDAO
dataSource, jndiDataSourceName, log
 
Constructor Summary
PopEntityDAO()
           
PopEntityDAO(java.lang.String jndiDataSourceName)
           
 
Method Summary
 java.lang.String addEmail(java.lang.String FID, javax.mail.Message msg, com.funambol.server.tools.IdSpaceGenerator idSentSpace, java.lang.String source_uri, long principalId)
           
 javax.mail.Message[] getAllEmailsInbox(com.sun.mail.pop3.POP3Folder f, EmailFilter filter, java.util.Locale loc)
          gets all Messages
 java.lang.String[] getAllEmailsSent(EmailFilter filter, java.lang.String source_uri, long principalId)
           
 ItemMessage getEmailFromMessageID(com.sun.mail.pop3.POP3Folder f, java.lang.String parentId, java.lang.String message_id)
          serch a document using the header Message-ID
 ItemMessage getEmailFromMessageID(java.lang.String message_id, javax.mail.Session s, java.lang.String source_uri, long principalId)
          serch a document using the header Message-ID
 javax.mail.Message getEmailFromUID(com.sun.mail.pop3.POP3Folder f, java.lang.String uid)
          serch a document using UID for POP3 protocol UID is String
 javax.mail.Message getEmailFromUID(java.lang.String GUID, javax.mail.Session s, java.lang.String source_uri, long principalId)
           
 void removeAllEmail(com.sun.mail.pop3.POP3Folder f)
           
 void removeEmail(com.sun.mail.pop3.POP3Folder f, java.lang.String uid)
           
 void removeEmail(java.lang.String GUID, java.lang.String source_uri, long principalId)
           
 
Methods inherited from class com.funambol.email.items.dao.EntityDAO
getDefaultFolder, getFolderFromUID, getFullPathFromFID, getFullPathFromGUID, getGUIDFromFullPath, insertCustomFolder, insertDefaultFolderInDB, insertDefaultFolderInMailServer, insertFolder, lookupDataSource, removeFolder, removeImapOutboxItem, removePopOutboxItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopEntityDAO

public PopEntityDAO()

PopEntityDAO

public PopEntityDAO(java.lang.String jndiDataSourceName)
Parameters:
jndiDataSourceName - String
Method Detail

addEmail

public java.lang.String addEmail(java.lang.String FID,
                                 javax.mail.Message msg,
                                 com.funambol.server.tools.IdSpaceGenerator idSentSpace,
                                 java.lang.String source_uri,
                                 long principalId)
                          throws EntityException
Parameters:
FID - IMAPFolder ID
msg - Message
idSentSpace - The GUID generator
source_uri - The SyncSource URI.
principalId - The principal ID.
Returns:
GUID String
Throws:
EntityException

getAllEmailsInbox

public javax.mail.Message[] getAllEmailsInbox(com.sun.mail.pop3.POP3Folder f,
                                              EmailFilter filter,
                                              java.util.Locale loc)
                                       throws EntityException
gets all Messages

Parameters:
f - POP3Folder
filter - EmailFilter
loc - Locale
Returns:
Message[]
Throws:
EntityException

getAllEmailsSent

public java.lang.String[] getAllEmailsSent(EmailFilter filter,
                                           java.lang.String source_uri,
                                           long principalId)
                                    throws EntityException
Parameters:
filter -
source_uri - the SyncSource URI.
principalId - The principal ID.
Returns:
The items fulfilling the filter requirements as an Array of Strings.
Throws:
EntityException

removeEmail

public void removeEmail(com.sun.mail.pop3.POP3Folder f,
                        java.lang.String uid)
                 throws EntityException
Parameters:
f - IMAPFolder
uid - long
Throws:
EntityException

removeAllEmail

public void removeAllEmail(com.sun.mail.pop3.POP3Folder f)
                    throws EntityException
Parameters:
f - POP3Folder
Throws:
EntityException

getEmailFromUID

public javax.mail.Message getEmailFromUID(com.sun.mail.pop3.POP3Folder f,
                                          java.lang.String uid)
                                   throws EntityException
serch a document using UID for POP3 protocol UID is String

Parameters:
f - POP3Folder
uid - String
Returns:
Message
Throws:
EntityException

getEmailFromUID

public javax.mail.Message getEmailFromUID(java.lang.String GUID,
                                          javax.mail.Session s,
                                          java.lang.String source_uri,
                                          long principalId)
                                   throws EntityException
Parameters:
GUID - the Global Unique ID.
s - The session info to the backend.
source_uri - the SyncSource URI.
principalId - The principal ID.
Returns:
Message
Throws:
EntityException

removeEmail

public void removeEmail(java.lang.String GUID,
                        java.lang.String source_uri,
                        long principalId)
                 throws EntityException
Parameters:
GUID - the Global Unique ID.
source_uri - the SyncSource URI.
principalId - The principal ID.
Throws:
EntityException

getEmailFromMessageID

public ItemMessage getEmailFromMessageID(com.sun.mail.pop3.POP3Folder f,
                                         java.lang.String parentId,
                                         java.lang.String message_id)
                                  throws EntityException
serch a document using the header Message-ID

Parameters:
f - POP3Folder
parentId - String
message_id - String
Returns:
ItemMessage
Throws:
EntityException

getEmailFromMessageID

public ItemMessage getEmailFromMessageID(java.lang.String message_id,
                                         javax.mail.Session s,
                                         java.lang.String source_uri,
                                         long principalId)
                                  throws EntityException
serch a document using the header Message-ID

Parameters:
message_id - String
s - Session
source_uri - String
principalId - long
Returns:
ItemMessage
Throws:
EntityException


Copyright © 2003-2006 Funambol.