com.funambol.email.items.manager
Class EntityManager

java.lang.Object
  extended bycom.funambol.email.items.manager.EntityManager
Direct Known Subclasses:
PopEntityManager

public class EntityManager
extends java.lang.Object


Field Summary
 EntityDAO ed
           
protected  java.util.logging.Logger log
           
 
Constructor Summary
EntityManager()
           
EntityManager(IMailServerWrapper msw_e)
           
 
Method Summary
 Email createFoundationMail(ClientMessage smsg, java.util.Locale loc)
           
 javax.mail.Message createMessage(javax.mail.Session s, Email ctmp, java.lang.String FID)
          create a javaMail Message from a funambol foundation Email
protected  java.lang.Object[] handleMultipart(javax.mail.Multipart multipart, int numBytes)
           
protected  java.lang.Object[] handlePart(javax.mail.Part part, int numBytes)
          retruns the body of the mail without attachment.
 void moveSentItem(java.lang.String FMID, IMailServerWrapper msw)
          deletes an item
 void sendItem(java.lang.String FID, Email emailNew, IMailServerWrapper msw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected java.util.logging.Logger log

ed

public EntityDAO ed
Constructor Detail

EntityManager

public EntityManager()

EntityManager

public EntityManager(IMailServerWrapper msw_e)
              throws EmailAccessException
Parameters:
msw_e - MailServerWrapper
Throws:
EmailAccessException
Method Detail

moveSentItem

public void moveSentItem(java.lang.String FMID,
                         IMailServerWrapper msw)
                  throws EntityException
deletes an item

Parameters:
FMID - String
msw - IMailServerWrapper
Throws:
EntityException

sendItem

public void sendItem(java.lang.String FID,
                     Email emailNew,
                     IMailServerWrapper msw)
              throws EntityException
Parameters:
FID - String
emailNew - Email
msw - IMailServerWrapper
Throws:
EntityException

createMessage

public javax.mail.Message createMessage(javax.mail.Session s,
                                        Email ctmp,
                                        java.lang.String FID)
                                 throws EntityException
create a javaMail Message from a funambol foundation Email

Parameters:
s - Session
ctmp - Email
FID - String
Returns:
Message
Throws:
EntityException

createFoundationMail

public Email createFoundationMail(ClientMessage smsg,
                                  java.util.Locale loc)
                           throws EntityException
Parameters:
smsg - ServerMessage
loc - Locale
Returns:
Email
Throws:
EntityException

handleMultipart

protected java.lang.Object[] handleMultipart(javax.mail.Multipart multipart,
                                             int numBytes)
                                      throws EntityException
Parameters:
multipart - Multipart
numBytes - int
Returns:
Object[]
Throws:
EntityException

handlePart

protected java.lang.Object[] handlePart(javax.mail.Part part,
                                        int numBytes)
                                 throws EntityException
retruns the body of the mail without attachment. output [0] () - string if we have a text/plain - html if we have a text/html - empty string otherwise [1] (String) - related content type if the size part is greater than "numbytes" the methods returns the default content

Parameters:
part - Part
numBytes - int
Returns:
Object[]
Throws:
EntityException


Copyright © 2003-2006 Funambol.