public interface MailboxMapper<Id> extends Mapper
Mailbox
actions. A MailboxMapper
has a lifecycle from the start of a request
to the end of the request.Mapper.Transaction<T>, Mapper.VoidTransaction
Modifier and Type | Method and Description |
---|---|
void |
delete(Mailbox<Id> mailbox)
Delete the given
Mailbox from the underlying storage |
Mailbox<Id> |
findMailboxByPath(MailboxPath mailboxName)
Return the
Mailbox for the given name |
List<Mailbox<Id>> |
findMailboxWithPathLike(MailboxPath mailboxPath)
Return a List of
Mailbox which name is like the given name |
boolean |
hasChildren(Mailbox<Id> mailbox,
char delimiter)
Return if the given
Mailbox has children |
List<Mailbox<Id>> |
list()
|
void |
save(Mailbox<Id> mailbox)
Save the give
Mailbox to the underlying storage |
endRequest, execute
void save(Mailbox<Id> mailbox) throws MailboxException
Mailbox
to the underlying storagemailbox
- MailboxException
void delete(Mailbox<Id> mailbox) throws MailboxException
Mailbox
from the underlying storagemailbox
- MailboxException
Mailbox<Id> findMailboxByPath(MailboxPath mailboxName) throws MailboxException, MailboxNotFoundException
Mailbox
for the given namemailboxName
- MailboxException
MailboxNotFoundException
List<Mailbox<Id>> findMailboxWithPathLike(MailboxPath mailboxPath) throws MailboxException
Mailbox
which name is like the given namemailboxPath
- MailboxException
boolean hasChildren(Mailbox<Id> mailbox, char delimiter) throws MailboxException, MailboxNotFoundException
Mailbox
has childrenmailbox
- not nulldelimiter
- path delimiterMailboxException
MailboxNotFoundException
List<Mailbox<Id>> list() throws MailboxException
MailboxException
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.