|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.email.items.manager.MessageCreator
public class MessageCreator
This class is used in order to create an email using the list of InternalPart items. this class is an helper for the EntityManagerFilter class
Constructor Summary | |
---|---|
MessageCreator()
|
Method Summary | |
---|---|
static java.lang.String |
convertHtmlBody(InternalPart v)
convert an Html Part to Txt Part |
static java.lang.String |
getEncodingType(javax.mail.internet.MimeMessage newMsg,
boolean optimizeQP)
this method checks if message contains non-ASCII characters and set the correct encoding type It's a public method because there is an external unit test |
static Ext |
getExtComplete(java.util.ArrayList ips,
int headersDimension)
create an Ext object with the following info - truncated - body size - all info about attachments |
static void |
getHB_Content(javax.mail.internet.MimeMessage newMsg,
javax.mail.Message oldMsg,
InternalPart ip)
get just the InternalPart that contains the body |
static InternalPart |
getHB_GetPart(java.util.ArrayList ips,
int numBytes,
Ext ext,
int headersDimension)
get just the InternalPart that contains the body |
static void |
getHBA_Content(javax.mail.internet.MimeMessage newMsg,
javax.mail.Message oldMsg,
java.util.ArrayList ips)
get just the InternalPart that contains the body |
static java.util.ArrayList |
getHBA_GetParts(java.util.ArrayList ips,
Ext ext,
int headersDimension)
|
static java.util.ArrayList |
getHBA_GetParts(java.util.ArrayList ips,
int numBytes,
Ext ext,
int headersDimension)
|
static void |
setNewContent(javax.mail.Message newMsg,
javax.mail.Message oldMsg)
create an exact copy of the content |
static void |
setNewContent(javax.mail.Message newMsg,
javax.mail.Message oldMsg,
java.lang.String sign)
create a copy of the content with the signature Part this method is used in the sending procedure |
static java.lang.String[] |
setNewHeaderIn(javax.mail.Message newMsg,
javax.mail.Message oldMsg,
java.lang.String FID,
java.lang.String FMID,
boolean isDevice,
boolean optimizeQP)
set a new header but keep the old Message-ID for a message that must be downloaded |
static void |
setNewHeaderOut(javax.mail.Message newMsg,
javax.mail.Message oldMsg,
java.lang.String from,
java.lang.String firstname,
java.lang.String lastname)
set a new header but keep the old Message-ID for a message that must be sent |
static void |
setNewHeaderSent(javax.mail.Message newMsg,
javax.mail.Message oldMsg,
java.lang.String from,
java.lang.String firstname,
java.lang.String lastname)
set a new header but keep the old Message-ID for a message that must be sent |
static InternalPart |
truncBody(InternalPart item,
int numBytes,
Ext ext,
int origSize)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageCreator()
Method Detail |
---|
public static java.lang.String getEncodingType(javax.mail.internet.MimeMessage newMsg, boolean optimizeQP) throws EntityException
newMsg
- MessageoptimizeQP
- boolean
EntityException
public static Ext getExtComplete(java.util.ArrayList ips, int headersDimension) throws EntityException
ips
- part list ArrayListheadersDimension
- int
EntityException
public static java.util.ArrayList getHBA_GetParts(java.util.ArrayList ips, int numBytes, Ext ext, int headersDimension) throws EntityException
EntityException
public static java.util.ArrayList getHBA_GetParts(java.util.ArrayList ips, Ext ext, int headersDimension) throws EntityException
EntityException
public static void getHB_Content(javax.mail.internet.MimeMessage newMsg, javax.mail.Message oldMsg, InternalPart ip) throws EntityException
newMsg
- MimeMessage new MessageoldMsg
- Message old Messageip
- InternalPart part of theemail
EntityException
public static void getHBA_Content(javax.mail.internet.MimeMessage newMsg, javax.mail.Message oldMsg, java.util.ArrayList ips) throws EntityException
newMsg
- MimeMessage new MessageoldMsg
- Message old Messageips
- InternalPart part of theemail
EntityException
public static InternalPart getHB_GetPart(java.util.ArrayList ips, int numBytes, Ext ext, int headersDimension) throws EntityException
ips
- All parts of the emailsnumBytes
- intext
- ExtheadersDimension
- int
EntityException
public static InternalPart truncBody(InternalPart item, int numBytes, Ext ext, int origSize) throws EntityException
EntityException
public static java.lang.String convertHtmlBody(InternalPart v) throws EntityException
v
- Part
EntityException
public static java.lang.String[] setNewHeaderIn(javax.mail.Message newMsg, javax.mail.Message oldMsg, java.lang.String FID, java.lang.String FMID, boolean isDevice, boolean optimizeQP) throws EntityException
newMsg
- MessageoldMsg
- Message
EntityException
public static void setNewHeaderOut(javax.mail.Message newMsg, javax.mail.Message oldMsg, java.lang.String from, java.lang.String firstname, java.lang.String lastname) throws EntityException
newMsg
- MessageoldMsg
- Messagefrom
- Stringfirstname
- Stringlastname
- String
EntityException
public static void setNewHeaderSent(javax.mail.Message newMsg, javax.mail.Message oldMsg, java.lang.String from, java.lang.String firstname, java.lang.String lastname) throws EntityException
newMsg
- MessageoldMsg
- Messagefrom
- Stringfirstname
- Stringlastname
- String
EntityException
public static void setNewContent(javax.mail.Message newMsg, javax.mail.Message oldMsg) throws EntityException
newMsg
- MessageoldMsg
- Message
EntityException
public static void setNewContent(javax.mail.Message newMsg, javax.mail.Message oldMsg, java.lang.String sign) throws java.lang.Exception
newMsg
- MessageoldMsg
- Messagesign
- String
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |