|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessageManager
Interface which represent a Mailbox
A MessageManager should be valid for the whole MailboxSession
| Nested Class Summary | |
|---|---|
static interface |
MessageManager.MetaData
Meta data about the current state of the mailbox. |
| Method Summary | |
|---|---|
long |
appendMessage(java.io.InputStream msgIn,
java.util.Date internalDate,
MailboxSession mailboxSession,
boolean isRecent,
javax.mail.Flags flags)
Appends a message to this mailbox. |
java.util.Iterator<java.lang.Long> |
expunge(MessageRange set,
MailboxSession mailboxSession)
Expunges messages in the given range from this mailbox. |
long |
getMessageCount(MailboxSession mailboxSession)
Return the count |
java.util.Iterator<MessageResult> |
getMessages(MessageRange set,
MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
Gets messages in the given range. |
MessageManager.MetaData |
getMetaData(boolean resetRecent,
MailboxSession mailboxSession,
MessageManager.MetaData.FetchGroup fetchGroup)
Gets current meta data for the mailbox. |
boolean |
isWriteable(MailboxSession session)
Return if the Mailbox is writable |
java.util.Iterator<java.lang.Long> |
search(SearchQuery searchQuery,
MailboxSession mailboxSession)
Searches for messages matching the given query. |
java.util.Map<java.lang.Long,javax.mail.Flags> |
setFlags(javax.mail.Flags flags,
boolean value,
boolean replace,
MessageRange set,
MailboxSession mailboxSession)
Sets flags on messages within the given range. |
| Method Detail |
|---|
long getMessageCount(MailboxSession mailboxSession)
throws MailboxException
mailboxSession -
MailboxExceptionboolean isWriteable(MailboxSession session)
session -
java.util.Iterator<java.lang.Long> search(SearchQuery searchQuery,
MailboxSession mailboxSession)
throws MailboxException
mailboxSession - not null
UnsupportedCriteriaException - when any of the search parameters are not supported by this
mailbox
MailboxException - when search fails for other reasons
java.util.Iterator<java.lang.Long> expunge(MessageRange set,
MailboxSession mailboxSession)
throws MailboxException
set - not nullmailboxSession - not null
MailboxException - if anything went wrong
java.util.Map<java.lang.Long,javax.mail.Flags> setFlags(javax.mail.Flags flags,
boolean value,
boolean replace,
MessageRange set,
MailboxSession mailboxSession)
throws MailboxException
flags - Flags to be setvalue - true = set, false = unsetreplace - replace all Flags with this flags, value has to be trueset - the range of messagesmailboxSession - not null
MailboxException
long appendMessage(java.io.InputStream msgIn,
java.util.Date internalDate,
MailboxSession mailboxSession,
boolean isRecent,
javax.mail.Flags flags)
throws MailboxException
internalDate - the time of addition to be set, not nullmailboxSession - not nullisRecent - true when the message should be marked recent,
false otherwiseflags - optionally set these flags on created message,
or null when no additional flags should be set
MailboxException - when message cannot be appended
java.util.Iterator<MessageResult> getMessages(MessageRange set,
MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
throws MailboxException
set - mailboxSession - not null
MailboxException
MessageManager.MetaData getMetaData(boolean resetRecent,
MailboxSession mailboxSession,
MessageManager.MetaData.FetchGroup fetchGroup)
throws MailboxException
resetRecent - true when recent flags should be reset,
false otherwisemailboxSession - context, not nullfetchGroup - describes which optional data should be returned
MailboxException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||