Package org.apache.james.mailbox

Examples of org.apache.james.mailbox.MailboxException


            } else {
                membership.merge(messageNode);
            }
            return new SimpleMessageMetaData(membership);
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to save message " + message + " in mailbox " + mailbox, e);
        } catch (IOException e) {
            throw new MailboxException("Unable to save message " + message + " in mailbox " + mailbox, e);
        }       
    }
View Full Code Here


                uids.put(uid, new SimpleMessageMetaData(m));
                delete(mailbox, m);
            }
            return uids;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to search MessageRange " + set + " in mailbox " + mailbox, e);
        }
    }
View Full Code Here

            return highest;
        } catch (PersistenceException e) {
            if (manager != null && manager.getTransaction().isActive()) {
                manager.getTransaction().rollback();
            }
            throw new MailboxException("Unable to get highest mod-sequence for mailbox " + mailbox, e);
        } finally {
            if (manager != null) {
                manager.close();
            }
        }
View Full Code Here

            return modSeq;
        } catch (PersistenceException e) {
            if (manager != null && manager.getTransaction().isActive()) {
                manager.getTransaction().rollback();
            }
            throw new MailboxException("Unable to save highest mod-sequence for mailbox " + mailbox, e);
        } finally {
            if (manager != null) {
                manager.close();
            }
        }
View Full Code Here

                    throw new UnsupportedOperationException("Unsupported result: " + content);
                }

                addPartContent(fetchGroup, message, messageResult);
            } catch (IOException e) {
                throw new MailboxException("Unable to parse message", e);
            } catch (MimeException e) {
                throw new MailboxException("Unable to parse message", e);
            }
        }
        return messageResult;
    }
View Full Code Here

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

        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 {
            this.header = getHeaderContent();
            this.body = getBodyContent();

        } catch (IOException e) {
            throw new MailboxException("Unable to parse message",e);
        }
    }
View Full Code Here

        try {
            this.content = new SharedByteArrayInputStream(IOUtils.toByteArray(ResultUtils.toInput(message)));
            this.header = getHeaderContent();
            this.body = getBodyContent();
        } catch (IOException e) {
            throw new MailboxException("Unable to parse message",e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.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.