Package org.apache.james.mailbox

Examples of org.apache.james.mailbox.MailboxException


        this.modSeq = modSeq;
        this.logger = logger;
        try {
            this.content = new SharedByteArrayInputStream(IOUtils.toByteArray(ResultUtils.toInput(message)));
        } catch (IOException e) {
            throw new MailboxException("Unable to parse message",e);
        }
      
        this.bodyStartOctet = (int) (message.getFullContentOctets() - message.getBodyOctets());
       
        PropertyBuilder pBuilder = new PropertyBuilder(message.getProperties());
View Full Code Here


        this.mailboxId = mailbox.getMailboxId();
        setFlags(original.createFlags());
        try {
            this.content = new SharedByteArrayInputStream(IOUtils.toByteArray(ResultUtils.toInput(original)));
        } catch (IOException e) {
            throw new MailboxException("Unable to parse message",e);
        }
      
        this.bodyStartOctet = (int) (original.getFullContentOctets() - original.getBodyOctets());
       
        PropertyBuilder pBuilder = new PropertyBuilder(original.getProperties());
View Full Code Here

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

                    count++;
                }
            }
            return count;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to count messages in mailbox " + mailbox, e);
        }
      
    }
View Full Code Here

                    count++;
                }
            }
            return count;
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to count unseen messages in mailbox " + mailbox, e);
        }
    }
View Full Code Here

        if (membership.isPersistent()) {
            try {

                getSession().getNodeByIdentifier(membership.getId()).remove();
            } catch (RepositoryException e) {
                throw new MailboxException("Unable to delete message " + message + " in mailbox " + mailbox, e);
            }
        }
    }
View Full Code Here

                    from = results.get(results.size() - 1).getUid() + 1;
                }

            } while (results.size() > 0 && batchSize > 0);
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to search MessageRange " + set + " in mailbox " + mailbox, e);
        }
    }
View Full Code Here

                list.add(new JCRMessage(iterator.nextNode(), mailboxSession.getLog()).getUid());
            }
            return list;

        } catch (RepositoryException e) {
            throw new MailboxException("Unable to search recent messages in mailbox " + mailbox, e);
        }
    }
View Full Code Here

                return new JCRMessage(iterator.nextNode(), mailboxSession.getLog()).getUid();
            } else {
                return null;
            }
        } catch (RepositoryException e) {
            throw new MailboxException("Unable to find first unseen message 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

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.