Package org.apache.james.mailbox

Examples of org.apache.james.mailbox.MailboxManager.createMailbox()


                            session.getLog().debug("INBOX exists. No need to create it.");
                        }
                    } else {
                        try {
                            session.getLog().debug("INBOX does not exist. Creating it.");
                            mailboxManager.createMailbox(inboxPath, mailboxSession);
                        } catch (MailboxExistsException e) {
                            if (session.getLog().isDebugEnabled()) {
                                session.getLog().debug("Mailbox created by concurrent call. Safe to ignore this exception.");
                            }
                        }
View Full Code Here


            final MailboxManager mailboxManager = getMailboxManager();
            MailboxSession mailboxsession = ImapSessionUtils.getMailboxSession(session);
            mailboxManager.renameMailbox(existingPath, newPath, mailboxsession);

            if (existingPath.getName().equalsIgnoreCase(ImapConstants.INBOX_NAME) && mailboxManager.mailboxExists(existingPath, mailboxsession) == false) {
                mailboxManager.createMailbox(existingPath, mailboxsession);
            }
            okComplete(command, tag, responder);
            unsolicitedResponses(session, responder, false);
        } catch (MailboxExistsException e) {
            if (session.getLog().isDebugEnabled()) {
View Full Code Here

     */
    protected void doProcess(CreateRequest request, ImapSession session, String tag, ImapCommand command, Responder responder) {
        final MailboxPath mailboxPath = buildFullPath(session, request.getMailboxName());
        try {
            final MailboxManager mailboxManager = getMailboxManager();
            mailboxManager.createMailbox(mailboxPath, ImapSessionUtils.getMailboxSession(session));
            unsolicitedResponses(session, responder, false);
            okComplete(command, tag, responder);
        } catch (MailboxExistsException e) {
            if (session.getLog().isDebugEnabled()) {
                session.getLog().debug("Create failed for mailbox " + mailboxPath + " as it already exists", e);
View Full Code Here

                    if (mailboxManager.mailboxExists(inboxPath, mailboxSession)) {
                        session.getLog().debug("INBOX exists. No need to create it.");
                    } else {
                        try {
                            session.getLog().debug("INBOX does not exist. Creating it.");
                            mailboxManager.createMailbox(inboxPath, mailboxSession);
                        } catch (MailboxExistsException e) {
                            session.getLog().debug("Mailbox created by concurrent call. Safe to ignore this exception.");
                        }
                    }
                    okComplete(command, tag, responder);
View Full Code Here

            final MailboxManager mailboxManager = getMailboxManager();
            MailboxSession mailboxsession = ImapSessionUtils.getMailboxSession(session);
            mailboxManager.renameMailbox(existingPath, newPath, mailboxsession);

            if (existingPath.getName().equalsIgnoreCase(ImapConstants.INBOX_NAME) && mailboxManager.mailboxExists(existingPath, mailboxsession) == false) {
                mailboxManager.createMailbox(existingPath, mailboxsession);
            }
            okComplete(command, tag, responder);
            unsolicitedResponses(session, responder, false);
        } catch (MailboxExistsException e) {
            session.getLog().debug("Rename failed", e);
View Full Code Here

     */
    protected void doProcess(CreateRequest request, ImapSession session, String tag, ImapCommand command, Responder responder) {
        final MailboxPath mailboxPath = buildFullPath(session, request.getMailboxName());
        try {
            final MailboxManager mailboxManager = getMailboxManager();
            mailboxManager.createMailbox(mailboxPath, ImapSessionUtils.getMailboxSession(session));
            unsolicitedResponses(session, responder, false);
            okComplete(command, tag, responder);
        } catch (MailboxExistsException e) {
            session.getLog().debug("Create failed", e);
            no(command, tag, responder, HumanReadableText.MAILBOX_EXISTS);
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.