Examples of MailboxException


Examples of org.apache.james.mailbox.MailboxException

                });
               copiedRows.add(data);
            }
            return copiedRows.iterator();
        } catch (MailboxException e) {
            throw new MailboxException("Unable to parse message", e);
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.MailboxException

                }
            });
            return copiedMessages;

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

Examples of org.apache.james.mailbox.MailboxException

     */
    protected void begin() throws MailboxException {
        try {
            getEntityManager().getTransaction().begin();
        } catch (PersistenceException e) {
            throw new MailboxException("Begin of transaction failed", e);
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.MailboxException

     */
    protected void commit() throws MailboxException {
        try {
            getEntityManager().getTransaction().commit();
        } catch (PersistenceException e) {
            throw new MailboxException("Commit of transaction failed",e);
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.MailboxException

                }

            } while (results.size() > 0 && batchSize > 0);

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

Examples of org.apache.james.mailbox.MailboxException

     */
    public long countMessagesInMailbox(Mailbox<Long> mailbox) throws MailboxException {
        try {
            return (Long) getEntityManager().createNamedQuery("countMessagesInMailbox").setParameter("idParam", mailbox.getMailboxId()).getSingleResult();
        } catch (PersistenceException e) {
            throw new MailboxException("Count of messages failed in mailbox " + mailbox, e);
        }
    }
View Full Code Here

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

            final Long changedSince = fetch.getChangedSince();

            final MessageManager mailbox = getSelectedMailbox(session);

            if (mailbox == null) {
                throw new MailboxException("Session not in SELECTED state");
            }

            final boolean vanished = fetch.getVanished();
            if (vanished && !EnableProcessor.getEnabledCapabilities(session).contains(ImapConstants.SUPPORTS_QRESYNC)) {
                taggedBad(command, tag, responder, HumanReadableText.QRESYNC_NOT_ENABLED);
View Full Code Here

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

        Content body;
        if (isBase) {
            try {
                body = messageResult.getBody();
            } catch (IOException e) {
                throw new MailboxException("Unable to get TEXT of body", e);
            }
        } else {
            MessageResult.MimePath mimePath = new MimePathImpl(path);
            body = messageResult.getBody(mimePath);
        }
View Full Code Here

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

                    if (content(messageResult, name, path, isBase).size() <= 0) {
                        // Seems like this mail has no body
                        result.noBody();
                    }
                } catch (IOException e) {
                    throw new MailboxException("Unable to get size of header body element", e);
                }
        }
        return result;
    }
View Full Code Here

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

                    // Seems like this mail has no body
                    element.noBody();

                }
            } catch (IOException e) {
                throw new MailboxException("Unable to get size of header body element", e);

            }
            return element;
        } else {
            final Iterator<MessageResult.Header> headers = getHeaders(messageResult, path, isBase);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.