You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2006/10/10 10:35:02 UTC

svn commit: r454662 [5/15] - in /james/server/sandbox/imap-integration: ./ src/java/org/apache/james/imapserver/ src/java/org/apache/james/imapserver/commands/ src/java/org/apache/james/imapserver/debug/ src/java/org/apache/james/imapserver/store/ src/...

Modified: james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java?view=diff&rev=454662&r1=454661&r2=454662
==============================================================================
--- james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java (original)
+++ james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java Tue Oct 10 01:34:56 2006
@@ -1,107 +1,107 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james.imapserver.commands;
-
-import org.apache.james.imapserver.ImapRequestLineReader;
-import org.apache.james.imapserver.ImapResponse;
-import org.apache.james.imapserver.ImapSession;
-import org.apache.james.imapserver.ProtocolException;
-import org.apache.james.imapserver.store.MailboxException;
-import org.apache.james.mailboxmanager.GeneralMessageSet;
-import org.apache.james.mailboxmanager.MailboxManagerException;
-import org.apache.james.mailboxmanager.impl.GeneralMessageSetImpl;
-import org.apache.james.mailboxmanager.mailbox.ImapMailboxSession;
-
-/**
- * Handles processeing for the EXPUNGE imap command.
- *
- * @author  Darrell DeBoer <da...@apache.org>
- *
- * @version $Revision: 109034 $
- */
-class ExpungeCommand extends SelectedStateCommand
-{
-    public static final String NAME = "EXPUNGE";
-    public static final String ARGS = null;
-
-    /** @see CommandTemplate#doProcess */
-    protected void doProcess( ImapRequestLineReader request,
-                              ImapResponse response,
-                              ImapSession session )
-            throws ProtocolException, MailboxException
-    {
-        parser.endLine( request );
-
-        ImapMailboxSession mailbox = session.getSelected().getMailbox();
-        if (!mailbox.isWriteable()) {
-            response.commandFailed( this, "Mailbox selected read only." );
-        }
-       
-        try {
-            mailbox.expunge(GeneralMessageSetImpl.all(),GeneralMessageSet.TYPE_NONE);
-        } catch (MailboxManagerException e) {
-            throw new MailboxException(e);
-        }
-
-        session.unsolicitedResponses( response, false );
-        response.commandComplete( this );
-    }
-
-    /** @see ImapCommand#getName */
-    public String getName()
-    {
-        return NAME;
-    }
-
-    /** @see CommandTemplate#getArgSyntax */
-    public String getArgSyntax()
-    {
-        return ARGS;
-    }
-}
-/*
-6.4.3.  EXPUNGE Command
-
-   Arguments:  none
-
-   Responses:  untagged responses: EXPUNGE
-
-   Result:     OK - expunge completed
-               NO - expunge failure: can't expunge (e.g. permission
-                    denied)
-               BAD - command unknown or arguments invalid
-
-      The EXPUNGE command permanently removes from the currently
-      selected mailbox all messages that have the \Deleted flag set.
-      Before returning an OK to the client, an untagged EXPUNGE response
-      is sent for each message that is removed.
-
-   Example:    C: A202 EXPUNGE
-               S: * 3 EXPUNGE
-               S: * 3 EXPUNGE
-               S: * 5 EXPUNGE
-               S: * 8 EXPUNGE
-               S: A202 OK EXPUNGE completed
-
-      Note: in this example, messages 3, 4, 7, and 11 had the
-      \Deleted flag set.  See the description of the EXPUNGE
-      response for further explanation.
-*/
-
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.imapserver.commands;
+
+import org.apache.james.imapserver.ImapRequestLineReader;
+import org.apache.james.imapserver.ImapResponse;
+import org.apache.james.imapserver.ImapSession;
+import org.apache.james.imapserver.ProtocolException;
+import org.apache.james.imapserver.store.MailboxException;
+import org.apache.james.mailboxmanager.GeneralMessageSet;
+import org.apache.james.mailboxmanager.MailboxManagerException;
+import org.apache.james.mailboxmanager.impl.GeneralMessageSetImpl;
+import org.apache.james.mailboxmanager.mailbox.ImapMailboxSession;
+
+/**
+ * Handles processeing for the EXPUNGE imap command.
+ *
+ * @author  Darrell DeBoer <da...@apache.org>
+ *
+ * @version $Revision: 109034 $
+ */
+class ExpungeCommand extends SelectedStateCommand
+{
+    public static final String NAME = "EXPUNGE";
+    public static final String ARGS = null;
+
+    /** @see CommandTemplate#doProcess */
+    protected void doProcess( ImapRequestLineReader request,
+                              ImapResponse response,
+                              ImapSession session )
+            throws ProtocolException, MailboxException
+    {
+        parser.endLine( request );
+
+        ImapMailboxSession mailbox = session.getSelected().getMailbox();
+        if (!mailbox.isWriteable()) {
+            response.commandFailed( this, "Mailbox selected read only." );
+        }
+       
+        try {
+            mailbox.expunge(GeneralMessageSetImpl.all(),GeneralMessageSet.TYPE_NONE);
+        } catch (MailboxManagerException e) {
+            throw new MailboxException(e);
+        }
+
+        session.unsolicitedResponses( response, false );
+        response.commandComplete( this );
+    }
+
+    /** @see ImapCommand#getName */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /** @see CommandTemplate#getArgSyntax */
+    public String getArgSyntax()
+    {
+        return ARGS;
+    }
+}
+/*
+6.4.3.  EXPUNGE Command
+
+   Arguments:  none
+
+   Responses:  untagged responses: EXPUNGE
+
+   Result:     OK - expunge completed
+               NO - expunge failure: can't expunge (e.g. permission
+                    denied)
+               BAD - command unknown or arguments invalid
+
+      The EXPUNGE command permanently removes from the currently
+      selected mailbox all messages that have the \Deleted flag set.
+      Before returning an OK to the client, an untagged EXPUNGE response
+      is sent for each message that is removed.
+
+   Example:    C: A202 EXPUNGE
+               S: * 3 EXPUNGE
+               S: * 3 EXPUNGE
+               S: * 5 EXPUNGE
+               S: * 8 EXPUNGE
+               S: A202 OK EXPUNGE completed
+
+      Note: in this example, messages 3, 4, 7, and 11 had the
+      \Deleted flag set.  See the description of the EXPUNGE
+      response for further explanation.
+*/
+

Propchange: james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/ExpungeCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org