|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.mime4j.message.AbstractEntity
org.apache.james.mime4j.message.AbstractMessage
public abstract class AbstractMessage
Abstract MIME message.
| Constructor Summary | |
|---|---|
AbstractMessage()
|
|
| Method Summary | |
|---|---|
void |
createMessageId(String hostname)
Creates and sets a new Message-ID header field for this message. |
AddressList |
getBcc()
Returns the value of the Bcc header field of this message as AddressList object or null if it is not
present. |
AddressList |
getCc()
Returns the value of the Cc header field of this message as AddressList object or null if it is not
present. |
Date |
getDate()
Returns the value of the Date header field of this message as Date object or null if it is not present. |
MailboxList |
getFrom()
Returns the value of the From header field of this message as MailboxList object or null if it is not
present. |
String |
getMessageId()
Returns the value of the Message-ID header field of this message or null if it is not present. |
AddressList |
getReplyTo()
Returns the value of the Reply-To header field of this message as AddressList object or null if it is not
present. |
Mailbox |
getSender()
Returns the value of the Sender header field of this message as Mailbox object or null if it is not
present. |
String |
getSubject()
Returns the (decoded) value of the Subject header field of this message or null if it is not present. |
AddressList |
getTo()
Returns the value of the To header field of this message as AddressList object or null if it is not
present. |
protected abstract AddressListField |
newAddressList(String fieldName,
Collection<? extends Address> addresses)
|
protected abstract DateTimeField |
newDate(Date date,
TimeZone zone)
|
protected abstract MailboxField |
newMailbox(String fieldName,
Mailbox mailbox)
|
protected abstract MailboxListField |
newMailboxList(String fieldName,
Collection<Mailbox> mailboxes)
|
protected abstract ParsedField |
newMessageId(String hostname)
|
protected abstract UnstructuredField |
newSubject(String subject)
|
void |
setBcc(Address... bcc)
Sets the Bcc header field of this message to the specified addresses. |
void |
setBcc(Address bcc)
Sets the Bcc header field of this message to the specified address. |
void |
setBcc(Collection<? extends Address> bcc)
Sets the Bcc header field of this message to the specified addresses. |
void |
setCc(Address... cc)
Sets the Cc header field of this message to the specified addresses. |
void |
setCc(Address cc)
Sets the Cc header field of this message to the specified address. |
void |
setCc(Collection<? extends Address> cc)
Sets the Cc header field of this message to the specified addresses. |
void |
setDate(Date date)
Sets the Date header field for this message. |
void |
setDate(Date date,
TimeZone zone)
Sets the Date header field for this message. |
void |
setFrom(Collection<Mailbox> from)
Sets the From header field of this message to the specified mailbox addresses. |
void |
setFrom(Mailbox... from)
Sets the From header field of this message to the specified mailbox addresses. |
void |
setFrom(Mailbox from)
Sets the From header field of this message to the specified mailbox address. |
void |
setReplyTo(Address... replyTo)
Sets the Reply-To header field of this message to the specified addresses. |
void |
setReplyTo(Address replyTo)
Sets the Reply-To header field of this message to the specified address. |
void |
setReplyTo(Collection<? extends Address> replyTo)
Sets the Reply-To header field of this message to the specified addresses. |
void |
setSender(Mailbox sender)
Sets the Sender header field of this message to the specified mailbox address. |
void |
setSubject(String subject)
Sets the Subject header field for this message. |
void |
setTo(Address... to)
Sets the To header field of this message to the specified addresses. |
void |
setTo(Address to)
Sets the To header field of this message to the specified address. |
void |
setTo(Collection<? extends Address> to)
Sets the To header field of this message to the specified addresses. |
| Methods inherited from class org.apache.james.mime4j.message.AbstractEntity |
|---|
calcCharset, calcMimeType, calcTransferEncoding, dispose, getBody, getCharset, getContentTransferEncoding, getDispositionType, getFilename, getHeader, getMimeType, getParent, isMimeType, isMultipart, newContentDisposition, newContentDisposition, newContentTransferEncoding, newContentType, newUniqueBoundary, removeBody, setBody, setBody, setBody, setContentDisposition, setContentDisposition, setContentDisposition, setContentDisposition, setContentTransferEncoding, setFilename, setHeader, setMessage, setMultipart, setMultipart, setParent, setText, setText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.james.mime4j.dom.Entity |
|---|
getBody, getCharset, getContentTransferEncoding, getDispositionType, getFilename, getHeader, getMimeType, getParent, isMultipart, removeBody, setBody, setHeader, setParent |
| Methods inherited from interface org.apache.james.mime4j.dom.Body |
|---|
getParent, setParent |
| Methods inherited from interface org.apache.james.mime4j.dom.Disposable |
|---|
dispose |
| Constructor Detail |
|---|
public AbstractMessage()
| Method Detail |
|---|
public String getMessageId()
null if it is not present.
getMessageId in interface Messagepublic void createMessageId(String hostname)
Header is created if this message does not already have
one.
createMessageId in interface Messagehostname - host name to be included in the identifier or
null if no host name should be included.protected abstract ParsedField newMessageId(String hostname)
public String getSubject()
null if it is not present.
getSubject in interface Messagepublic void setSubject(String subject)
Header is created if
this message does not already have one.
setSubject in interface Messagesubject - subject to set or null to remove the subject
header field.public Date getDate()
Date object or null if it is not present.
getDate in interface Messagepublic void setDate(Date date)
TimeZone of this host to encode the specified
Date object into a string.
setDate in interface Messagedate - date to set or null to remove the date header
field.
public void setDate(Date date,
TimeZone zone)
TimeZone is used to encode the specified Date
object into a string.
setDate in interface Messagedate - date to set or null to remove the date header
field.zone - a time zone.public Mailbox getSender()
Mailbox object or null if it is not
present.
getSender in interface Messagepublic void setSender(Mailbox sender)
setSender in interface Messagesender - address to set or null to remove the header
field.public MailboxList getFrom()
MailboxList object or null if it is not
present.
getFrom in interface Messagepublic void setFrom(Mailbox from)
setFrom in interface Messagefrom - address to set or null to remove the header
field.public void setFrom(Mailbox... from)
setFrom in interface Messagefrom - addresses to set or null or no arguments to
remove the header field.public void setFrom(Collection<Mailbox> from)
setFrom in interface Messagefrom - addresses to set or null or an empty collection
to remove the header field.public AddressList getTo()
AddressList object or null if it is not
present.
getTo in interface Messagepublic void setTo(Address to)
setTo in interface Messageto - address to set or null to remove the header
field.public void setTo(Address... to)
setTo in interface Messageto - addresses to set or null or no arguments to
remove the header field.public void setTo(Collection<? extends Address> to)
setTo in interface Messageto - addresses to set or null or an empty collection
to remove the header field.public AddressList getCc()
AddressList object or null if it is not
present.
getCc in interface Messagepublic void setCc(Address cc)
setCc in interface Messagecc - address to set or null to remove the header
field.public void setCc(Address... cc)
setCc in interface Messagecc - addresses to set or null or no arguments to
remove the header field.public void setCc(Collection<? extends Address> cc)
setCc in interface Messagecc - addresses to set or null or an empty collection
to remove the header field.public AddressList getBcc()
AddressList object or null if it is not
present.
getBcc in interface Messagepublic void setBcc(Address bcc)
setBcc in interface Messagebcc - address to set or null to remove the header
field.public void setBcc(Address... bcc)
setBcc in interface Messagebcc - addresses to set or null or no arguments to
remove the header field.public void setBcc(Collection<? extends Address> bcc)
setBcc in interface Messagebcc - addresses to set or null or an empty collection
to remove the header field.public AddressList getReplyTo()
AddressList object or null if it is not
present.
getReplyTo in interface Messagepublic void setReplyTo(Address replyTo)
setReplyTo in interface MessagereplyTo - address to set or null to remove the header
field.public void setReplyTo(Address... replyTo)
setReplyTo in interface MessagereplyTo - addresses to set or null or no arguments to
remove the header field.public void setReplyTo(Collection<? extends Address> replyTo)
setReplyTo in interface MessagereplyTo - addresses to set or null or an empty collection
to remove the header field.
protected abstract AddressListField newAddressList(String fieldName,
Collection<? extends Address> addresses)
protected abstract UnstructuredField newSubject(String subject)
protected abstract DateTimeField newDate(Date date,
TimeZone zone)
protected abstract MailboxField newMailbox(String fieldName,
Mailbox mailbox)
protected abstract MailboxListField newMailboxList(String fieldName,
Collection<Mailbox> mailboxes)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||