james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r545282 [2/2] - in /james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src: main/java/org/apache/james/api/imap/ main/java/org/apache/james/experimental/imapserver/ main/java/org/apache/james/experimental/imapserver/proc...
Date Thu, 07 Jun 2007 19:52:32 GMT
Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SearchProcessor.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SearchProcessor.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SearchProcessor.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SearchProcessor.java
Thu Jun  7 12:52:29 2007
@@ -26,13 +26,14 @@
 import org.apache.james.api.imap.ImapCommand;
 import org.apache.james.api.imap.ImapConstants;
 import org.apache.james.api.imap.ImapMessage;
+import org.apache.james.api.imap.ImapProcessor;
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.api.imap.message.request.ImapRequest;
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.experimental.imapserver.AuthorizationException;
-import org.apache.james.experimental.imapserver.ImapSession;
-import org.apache.james.experimental.imapserver.processor.ImapProcessor;
 import org.apache.james.experimental.imapserver.processor.base.AbstractImapRequestProcessor;
+import org.apache.james.experimental.imapserver.processor.base.ImapSessionUtils;
 import org.apache.james.imap.message.request.imap4rev1.SearchRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.SearchResponse;
 import org.apache.james.imapserver.store.MailboxException;
@@ -67,7 +68,7 @@
 	
 	private ImapResponseMessage doProcess(final SearchTerm searchTerm, final boolean useUids,

 			ImapSession session, String tag, ImapCommand command) throws MailboxException, AuthorizationException,
ProtocolException {
-        ImapMailboxSession mailbox = session.getSelected().getMailbox();
+        ImapMailboxSession mailbox = ImapSessionUtils.getMailbox(session);
         final int resultCode;
         if (useUids) {
             resultCode= MessageResult.UID;

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SelectProcessor.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SelectProcessor.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SelectProcessor.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SelectProcessor.java
Thu Jun  7 12:52:29 2007
@@ -21,12 +21,12 @@
 
 import org.apache.james.api.imap.ImapCommand;
 import org.apache.james.api.imap.ImapMessage;
+import org.apache.james.api.imap.ImapProcessor;
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.api.imap.message.request.ImapRequest;
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.experimental.imapserver.AuthorizationException;
-import org.apache.james.experimental.imapserver.ImapSession;
-import org.apache.james.experimental.imapserver.processor.ImapProcessor;
 import org.apache.james.imap.message.request.imap4rev1.SelectRequest;
 import org.apache.james.imapserver.store.MailboxException;
 import org.apache.james.mailboxmanager.manager.MailboxManagerProvider;

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StatusProcessor.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StatusProcessor.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StatusProcessor.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StatusProcessor.java
Thu Jun  7 12:52:29 2007
@@ -23,14 +23,15 @@
 import org.apache.james.api.imap.ImapCommand;
 import org.apache.james.api.imap.ImapConstants;
 import org.apache.james.api.imap.ImapMessage;
+import org.apache.james.api.imap.ImapProcessor;
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.api.imap.message.StatusDataItems;
 import org.apache.james.api.imap.message.request.ImapRequest;
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.experimental.imapserver.AuthorizationException;
-import org.apache.james.experimental.imapserver.ImapSession;
-import org.apache.james.experimental.imapserver.processor.ImapProcessor;
 import org.apache.james.experimental.imapserver.processor.base.AbstractMailboxAwareProcessor;
+import org.apache.james.experimental.imapserver.processor.base.ImapSessionUtils;
 import org.apache.james.imap.message.request.imap4rev1.StatusRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.StatusResponse;
 import org.apache.james.imapserver.store.MailboxException;
@@ -131,7 +132,7 @@
         buffer.append(')');
         final StatusResponse result = 
             new StatusResponse(command, buffer.toString(), tag);
-        addUnsolicitedResponses( result, session, false );
+        ImapSessionUtils.addUnsolicitedResponses( result, session, false );
         return result;
 	}
 }

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StoreProcessor.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StoreProcessor.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StoreProcessor.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/StoreProcessor.java
Thu Jun  7 12:52:29 2007
@@ -25,15 +25,16 @@
 
 import org.apache.james.api.imap.ImapCommand;
 import org.apache.james.api.imap.ImapMessage;
+import org.apache.james.api.imap.ImapProcessor;
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.api.imap.message.IdRange;
 import org.apache.james.api.imap.message.StoreDirective;
 import org.apache.james.api.imap.message.request.ImapRequest;
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.experimental.imapserver.AuthorizationException;
-import org.apache.james.experimental.imapserver.ImapSession;
-import org.apache.james.experimental.imapserver.processor.ImapProcessor;
 import org.apache.james.experimental.imapserver.processor.base.AbstractImapRequestProcessor;
+import org.apache.james.experimental.imapserver.processor.base.ImapSessionUtils;
 import org.apache.james.imap.message.request.imap4rev1.StoreRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.StoreResponse;
 import org.apache.james.imapserver.store.MailboxException;
@@ -73,7 +74,7 @@
 			final Flags flags, final boolean useUids, 
 			ImapSession session, String tag, ImapCommand command) throws MailboxException, AuthorizationException,
