Package org.apache.james.mailbox.exception

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


        try {
            Session s = repository.login(session);
            Node node = s.getNodeByIdentifier(mailbox.getMailboxId());
            return node.getProperty(JCRMailbox.HIGHESTMODSEQ_PROPERTY).getLong();
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to get highest mod-sequence for mailbox " + mailbox, e);
        }
    }
View Full Code Here


            modseq++;
            node.setProperty(JCRMailbox.HIGHESTMODSEQ_PROPERTY, modseq);
            s.save();
            return modseq;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to consume next uid for mailbox " + mailbox, e);
        }
    }
View Full Code Here

        try {
            if (getSession().hasPendingChanges()) {
                getSession().save();
            }
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to commit", e);
        }
    }
View Full Code Here

            node.remove();
           
        } catch (PathNotFoundException e) {
            // mailbox does not exists..
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to delete mailbox " + mailbox, e);
        }
    }
View Full Code Here

            }
            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

                mailboxList.add(new JCRMailbox(it.nextNode(), getLogger()));
            }
        } catch (PathNotFoundException e) {
            // nothing todo
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to find mailbox " + path, e);
        }
        return mailboxList;
    }
View Full Code Here

           } else {
               jcrMailbox.merge(node);
           }
           
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to save mailbox " + mailbox, e);
        }
    }
View Full Code Here

            QueryResult result = manager.createQuery(queryString, Query.XPATH)
                    .execute();
            NodeIterator it = result.getNodes();
            return it.hasNext();
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to retrieve children for mailbox " + mailbox, e);
        }
    }
View Full Code Here

            while (it.hasNext()) {
                mList.add(new JCRMailbox(it.nextNode(), getLogger()));
            }
            return mList;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to retrieve the list of mailboxes", e);
        }
    }
View Full Code Here

        try {
            Session s = repository.login(mailboxSession);
            Node node = s.getNodeByIdentifier(mailbox.getMailboxId());
            return node.getProperty(JCRMailbox.LASTUID_PROPERTY).getLong();
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to get last uid for mailbox " + mailbox, e);
        }
       
    }
View Full Code Here

TOP

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

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.