public class MaildirMessageMapper extends AbstractMessageMapper<Integer>
MessageMapper.FetchTypeMapper.Transaction<T>, Mapper.VoidTransactionmailboxSession| Constructor and Description |
|---|
MaildirMessageMapper(MailboxSession session,
MaildirStore maildirStore) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
begin()
Begin transaction
|
protected void |
commit()
Commit transaction
|
protected MessageMetaData |
copy(Mailbox<Integer> mailbox,
long uid,
long modSeq,
Message<Integer> original)
Copy the Message to the Mailbox, using the given uid and modSeq for the new Message
|
long |
countMessagesInMailbox(Mailbox<Integer> mailbox)
Return the count of messages in the mailbox
|
long |
countUnseenMessagesInMailbox(Mailbox<Integer> mailbox)
Return the count of unseen messages in the mailbox
|
void |
delete(Mailbox<Integer> mailbox,
Message<Integer> message)
Delete the given
Message |
void |
endRequest()
IMAP Request was complete.
|
Map<Long,MessageMetaData> |
expungeMarkedForDeletionInMailbox(Mailbox<Integer> mailbox,
MessageRange set)
Return a
Iterator which holds the uids for all deleted Messages for the given MessageRange which are marked for deletion
The list must be ordered |
Long |
findFirstUnseenMessageUid(Mailbox<Integer> mailbox)
Return the uid of the first unseen message.
|
Iterator<Message<Integer>> |
findInMailbox(Mailbox<Integer> mailbox,
MessageRange set,
MessageMapper.FetchType fType,
int max)
|
List<Long> |
findRecentMessageUidsInMailbox(Mailbox<Integer> mailbox)
Return a List of
Message which are recent. |
protected void |
rollback()
Rollback transaction
|
protected MessageMetaData |
save(Mailbox<Integer> mailbox,
Message<Integer> message)
|
Iterator<UpdatedFlags> |
updateFlags(Mailbox<Integer> mailbox,
javax.mail.Flags flags,
boolean value,
boolean replace,
MessageRange set)
Update flags for the given
MessageRange. |
add, copy, getHighestModSeq, getLastUidexecutepublic MaildirMessageMapper(MailboxSession session, MaildirStore maildirStore)
public long countMessagesInMailbox(Mailbox<Integer> mailbox) throws MailboxException
MessageMapperMailboxExceptionMessageMapper.countMessagesInMailbox(org.apache.james.mailbox.store.mail.model.Mailbox)public long countUnseenMessagesInMailbox(Mailbox<Integer> mailbox) throws MailboxException
MessageMapperMailboxExceptionMessageMapper.countUnseenMessagesInMailbox(org.apache.james.mailbox.store.mail.model.Mailbox)public void delete(Mailbox<Integer> mailbox, Message<Integer> message) throws MailboxException
MessageMapperMessagepublic Iterator<Message<Integer>> findInMailbox(Mailbox<Integer> mailbox, MessageRange set, MessageMapper.FetchType fType, int max) throws MailboxException
MessageMapperIterator which holds the messages for the given criterias
The list must be ordered by the Message uidmailbox - The mailbox to searchset - message range for batch processingmax - the maximal limit of returned Message's. Use -1 to set no limit. In any case the caller MUST not expect the limit to get applied in all cases as the implementation
MAY just ignore itMailboxExceptionMessageMapper.findInMailbox(org.apache.james.mailbox.store.mail.model.Mailbox, org.apache.james.mailbox.model.MessageRange, org.apache.james.mailbox.store.mail.MessageMapper.FetchType, int)public List<Long> findRecentMessageUidsInMailbox(Mailbox<Integer> mailbox) throws MailboxException
MessageMapperMailboxExceptionMessageMapper.findRecentMessageUidsInMailbox(org.apache.james.mailbox.store.mail.model.Mailbox)public Long findFirstUnseenMessageUid(Mailbox<Integer> mailbox) throws MailboxException
MessageMapperMailboxExceptionMessageMapper.findFirstUnseenMessageUid(org.apache.james.mailbox.store.mail.model.Mailbox)public void endRequest()
MapperMapper.endRequest()protected MessageMetaData copy(Mailbox<Integer> mailbox, long uid, long modSeq, Message<Integer> original) throws MailboxException
AbstractMessageMappercopy in class AbstractMessageMapper<Integer>MailboxExceptionAbstractMessageMapper.copy(org.apache.james.mailbox.store.mail.model.Mailbox, long, long, org.apache.james.mailbox.store.mail.model.Message)protected MessageMetaData save(Mailbox<Integer> mailbox, Message<Integer> message) throws MailboxException
AbstractMessageMappersave in class AbstractMessageMapper<Integer>MailboxExceptionAbstractMessageMapper.save(org.apache.james.mailbox.store.mail.model.Mailbox,
org.apache.james.mailbox.store.mail.model.Message)protected void begin()
throws MailboxException
TransactionalMapperbegin in class TransactionalMapperMailboxExceptionTransactionalMapper.begin()protected void commit()
throws MailboxException
TransactionalMappercommit in class TransactionalMapperMailboxExceptionTransactionalMapper.commit()protected void rollback()
throws MailboxException
TransactionalMapperrollback in class TransactionalMapperMailboxExceptionTransactionalMapper.rollback()public Iterator<UpdatedFlags> updateFlags(Mailbox<Integer> mailbox, javax.mail.Flags flags, boolean value, boolean replace, MessageRange set) throws MailboxException
MessageMapperMessageRange. Only the flags may be modified after a message was saved to a mailbox.updateFlags in interface MessageMapper<Integer>updateFlags in class AbstractMessageMapper<Integer>MailboxExceptionMessageMapper.updateFlags(org.apache.james.mailbox.store.mail.model.Mailbox, javax.mail.Flags, boolean, boolean, org.apache.james.mailbox.model.MessageRange)public Map<Long,MessageMetaData> expungeMarkedForDeletionInMailbox(Mailbox<Integer> mailbox, MessageRange set) throws MailboxException
MessageMapperIterator which holds the uids for all deleted Messages for the given MessageRange which are marked for deletion
The list must be orderedMailboxExceptionCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.