ProtocolException {
 
-        ImapMailboxSession mailbox = session.getSelected().getMailbox();
+        ImapMailboxSession mailbox = ImapSessionUtils.getMailbox(session);
         MailboxListener silentListener = null;
 
         final boolean replace;
@@ -92,7 +93,7 @@
         }
         try {
             if (directive.isSilent()) {
-                silentListener = session.getSelected().getMailbox();
+                silentListener = ImapSessionUtils.getMailbox(session);
             }
             for (int i = 0; i < idSet.length; i++) {
                 final GeneralMessageSet messageSet = GeneralMessageSetImpl

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SubscribeProcessor.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SubscribeProcessor.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/SubscribeProcessor.java
Thu Jun  7 12:52:29 2007
@@ -21,13 +21,14 @@
 
 import org.apache.james.api.imap.ImapCommand;
 import org.apache.james.api.imap.ImapMessage;
+import org.apache.james.api.imap.ImapProcessor;
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.api.imap.message.request.ImapRequest;
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.experimental.imapserver.AuthorizationException;
-import org.apache.james.experimental.imapserver.ImapSession;
-import org.apache.james.experimental.imapserver.processor.ImapProcessor;
 import org.apache.james.experimental.imapserver.processor.base.AbstractMailboxAwareProcessor;
+import org.apache.james.experimental.imapserver.processor.base.ImapSessionUtils;
 import org.apache.james.imap.message.request.imap4rev1.SubscribeRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.store.MailboxException;
@@ -69,7 +70,7 @@
            throw new MailboxException(e);
         }
         final CommandCompleteResponse result = new CommandCompleteResponse(command, tag);
-        addUnsolicitedResponses(result, session, false);
+        ImapSessionUtils.addUnsolicitedResponses(result, session, false);
         return result;
 	}
 }

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/UnsubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/UnsubscribeProcessor.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/UnsubscribeProcessor.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/imap4rev1/UnsubscribeProcessor.java
Thu Jun  7 12:52:29 2007
@@ -21,13 +21,14 @@
 
 import org.apache.james.api.imap.ImapCommand;
 import org.apache.james.api.imap.ImapMessage;
+import org.apache.james.api.imap.ImapProcessor;
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.api.imap.message.request.ImapRequest;
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.experimental.imapserver.AuthorizationException;
-import org.apache.james.experimental.imapserver.ImapSession;
-import org.apache.james.experimental.imapserver.processor.ImapProcessor;
 import org.apache.james.experimental.imapserver.processor.base.AbstractMailboxAwareProcessor;
+import org.apache.james.experimental.imapserver.processor.base.ImapSessionUtils;
 import org.apache.james.imap.message.request.imap4rev1.UnsubscribeRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.store.MailboxException;
@@ -69,7 +70,7 @@
             throw new MailboxException(e);
         }
         final CommandCompleteResponse result = new CommandCompleteResponse(command, tag);
-        addUnsolicitedResponses(result, session, false);
+        ImapSessionUtils.addUnsolicitedResponses(result, session, false);
         return result;
 	}
 }

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/main/DefaultImapProcessorFactory.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/main/DefaultImapProcessorFactory.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/main/DefaultImapProcessorFactory.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/processor/main/DefaultImapProcessorFactory.java
Thu Jun  7 12:52:29 2007
@@ -19,7 +19,7 @@
 
 package org.apache.james.experimental.imapserver.processor.main;
 
-import org.apache.james.experimental.imapserver.processor.ImapProcessor;
+import org.apache.james.api.imap.ImapProcessor;
 import org.apache.james.experimental.imapserver.processor.base.ImapResponseMessageProcessor;
 import org.apache.james.experimental.imapserver.processor.base.UnknownRequestImapProcessor;
 import org.apache.james.experimental.imapserver.processor.imap4rev1.Imap4Rev1ProcessorFactory;

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/commands/AbstractCommandTest.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/commands/AbstractCommandTest.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/commands/AbstractCommandTest.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/commands/AbstractCommandTest.java
Thu Jun  7 12:52:29 2007
@@ -22,12 +22,13 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ImapSessionState;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.experimental.imapserver.ImapRequestHandler;
-import org.apache.james.experimental.imapserver.ImapSession;
 import org.apache.james.experimental.imapserver.StandardFactory;
 import org.apache.james.experimental.imapserver.processor.base.AbstractMailboxAwareProcessor;
+import org.apache.james.experimental.imapserver.processor.base.ImapSessionUtils;
 import org.apache.james.experimental.imapserver.processor.main.DefaultImapProcessorFactory;
 import org.apache.james.imapserver.codec.decode.base.AbstractImapCommandParser;
 import org.apache.james.imapserver.codec.encode.main.DefaultImapEncoderFactory;
@@ -79,7 +80,7 @@
     
     protected void setUpMailboxManager() {
         mockSession.expects(atLeastOnce()).method("getAttribute")
-        .with(eq(AbstractMailboxAwareProcessor.MAILBOX_ATTRIBUTE_SESSION_KEY)).will(returnValue(mockMailboxManager.proxy()));
+        .with(eq(ImapSessionUtils.MAILBOX_MANAGER_ATTRIBUTE_SESSION_KEY)).will(returnValue(mockMailboxManager.proxy()));
     }
     
     protected void setUpNamespace(String userDefaultNamespace) {

Modified: james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/session/AbstractSessionTest.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/session/AbstractSessionTest.java?view=diff&rev=545282&r1=545281&r2=545282
==============================================================================
--- james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/session/AbstractSessionTest.java
(original)
+++ james/server/sandbox/seda-imap-modular/experimental-seda-imap-function/src/test/java/org/apache/james/experimental/imapserver/handler/session/AbstractSessionTest.java
Thu Jun  7 12:52:29 2007
@@ -39,9 +39,9 @@
 import javax.mail.internet.MimeMessage;
 
 import org.apache.avalon.framework.logger.LogEnabled;
+import org.apache.james.api.imap.ImapSession;
 import org.apache.james.api.imap.ProtocolException;
 import org.apache.james.experimental.imapserver.ImapRequestHandler;
-import org.apache.james.experimental.imapserver.ImapSession;
 import org.apache.james.experimental.imapserver.ImapSessionImpl;
 import org.apache.james.experimental.imapserver.StandardFactory;
 import org.apache.james.experimental.imapserver.TestConstants;



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


Mime
View raw message