Package org.apache.james.mailbox

Examples of org.apache.james.mailbox.MessageManager.expunge()


    protected void doProcess(CloseRequest message, ImapSession session, String tag, ImapCommand command, Responder responder) {
        try {
            MessageManager mailbox = getSelectedMailbox(session);
            final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
            if (mailbox.getMetaData(false, mailboxSession, FetchGroup.NO_COUNT).isWriteable()) {
                mailbox.expunge(MessageRange.all(), mailboxSession);
                session.deselect();

                // Don't send HIGHESTMODSEQ when close. Like correct in the ERRATA of RFC5162
                //
                // See http://www.rfc-editor.org/errata_search.php?rfc=5162
View Full Code Here


            MessageManager mailbox = session.getUserMailbox();

            for (int i = 0; i < toBeRemoved.size(); i++) {
                MessageRange range = MessageRange.one(toBeRemoved.get(i));
                mailbox.setFlags(new Flags(Flags.Flag.DELETED), true, false, range, mailboxSession);
                mailbox.expunge(range, mailboxSession);
            }
            response = new POP3Response(POP3Response.OK_RESPONSE, "Apache James POP3 Server signing off.");
        } catch (Exception ex) {
            response = new POP3Response(POP3Response.ERR_RESPONSE, "Some deleted messages were not removed");
            session.getLogger().error("Some deleted messages were not removed", ex);
View Full Code Here

        try {
            MessageManager mailbox = getSelectedMailbox(session);
            final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
            if (mailbox.isWriteable(mailboxSession)) {

                mailbox.expunge(MessageRange.all(), mailboxSession);
                session.deselect();
                // TODO: the following comment was present in the code before
                // refactoring
                // TODO: doesn't seem to match the implementation
                // TODO: check that implementation is correct.
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.