|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.mailboxmanager.impl.MessageResultImpl
public class MessageResultImpl
Bean based implementation. getIncludedResults() is updated when
setters are called.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.james.mailboxmanager.MessageResult |
|---|
MessageResult.Content, MessageResult.FetchGroup, MessageResult.Header, MessageResult.MimeDescriptor, MessageResult.MimePath |
| Constructor Summary | |
|---|---|
MessageResultImpl()
|
|
MessageResultImpl(long uid)
|
|
MessageResultImpl(long uid,
javax.mail.Flags flags)
|
|
MessageResultImpl(MessageResult result)
|
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
|
MessageResult.Content |
getBody()
Gets the body of the message excluding headers. |
MessageResult.Content |
getBody(MessageResult.MimePath path)
Gets the body of the given mime part. |
javax.mail.Flags |
getFlags()
TODO optional, to be decided maybe this is a good thing because IMAP often requests only the Flags and this way we don't need to create a lazy-loading MimeMessage instance just for the Flags. |
MessageResult.Content |
getFullContent()
Gets the full message including headers and body. |
MessageResult.Content |
getFullContent(MessageResult.MimePath path)
Gets the full content of the given mime part. |
java.util.List |
getHeaders()
|
MessageResult.FetchGroup |
getIncludedResults()
Gets the results set. |
java.util.Date |
getInternalDate()
IMAP defines this as the time when the message has arrived to the server (by smtp). |
MessageResult.Content |
getMimeBody(MessageResult.MimePath path)
Gets the body of the given mime part. |
MessageResult.MimeDescriptor |
getMimeDescriptor()
|
javax.mail.internet.MimeMessage |
getMimeMessage()
|
int |
getSize()
|
long |
getUid()
|
long |
getUidValidity()
|
java.util.Iterator |
headers()
Gets headers for the message. |
java.util.Iterator |
iterateHeaders(MessageResult.MimePath path)
Iterates the message headers for the given part in a multipart message. |
java.util.Iterator |
iterateMimeHeaders(MessageResult.MimePath path)
Iterates the MIME headers for the given part in a multipart message. |
void |
setBody(MessageResult.Content messageBody)
|
void |
setBodyContent(MessageResult.MimePath path,
MessageResult.Content content)
|
void |
setFlags(javax.mail.Flags flags)
|
void |
setFullContent(MessageResult.Content fullMessage)
|
void |
setFullContent(MessageResult.MimePath path,
MessageResult.Content content)
|
void |
setHeaders(java.util.List headers)
|
void |
setHeaders(MessageResult.MimePath path,
java.util.Iterator headers)
|
void |
setInternalDate(java.util.Date internalDate)
|
void |
setMimeBodyContent(MessageResult.MimePath path,
MessageResult.Content content)
|
void |
setMimeDescriptor(MessageResult.MimeDescriptor mimeDescriptor)
|
void |
setMimeHeaders(MessageResult.MimePath path,
java.util.Iterator headers)
|
void |
setSize(int size)
|
void |
setUid(long uid)
|
java.lang.String |
toString()
Renders suitably for logging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MessageResultImpl(long uid)
public MessageResultImpl()
public MessageResultImpl(long uid,
javax.mail.Flags flags)
public MessageResultImpl(MessageResult result)
throws MailboxManagerException
MailboxManagerException| Method Detail |
|---|
public MessageResult.FetchGroup getIncludedResults()
MessageResult
getIncludedResults in interface MessageResultMessageResultUtils.isIncluded(MessageResult, int)public javax.mail.internet.MimeMessage getMimeMessage()
public long getUid()
getUid in interface MessageResultpublic long getUidValidity()
getUidValidity in interface MessageResultpublic java.util.Date getInternalDate()
MessageResultIMAP defines this as the time when the message has arrived to the server (by smtp). Clients are also allowed to set the internalDate on apppend.
Is this Mail.getLastUpdates() for James delivery? Should we use MimeMessage.getReceivedDate()?
getInternalDate in interface MessageResultpublic javax.mail.Flags getFlags()
MessageResult
getFlags in interface MessageResultpublic void setUid(long uid)
public int getSize()
getSize in interface MessageResultpublic void setFlags(javax.mail.Flags flags)
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic void setSize(int size)
public void setInternalDate(java.util.Date internalDate)
public java.util.Iterator headers()
Headers
headers in interface Headersheaders in interface MessageResultHeader Iterator, or null if
MessageResult.FetchGroup.HEADERS was not fetchedpublic java.util.List getHeaders()
public void setHeaders(java.util.List headers)
public final MessageResult.Content getFullContent()
MessageResult
getFullContent in interface MessageResultContent, or or null if
MessageResult.FetchGroup.FULL_CONTENT has not been included in the
resultspublic final void setFullContent(MessageResult.Content fullMessage)
public final MessageResult.Content getBody()
MessageResult
getBody in interface MessageResultContent, or or null if
MessageResult.FetchGroup.FULL_CONTENT has not been included in the
resultspublic final void setBody(MessageResult.Content messageBody)
public java.lang.String toString()
toString in class java.lang.ObjectString representation of this object.
public MessageResult.Content getBody(MessageResult.MimePath path)
throws MailboxManagerException
MessageResult
getBody in interface MessageResultpath - describes the part
Content, or null when
FetchGroup#mimeBodies() did not been include the given
index and when the mime part cannot be found
MailboxManagerException
public MessageResult.Content getMimeBody(MessageResult.MimePath path)
throws MailboxManagerException
MessageResult
getMimeBody in interface MessageResultpath - describes the part
Content, or null when
FetchGroup#mimeBodies() did not been include the given
index and when the mime part cannot be found
MailboxManagerException
public MessageResult.Content getFullContent(MessageResult.MimePath path)
throws MailboxManagerException
MessageResult
getFullContent in interface MessageResultpath - describes the part
Content, or null when
FetchGroup#mimeBodies() did not been include the given
index and when the mime part cannot be found
MailboxManagerException
public java.util.Iterator iterateHeaders(MessageResult.MimePath path)
throws MailboxManagerException
MessageResult
iterateHeaders in interface MessageResultpath - describing the part's position within a multipart message
Header Iterator, or null when
FetchGroup#mimeHeaders() does not include the index and
when the mime part cannot be found
MailboxManagerException
public java.util.Iterator iterateMimeHeaders(MessageResult.MimePath path)
throws MailboxManagerException
MessageResult
iterateMimeHeaders in interface MessageResultpath - describing the part's position within a multipart message
Header Iterator, or null when
FetchGroup#mimeHeaders() does not include the index and
when the mime part cannot be found
MailboxManagerException
public void setBodyContent(MessageResult.MimePath path,
MessageResult.Content content)
public void setMimeBodyContent(MessageResult.MimePath path,
MessageResult.Content content)
public void setFullContent(MessageResult.MimePath path,
MessageResult.Content content)
public void setHeaders(MessageResult.MimePath path,
java.util.Iterator headers)
public void setMimeHeaders(MessageResult.MimePath path,
java.util.Iterator headers)
public void setMimeDescriptor(MessageResult.MimeDescriptor mimeDescriptor)
public MessageResult.MimeDescriptor getMimeDescriptor()
getMimeDescriptor in interface MessageResult
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||