|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectcom.auxilii.msgparser.Message
public class Message
Class that represents a .msg file. Some
fields from the .msg file are stored in special
parameters (e.g., fromEmail
).
Attachments are stored in the property
attachments
). An attachment may be
of the type MsgAttachment
which
represents another attached (encapsulated)
.msg object.
Field Summary | |
---|---|
protected List<Attachment> |
attachments
A list of all attachments (both FileAttachment
and MsgAttachment ). |
protected String |
bodyRTF
The body in RTF format (if available) |
protected String |
bodyText
The normalized body text. |
protected Date |
date
Email Date |
protected String |
fromEmail
The address part of From: mail address. |
protected String |
fromName
The name part of the From: mail address |
protected String |
headers
Email headers (if available) |
protected static Logger |
logger
|
protected String |
messageClass
The message class as defined in the .msg file. |
protected String |
messageId
The message Id. |
protected Map<String,Object> |
properties
Contains all properties that are not covered by the special properties. |
protected String |
subject
The mail's subject. |
protected String |
toEmail
The address part of To: mail address. |
protected String |
toName
The name part of the To: mail address |
Constructor Summary | |
---|---|
Message()
|
Method Summary | |
---|---|
void |
addAttachment(Attachment attachment)
|
String |
createMailString(String mail,
String name)
Convenience method for creating an email address expression (including the name, the address, or both). |
List<Attachment> |
getAttachments()
|
String |
getBodyRTF()
|
String |
getBodyText()
|
Date |
getDate()
|
static Date |
getDateFromHeaders(String headers)
|
String |
getFromEmail()
|
String |
getFromName()
|
String |
getHeaders()
|
String |
getMessageClass()
|
String |
getMessageId()
|
String |
getSubject()
|
String |
getToEmail()
|
String |
getToName()
|
void |
setAttachments(List<Attachment> attachments)
|
void |
setBodyRTF(String bodyRTF)
|
void |
setBodyText(String bodyText)
|
void |
setDate(Date date)
|
void |
setFromEmail(String fromEmail)
|
void |
setFromName(String fromName)
|
void |
setHeaders(String headers)
|
void |
setMessageClass(String messageClass)
|
void |
setMessageId(String messageId)
|
void |
setProperty(String name,
Object value)
Sets the name/value pair in the properties
map. |
void |
setSubject(String subject)
|
void |
setToEmail(String toEmail)
|
void |
setToName(String toName)
|
String |
toLongString()
Provides all information of this message object. |
String |
toString()
Provides a short representation of this .msg object. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final Logger logger
protected String messageClass
protected String messageId
protected String fromEmail
protected String fromName
protected String toEmail
protected String toName
protected String subject
protected String bodyText
protected String bodyRTF
protected String headers
protected Date date
protected List<Attachment> attachments
FileAttachment
and MsgAttachment
).
protected Map<String,Object> properties
Constructor Detail |
---|
public Message()
Method Detail |
---|
public void addAttachment(Attachment attachment)
public void setProperty(String name, Object value) throws ClassCastException
properties
map. Some properties are put into
special attributes (e.g., toEmail
when
the property name is '0076').
name
- The property name (i.e., the class
of the document entry).value
- The value of the field.
ClassCastException
- Thrown if the detected data
type does not match the expected data type.public String toString()
toString
in class Object
Object.toString()
public String toLongString()
public String createMailString(String mail, String name)
mail
- The mail address.name
- The name part of the address.
public List<Attachment> getAttachments()
public void setAttachments(List<Attachment> attachments)
attachments
- the attachments to setpublic String getBodyText()
public void setBodyText(String bodyText)
bodyText
- the bodyText to setpublic String getFromEmail()
public void setFromEmail(String fromEmail)
fromEmail
- the fromEmail to setpublic String getFromName()
public void setFromName(String fromName)
fromName
- the fromName to setpublic String getMessageClass()
public void setMessageClass(String messageClass)
messageClass
- the messageClass to setpublic String getMessageId()
public void setMessageId(String messageId)
messageId
- the messageId to setpublic String getSubject()
public void setSubject(String subject)
subject
- the subject to setpublic String getToEmail()
public void setToEmail(String toEmail)
toEmail
- the toEmail to setpublic String getToName()
public void setToName(String toName)
toName
- the toName to setpublic String getBodyRTF()
public void setBodyRTF(String bodyRTF)
bodyRTF
- the bodyRTF to setpublic String getHeaders()
public void setHeaders(String headers)
headers
- the headers to setpublic static Date getDateFromHeaders(String headers)
public Date getDate()
public void setDate(Date date)
date
- the date to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |