Package org.apache.james.mailbox.exception

Examples of org.apache.james.mailbox.exception.MailboxNotFoundException


                e.printStackTrace();
                throw new MailboxException("Unable to delete Mailbox " + mailbox, e);
            }
        }
        else
            throw new MailboxNotFoundException(mailbox.getName());
    }
View Full Code Here


     * @return The mailbox
     * @throws MailboxNotFoundException If the mailboxId is not in the cache
     */
    private Mailbox<Integer> getCachedMailbox(Integer mailboxId) throws MailboxNotFoundException {
        if (mailboxId == null)
            throw new MailboxNotFoundException("null");
        try {
            return mailboxCache.get(mailboxId);
        } catch (IndexOutOfBoundsException e) {
            throw new MailboxNotFoundException(String.valueOf(mailboxId));
        }
    }
View Full Code Here

            QueryResult result = manager.createQuery(queryString, Query.XPATH).execute();
            NodeIterator it = result.getNodes();
            if (it.hasNext()) {
                return new JCRMailbox(it.nextNode(), getLogger());
            }
            throw new MailboxNotFoundException(path);
        } catch (PathNotFoundException e) {
            throw new MailboxNotFoundException(path);
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to find mailbox " + path, e);
        }
    }
View Full Code Here

            scan.setFilter(filters);
            scanner = mailboxes.getScanner(scan);
            Result result = scanner.next();
           
            if (result == null) {
                throw new MailboxNotFoundException(mailboxPath);
            }
            return mailboxFromResult(result);
        } catch (IOException e) {
            throw new MailboxException("Search of mailbox " + mailboxPath + " failed", e);
        } finally {
View Full Code Here

            try {
                if (scanner.next() != null) {
                    return true;
                }
            } catch (IOException e) {
                throw new MailboxNotFoundException("hasChildren() " + mailbox.getName());
            }
            return false;
        } catch (IOException e) {
            throw new MailboxException("Search of mailbox " + mailbox + " failed", e);
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.exception.MailboxNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.