Package org.apache.james.mailbox.exception

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


                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


            // A copy of a message is recent
            // See MAILBOX-85
            node.setProperty(JCRMessage.RECENT_PROPERTY, true);
            return new SimpleMessageMetaData(new JCRMessage(node, mailboxSession.getLog()));
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to copy message " + original + " in mailbox " + mailbox, e);
        }
    }
View Full Code Here

            } 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

                    break;
            }
            return results.iterator();

        } catch (IOException e) {
            throw new MailboxException("Search of MessageRange " + set + " failed in mailbox " + mailbox, e);
        }
    }
View Full Code Here

                    break;
            }

            return data;
        } catch (IOException e) {
            throw new MailboxException("Search of MessageRange " + set + " failed in mailbox " + mailbox, e);
        }
    }
View Full Code Here

            get.setMaxVersions(1);
            Result result = mailboxes.get(get);
            long count = Bytes.toLong(result.getValue(MAILBOX_CF, MAILBOX_MESSAGE_COUNT));
            return count;
        } catch (IOException e) {
            throw new MailboxException("Count of messages failed in mailbox " + mailbox, e);
        } finally {
            if (mailboxes != null) {
                try {
                    mailboxes.close();
                } catch (IOException ex) {
                    throw new MailboxException("Error closing table " + mailboxes, ex);
                }
            }
        }
    }
View Full Code Here

            while ((result = scanner.next()) != null) {
                count++;
            }
            return count;
        } catch (IOException e) {
            throw new MailboxException("Search of first unseen message failed in mailbox " + mailbox, e);
        } finally {
            scanner.close();
            if (messages != null) {
                try {
                    messages.close();
                } catch (IOException ex) {
                    throw new MailboxException("Error closing table " + messages, ex);
                }
            }
        }
    }
View Full Code Here

            Delete delete = new Delete(messageRowKey(message));
            mailboxes.incrementColumnValue(mailboxRowKey(mailbox.getMailboxId()), MAILBOX_CF, MAILBOX_MESSAGE_COUNT, -1);
            messages.delete(delete);

        } catch (IOException ex) {
            throw new MailboxException("Delete of message " + message + " failed in mailbox " + mailbox, ex);
        } finally {

            if (mailboxes != null) {
                try {
                    mailboxes.close();
                } catch (IOException ex) {
                    throw new MailboxException("Error closing table " + mailboxes, ex);
                }
            }
            if (messages != null) {
                try {
                    messages.close();
                } catch (IOException ex) {
                    throw new MailboxException("Error closing table " + messages, ex);
                }
            }

        }
View Full Code Here

            if (row != null) {
                lastUnseen = Long.MAX_VALUE - Bytes.toLong(row, 16, 8);
            }
            return lastUnseen;
        } catch (IOException e) {
            throw new MailboxException("Search of first unseen message failed in mailbox " + mailbox, e);
        } finally {
            scanner.close();
            if (messages != null) {
                try {
                    messages.close();
                } catch (IOException ex) {
                    throw new MailboxException("Error closing table " + messages, ex);
                }
            }
        }
    }
View Full Code Here

                uids.add(Long.MAX_VALUE - Bytes.toLong(result.getRow(), 16, 8));
            }
            Collections.reverse(uids);
            return uids;
        } catch (IOException e) {
            throw new MailboxException("Search of recent messages failed in mailbox " + mailbox, e);
        } finally {
            scanner.close();
            if (messages != null) {
                try {
                    messages.close();
                } catch (IOException ex) {
                    throw new MailboxException("Error closing table " + messages, ex);
                }
            }
        }
    }
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.