public class JCRMailboxMapper extends AbstractJCRScalingMapper implements MailboxMapper<String>
Mapper.Transaction<T>, Mapper.VoidTransaction
MAILBOXES_PATH
NODE_DELIMITER
Constructor and Description |
---|
JCRMailboxMapper(MailboxSessionJCRRepository repos,
MailboxSession session,
int scaling) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Mailbox<String> mailbox)
Delete the given
Mailbox from the underlying storage |
Mailbox<String> |
findMailboxByPath(MailboxPath path)
Return the
Mailbox for the given name |
List<Mailbox<String>> |
findMailboxWithPathLike(MailboxPath path)
Return a List of
Mailbox which name is like the given name |
boolean |
hasChildren(Mailbox<String> mailbox,
char delimiter)
Return if the given
Mailbox has children |
List<Mailbox<String>> |
list()
|
void |
save(Mailbox<String> mailbox)
Save the give
Mailbox to the underlying storage |
begin, commit, constructUserPathPart, createUserPathStructure, endRequest, getLogger, getSession, rollback
execute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
endRequest, execute
public JCRMailboxMapper(MailboxSessionJCRRepository repos, MailboxSession session, int scaling)
public void delete(Mailbox<String> mailbox) throws MailboxException
MailboxMapper
Mailbox
from the underlying storagedelete
in interface MailboxMapper<String>
MailboxException
public Mailbox<String> findMailboxByPath(MailboxPath path) throws MailboxException, MailboxNotFoundException
MailboxMapper
Mailbox
for the given namefindMailboxByPath
in interface MailboxMapper<String>
MailboxException
MailboxNotFoundException
public List<Mailbox<String>> findMailboxWithPathLike(MailboxPath path) throws MailboxException
MailboxMapper
Mailbox
which name is like the given namefindMailboxWithPathLike
in interface MailboxMapper<String>
MailboxException
public void save(Mailbox<String> mailbox) throws MailboxException
MailboxMapper
Mailbox
to the underlying storagesave
in interface MailboxMapper<String>
MailboxException
public boolean hasChildren(Mailbox<String> mailbox, char delimiter) throws MailboxException, MailboxNotFoundException
MailboxMapper
Mailbox
has childrenhasChildren
in interface MailboxMapper<String>
mailbox
- not nulldelimiter
- path delimiterMailboxException
MailboxNotFoundException
public List<Mailbox<String>> list() throws MailboxException
MailboxMapper
list
in interface MailboxMapper<String>
MailboxException
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.