/** @see CommandTemplate#doProcess */
  protected void doProcess(
      ImapRequestLineReader request, ImapResponse response, ImapSession session)
      throws ProtocolException, FolderException, AuthorizationException {
    String mailboxName = parser.mailbox(request);
    parser.endLine(request);

    session.getHost().createMailbox(session.getUser(), mailboxName);
    session.unsolicitedResponses(response);
    response.commandComplete(this);
  }
示例#2
0
  /** @see CommandTemplate#doProcess */
  protected void doProcess(
      ImapRequestLineReader request, ImapResponse response, ImapSession session)
      throws ProtocolException, FolderException {
    parser.endLine(request);

    if (session.getSelected().isReadonly()) {
      response.commandFailed(this, "Mailbox selected read only.");
    }

    MailFolder folder = session.getSelected();
    folder.expunge();
    session.unsolicitedResponses(response);
    response.commandComplete(this);
  }
示例#3
0
  /** @see CommandTemplate#doProcess */
  protected void doProcess(
      ImapRequestLineReader request, ImapResponse response, ImapSession session)
      throws ProtocolException, FolderException, AuthorizationException {

    String mailboxName = parser.mailbox(request);
    parser.endLine(request);

    MailFolder folder = getMailbox(mailboxName, session, true);
    if (session.getSelected() != null
        && folder.getFullName().equals(session.getSelected().getFullName())) {
      session.deselect();
    }
    session.getHost().deleteMailbox(session.getUser(), mailboxName);

    session.unsolicitedResponses(response);
    response.commandComplete(this);
  }