public class MessageResultImpl extends Object implements MessageResult
MessageResult.FetchGroup, MessageResult.Header, MessageResult.MimePath
Constructor and Description |
---|
MessageResultImpl(Message<?> message) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MessageResult that) |
boolean |
equals(Object obj) |
Content |
getBody()
Gets the body of the message excluding headers.
|
Content |
getBody(MessageResult.MimePath path)
Gets the body of the given mime part.
|
javax.mail.Flags |
getFlags()
Return the
Flags |
Content |
getFullContent()
Gets the full message including headers and body.
|
Content |
getFullContent(MessageResult.MimePath path)
Gets the full content of the given mime part.
|
Headers |
getHeaders() |
Date |
getInternalDate()
IMAP defines this as the time when the message has arrived to the server
(by smtp).
|
Content |
getMimeBody(MessageResult.MimePath path)
Gets the body of the given mime part.
|
MimeDescriptor |
getMimeDescriptor() |
long |
getModSeq()
Return the modify-sequence number of the message.
|
long |
getSize()
Return the size in bytes
|
long |
getUid()
Return the uid of the message which the MessageResult belongs to
|
int |
hashCode() |
Iterator<MessageResult.Header> |
iterateHeaders(MessageResult.MimePath path)
Iterates the message headers for the given part in a multipart message.
|
Iterator<MessageResult.Header> |
iterateMimeHeaders(MessageResult.MimePath path)
Iterates the MIME headers for the given part in a multipart message.
|
void |
setBodyContent(MessageResult.MimePath path,
Content content) |
void |
setFullContent(MessageResult.MimePath path,
Content content) |
void |
setHeaders(MessageResult.MimePath path,
Iterator<MessageResult.Header> headers) |
void |
setMimeBodyContent(MessageResult.MimePath path,
Content content) |
void |
setMimeHeaders(MessageResult.MimePath path,
Iterator<MessageResult.Header> headers) |
String |
toString()
Renders suitably for logging.
|
public MessageResultImpl(Message<?> message) throws IOException
IOException
public long getUid()
MessageMetaData
getUid
in interface MessageMetaData
MessageMetaData.getUid()
public Date getInternalDate()
MessageMetaData
IMAP defines this as the time when the message has arrived to the server (by smtp). Clients are also allowed to set the internalDate on append.
getInternalDate
in interface MessageMetaData
MessageMetaData.getInternalDate()
public javax.mail.Flags getFlags()
MessageMetaData
Flags
getFlags
in interface MessageMetaData
MessageMetaData.getFlags()
public long getSize()
MessageMetaData
getSize
in interface MessageMetaData
MessageMetaData.getSize()
public int compareTo(MessageResult that)
compareTo
in interface Comparable<MessageResult>
Comparable.compareTo(java.lang.Object)
public final Content getFullContent() throws IOException
MessageResult
getFullContent
in interface MessageResult
Content
, or or null if
MessageResult.FetchGroup.FULL_CONTENT
has not been included in the
resultsIOException
MessageResult.getFullContent()
public final Content getBody() throws IOException
MessageResult
getBody
in interface MessageResult
Content
, or or null if
MessageResult.FetchGroup.FULL_CONTENT
has not been included in the
resultsIOException
MessageResult.getBody()
public String toString()
public Content getBody(MessageResult.MimePath path) throws MailboxException
MessageResult
getBody
in interface MessageResult
path
- describes the partContent
, or null when
MessageResult.FetchGroup.content()
did not been include the given
index and when the mime part cannot be foundMailboxException
MessageResult.getBody(org.apache.james.mailbox.model.MessageResult.MimePath)
public Content getMimeBody(MessageResult.MimePath path) throws MailboxException
MessageResult
getMimeBody
in interface MessageResult
path
- describes the partContent
, or null when
MessageResult.FetchGroup.content()
did not been include the given
index and when the mime part cannot be foundMailboxException
MessageResult.getMimeBody(org.apache.james.mailbox.model.MessageResult.MimePath)
public Content getFullContent(MessageResult.MimePath path) throws MailboxException
MessageResult
getFullContent
in interface MessageResult
path
- describes the partContent
, or null when
MessageResult.FetchGroup.content()
did not been include the given
index and when the mime part cannot be foundMailboxException
MessageResult.getFullContent(org.apache.james.mailbox.model.MessageResult.MimePath)
public Iterator<MessageResult.Header> iterateHeaders(MessageResult.MimePath path) throws MailboxException
MessageResult
iterateHeaders
in interface MessageResult
path
- describing the part's position within a multipart messageHeader
Iterator
, or null when
MessageResult.FetchGroup.content()
does not include the index and
when the mime part cannot be foundMailboxException
MessageResult.iterateHeaders(org.apache.james.mailbox.model.MessageResult.MimePath)
public Iterator<MessageResult.Header> iterateMimeHeaders(MessageResult.MimePath path) throws MailboxException
MessageResult
iterateMimeHeaders
in interface MessageResult
path
- describing the part's position within a multipart messageHeader
Iterator
, or null when
MessageResult.FetchGroup.content()
does not include the index and
when the mime part cannot be foundMailboxException
MessageResult.iterateMimeHeaders(org.apache.james.mailbox.model.MessageResult.MimePath)
public void setBodyContent(MessageResult.MimePath path, Content content)
public void setMimeBodyContent(MessageResult.MimePath path, Content content)
public void setFullContent(MessageResult.MimePath path, Content content)
public void setHeaders(MessageResult.MimePath path, Iterator<MessageResult.Header> headers)
public void setMimeHeaders(MessageResult.MimePath path, Iterator<MessageResult.Header> headers)
public MimeDescriptor getMimeDescriptor() throws MailboxException
getMimeDescriptor
in interface MessageResult
MailboxException
MessageResult.getMimeDescriptor()
public long getModSeq()
MessageMetaData
getModSeq
in interface MessageMetaData
MessageMetaData.getModSeq()
public Headers getHeaders() throws MailboxException
getHeaders
in interface MessageResult
MailboxException
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.