james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1098312 - in /james/imap/trunk: api/src/main/java/org/apache/james/imap/api/process/ processor/src/main/java/org/apache/james/imap/processor/ processor/src/main/java/org/apache/james/imap/processor/base/ processor/src/test/java/org/apache/...
Date Sun, 01 May 2011 14:17:13 GMT
Author: norman
Date: Sun May  1 14:17:12 2011
New Revision: 1098312

URL: http://svn.apache.org/viewvc?rev=1098312&view=rev
Log:
Send FLAGS / PERMANENTFLAGS responses for new flags/keywords. See IMAP-303

Modified:
    james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/SelectedMailbox.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/FakeMailboxListenerAdded.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java

Modified: james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/SelectedMailbox.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/SelectedMailbox.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/SelectedMailbox.java
(original)
+++ james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/SelectedMailbox.java
Sun May  1 14:17:12 2011
@@ -21,6 +21,8 @@ package org.apache.james.imap.api.proces
 
 import java.util.Collection;
 
+import javax.mail.Flags;
+
 import org.apache.james.mailbox.MailboxPath;
 
 /**
@@ -182,5 +184,18 @@ public interface SelectedMailbox {
      * @return lastUid
      */
     public long getLastUid();
+    
+    /**
+     * Return all applicable Flags for the selected mailbox
+     * 
+     * @return flags
+     */
+    public Flags getApplicableFlags();
+    
+    
+    public boolean hasNewApplicableFlags();
+    
+    public void resetNewApplicableFlags();
+
 
 }
\ No newline at end of file

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
(original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
Sun May  1 14:17:12 2011
@@ -38,6 +38,7 @@ import org.apache.james.imap.api.process
 import org.apache.james.imap.message.response.ExistsResponse;
 import org.apache.james.imap.message.response.ExpungeResponse;
 import org.apache.james.imap.message.response.FetchResponse;
+import org.apache.james.imap.message.response.FlagsResponse;
 import org.apache.james.imap.message.response.RecentResponse;
 import org.apache.james.imap.processor.base.AbstractChainedProcessor;
 import org.apache.james.mailbox.MailboxConstants;
@@ -93,6 +94,20 @@ abstract public class AbstractMailboxPro
         }
     }
 
+
+    protected void flags(Responder responder, SelectedMailbox selected) {
+        responder.respond(new FlagsResponse(selected.getApplicableFlags()));
+    }
+
+    protected void permanentFlags(Responder responder, MessageManager.MetaData metaData,
SelectedMailbox selected) {
+        final Flags permanentFlags = metaData.getPermanentFlags();
+        if (permanentFlags.contains(Flags.Flag.USER)) {
+            permanentFlags.add(selected.getApplicableFlags());
+        }
+        final StatusResponse untaggedOk = factory.untaggedOk(HumanReadableText.permanentFlags(permanentFlags),
ResponseCode.permanentFlags(permanentFlags));
+        responder.respond(untaggedOk);
+    }
+    
     protected void unsolicitedResponses(final ImapSession session, final ImapProcessor.Responder
responder, boolean useUids) {
         unsolicitedResponses(session, responder, false, useUids);
     }
@@ -155,11 +170,23 @@ abstract public class AbstractMailboxPro
     }
 
     private void addFlagsResponses(final ImapSession session, final SelectedMailbox selected,
final ImapProcessor.Responder responder, boolean useUid) {
+       
+        
         try {
+            final MessageManager mailbox = getMailbox(session, selected);
+            final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
+
+            // Check ifwe need to send a FLAGS and PERMANENTFLAGS response before the FETCH
response
+            // This is the case if some new flag/keyword was used
+            // See IMAP-303
+            if (selected.hasNewApplicableFlags()) {
+                flags(responder, selected);
+                permanentFlags(responder, mailbox.getMetaData(false, mailboxSession,  MessageManager.MetaData.FetchGroup.NO_COUNT),
selected);
+                selected.resetNewApplicableFlags();
+            }
+            
             final Collection<Long> flagUpdateUids = selected.flagUpdateUids();
             if (!flagUpdateUids.isEmpty()) {
-                final MessageManager mailbox = getMailbox(session, selected);
-                final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
                 for (final Long uid : flagUpdateUids) {
                     MessageRange messageSet = MessageRange.one(uid.longValue());
                     addFlagsResponses(session, selected, responder, useUid, messageSet, mailbox,
mailboxSession);
@@ -171,6 +198,7 @@ abstract public class AbstractMailboxPro
     }
 
     private void addFlagsResponses(final ImapSession session, final SelectedMailbox selected,
final ImapProcessor.Responder responder, boolean useUid, MessageRange messageSet, MessageManager
mailbox, MailboxSession mailboxSession) throws MailboxException {
+
         final Iterator<MessageResult> it = mailbox.getMessages(messageSet, FetchGroupImpl.MINIMAL,
mailboxSession);
         while (it.hasNext()) {
             MessageResult mr = it.next();

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
(original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
Sun May  1 14:17:12 2011
@@ -19,6 +19,7 @@
 
 package org.apache.james.imap.processor;
 
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
@@ -44,12 +45,15 @@ import org.apache.james.mailbox.MailboxN
 import org.apache.james.mailbox.MailboxPath;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
+import org.apache.james.mailbox.MessageRange;
+import org.apache.james.mailbox.MessageResult;
 import org.apache.james.mailbox.SearchQuery;
 import org.apache.james.mailbox.MessageManager.MetaData;
+import org.apache.james.mailbox.util.FetchGroupImpl;
 
 abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequest>
extends AbstractMailboxProcessor<M> {
 
-    private final FlagsResponse standardFlags;
+    private final Flags flags = new Flags();
 
     final StatusResponseFactory statusResponseFactory;
 
@@ -59,13 +63,11 @@ abstract class AbstractSelectionProcesso
         super(acceptableClass, next, mailboxManager, statusResponseFactory);
         this.statusResponseFactory = statusResponseFactory;
         this.openReadOnly = openReadOnly;
-        final Flags flags = new Flags();
         flags.add(Flags.Flag.ANSWERED);
         flags.add(Flags.Flag.DELETED);
         flags.add(Flags.Flag.DRAFT);
         flags.add(Flags.Flag.FLAGGED);
         flags.add(Flags.Flag.SEEN);
-        standardFlags = new FlagsResponse(flags);
     }
 
     /*
@@ -97,12 +99,12 @@ abstract class AbstractSelectionProcesso
 
         final SelectedMailbox selected = session.getSelected();
 
-        flags(responder);
+        flags(responder, selected);
         exists(responder, metaData);
         recent(responder, selected);
         uidValidity(responder, metaData);
         unseen(responder, metaData, selected);
-        permanentFlags(responder, metaData);
+        permanentFlags(responder, metaData, selected);
         uidNext(responder, metaData);
         taggedOk(responder, tag, command, metaData);
     }
@@ -125,15 +127,6 @@ abstract class AbstractSelectionProcesso
         responder.respond(taggedOk);
     }
 
-    private void flags(Responder responder) {
-        responder.respond(standardFlags);
-    }
-
-    private void permanentFlags(Responder responder, MessageManager.MetaData metaData) {
-        final Flags permanentFlags = metaData.getPermanentFlags();
-        final StatusResponse untaggedOk = statusResponseFactory.untaggedOk(HumanReadableText.permanentFlags(permanentFlags),
ResponseCode.permanentFlags(permanentFlags));
-        responder.respond(untaggedOk);
-    }
 
     private void unseen(Responder responder, MessageManager.MetaData metaData, final SelectedMailbox
selected) throws MailboxException {
         final Long firstUnseen = metaData.getFirstUnseen();
@@ -186,15 +179,16 @@ abstract class AbstractSelectionProcesso
     }
 
     private SelectedMailbox createNewSelectedMailbox(final MessageManager mailbox, final
MailboxSession mailboxSession, ImapSession session, MailboxPath path) throws MailboxException
{
-        SearchQuery query = new SearchQuery();
-        query.andCriteria(SearchQuery.all());
-
-        // use search here to allow implementation a better way to improve
-        // selects on mailboxes.
-        // See https://issues.apache.org/jira/browse/IMAP-192
-        final Iterator<Long> it = mailbox.search(query, mailboxSession);
-
-        final SelectedMailbox sessionMailbox = new SelectedMailboxImpl(getMailboxManager(),
it, session, path);
+        
+        Iterator<MessageResult> messages = mailbox.getMessages(MessageRange.all(),
FetchGroupImpl.MINIMAL, mailboxSession);
+        Flags applicableFlags = new Flags(flags);
+        List<Long> uids = new ArrayList<Long>();
+        while(messages.hasNext()) {
+            MessageResult mr = messages.next();
+            applicableFlags.add(mr.getFlags());
+            uids.add(mr.getUid());
+        }
+        final SelectedMailbox sessionMailbox = new SelectedMailboxImpl(getMailboxManager(),
uids.iterator(),applicableFlags,  session, path);
         session.selected(sessionMailbox);
         return sessionMailbox;
     }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
(original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
Sun May  1 14:17:12 2011
@@ -37,6 +37,8 @@ import org.apache.james.mailbox.MailboxE
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
+import org.apache.james.mailbox.MessageManager.MetaData;
+import org.apache.james.mailbox.MessageManager.MetaData.FetchGroup;
 import org.apache.james.mailbox.MessageRange;
 import org.apache.james.mailbox.MessageRangeException;
 
@@ -74,7 +76,16 @@ public class StoreProcessor extends Abst
                 if (messageSet != null) {
                     final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
                     final Map<Long, Flags> flagsByUid = mailbox.setFlags(flags, value,
replace, messageSet, mailboxSession);
+
                     if (!silent) {
+                        // As the STORE command is allowed to create a new "flag/keyword",
we need to send a FLAGS and PERMANENTFLAGS response before the FETCH response
+                        // if some new flag/keyword was used
+                        // See IMAP-303
+                        if (selected.hasNewApplicableFlags()) {
+                            flags(responder, selected);
+                            permanentFlags(responder, mailbox.getMetaData(false, mailboxSession,
FetchGroup.NO_COUNT), selected);
+                            selected.resetNewApplicableFlags();
+                        }
                         for (Map.Entry<Long, Flags> entry : flagsByUid.entrySet())
{
                             final long uid = entry.getKey();
                             final int msn = selected.msn(uid);
@@ -89,9 +100,12 @@ public class StoreProcessor extends Abst
                             } else {
                                 resultUid = null;
                             }
+                            
+                            
                             if (selected.isRecent(uid)) {
                                 resultFlags.add(Flags.Flag.RECENT);
                             }
+                           
                             final FetchResponse response = new FetchResponse(msn, resultFlags,
resultUid, null, null, null, null, null, null);
                             responder.respond(response);
                         }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java
(original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/MailboxEventAnalyser.java
Sun May  1 14:17:12 2011
@@ -53,14 +53,17 @@ public class MailboxEventAnalyser extend
     private boolean silentFlagChanges = false;
     private MailboxPath mailboxPath;
     private boolean closed = false;
+    private Flags applicableFlags;
+    private boolean applicableFlagsChanged;
 
-    public MailboxEventAnalyser(final ImapSession session, final MailboxPath mailboxPath)
{
+    public MailboxEventAnalyser(final ImapSession session, final MailboxPath mailboxPath,
Flags applicableFlags) {
         super(session);
         this.sessionId = ImapSessionUtils.getMailboxSession(session).getSessionId();
         flagUpdateUids = new TreeSet<Long>();
         expungedUids = new TreeSet<Long>();
         uninterestingFlag = Flags.Flag.RECENT;
         this.mailboxPath = mailboxPath;
+        this.applicableFlags = applicableFlags;
     }
 
     /**
@@ -109,6 +112,7 @@ public class MailboxEventAnalyser extend
                                 synchronized (flagUpdateUids) {
                                     flagUpdateUids.add(u.getUid());
                                 }
+                                
                             }
                         }
                     }
@@ -132,8 +136,25 @@ public class MailboxEventAnalyser extend
                                     }
                                 }
                             }
+                          
+
                         }
                     }
+                    
+
+                    synchronized (applicableFlags) {
+                        int size = applicableFlags.getUserFlags().length;
+                        FlagsUpdated updatedF = (FlagsUpdated) messageEvent;
+                        List<UpdatedFlags> flags = updatedF.getUpdatedFlags();
+                        
+                       for (int i = 0; i < flags.size(); i++) {
+                          applicableFlags.add(flags.get(i).getNewFlags());
+                       }
+                       if (size < applicableFlags.getSystemFlags().length) {
+                          applicableFlagsChanged = true;
+                       }
+                    }
+                    
                 } else if (messageEvent instanceof Expunged) {
                     synchronized (expungedUids) {
                         expungedUids.addAll(messageEvent.getUids());
@@ -178,6 +199,7 @@ public class MailboxEventAnalyser extend
         sizeChanged = false;
         flagUpdateUids.clear();
         isDeletedByOtherSession = false;
+        applicableFlagsChanged = false;
     }
     
     public synchronized void resetExpungedUids() {
@@ -286,5 +308,19 @@ public class MailboxEventAnalyser extend
     protected synchronized boolean isListenerClosed() {
         return closed;
     }
+    
+
+
+    public synchronized Flags getApplicableFlags() {
+        return applicableFlags;
+    }
+
+    public synchronized boolean hasNewApplicableFlags() {
+        return applicableFlagsChanged;
+    }
+
+    public synchronized void resetNewApplicableFlags() {
+        applicableFlagsChanged = false;
+    }
 
 }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
(original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
Sun May  1 14:17:12 2011
@@ -25,6 +25,8 @@ import java.util.Iterator;
 import java.util.Set;
 import java.util.TreeSet;
 
+import javax.mail.Flags;
+
 import org.apache.james.imap.api.ImapSessionUtils;
 import org.apache.james.imap.api.process.ImapSession;
 import org.apache.james.imap.api.process.SelectedMailbox;
@@ -46,11 +48,11 @@ public class SelectedMailboxImpl impleme
 
     private boolean recentUidRemoved;
 
-    public SelectedMailboxImpl(final MailboxManager mailboxManager, final Iterator<Long>
uids, final ImapSession session, final MailboxPath path) throws MailboxException {
+    public SelectedMailboxImpl(final MailboxManager mailboxManager, final Iterator<Long>
uids, final Flags applicableFlags, final ImapSession session, final MailboxPath path) throws
MailboxException {
         recentUids = new TreeSet<Long>();
         recentUidRemoved = false;
         MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
-        events = new MailboxEventAnalyser(session, path);
+        events = new MailboxEventAnalyser(session, path, applicableFlags);
         // Ignore events from our session
         events.setSilentFlagChanges(true);
         mailboxManager.addListener(path, events, mailboxSession);
@@ -258,4 +260,28 @@ public class SelectedMailboxImpl impleme
     public void resetExpungedUids() {
         events.resetExpungedUids();
     }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.imap.api.process.SelectedMailbox#getApplicableFlags()
+     */
+    public Flags getApplicableFlags() {
+        return events.getApplicableFlags();
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.imap.api.process.SelectedMailbox#hasNewApplicableFlags()
+     */
+    public boolean hasNewApplicableFlags() {
+        return events.hasNewApplicableFlags();
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.imap.api.process.SelectedMailbox#resetNewApplicableFlags()
+     */
+    public void resetNewApplicableFlags() {
+        events.resetNewApplicableFlags();
+    }
 }

Modified: james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/FakeMailboxListenerAdded.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/FakeMailboxListenerAdded.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/FakeMailboxListenerAdded.java
(original)
+++ james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/FakeMailboxListenerAdded.java
Sun May  1 14:17:12 2011
@@ -19,7 +19,11 @@
 
 package org.apache.james.imap.processor.base;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+
+import javax.mail.Flags;
 
 import org.apache.james.mailbox.MailboxListener;
 import org.apache.james.mailbox.MailboxPath;
@@ -42,5 +46,10 @@ public class FakeMailboxListenerAdded ex
         return uids;
     }
 
+    @Override
+    public Map<Long, Flags> getFlags() {
+        return new HashMap<Long, Flags>();
+    }
+
 
 }

Modified: james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java?rev=1098312&r1=1098311&r2=1098312&view=diff
==============================================================================
--- james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
(original)
+++ james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
Sun May  1 14:17:12 2011
@@ -184,7 +184,7 @@ public class MailboxEventAnalyserTest {
         
         MyImapSession imapsession = new MyImapSession(mSession);
         
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
 
         final MailboxListener.Event event = new MailboxListener.Event(mSession, mailboxPath)
{};
       
@@ -198,7 +198,7 @@ public class MailboxEventAnalyserTest {
         
         MyImapSession imapsession = new MyImapSession(mSession);
         
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
         
         analyser.event(new FakeMailboxListenerAdded(mSession, Arrays.asList(11L), mailboxPath));
         assertTrue(analyser.isSizeChanged());
@@ -210,7 +210,7 @@ public class MailboxEventAnalyserTest {
         
         MyImapSession imapsession = new MyImapSession(mSession);
         
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
         
         analyser.event(new FakeMailboxListenerAdded(mSession,  Arrays.asList(11L), mailboxPath));
         analyser.reset();
@@ -223,7 +223,7 @@ public class MailboxEventAnalyserTest {
         
         MyImapSession imapsession = new MyImapSession(mSession);
         
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
         
         final FakeMailboxListenerFlagsUpdate update = new FakeMailboxListenerFlagsUpdate(
                 mSession,  Arrays.asList(90L),  Arrays.asList(new UpdatedFlags(90, new Flags(),
new Flags())), mailboxPath);
@@ -239,7 +239,7 @@ public class MailboxEventAnalyserTest {
         
         MyImapSession imapsession = new MyImapSession(mSession);
         
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
         
         
         final FakeMailboxListenerFlagsUpdate update = new FakeMailboxListenerFlagsUpdate(
@@ -257,7 +257,7 @@ public class MailboxEventAnalyserTest {
         final long uid = 900L;
         MyMailboxSession mSession = new MyMailboxSession(11);
         MyImapSession imapsession = new MyImapSession(mSession);
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
         
         final FakeMailboxListenerFlagsUpdate update = new FakeMailboxListenerFlagsUpdate(
                 mSession, Arrays.asList(uid), Arrays.asList(new UpdatedFlags(uid, new Flags(),
new Flags(Flags.Flag.ANSWERED))), mailboxPath);
@@ -275,7 +275,7 @@ public class MailboxEventAnalyserTest {
         
         MyMailboxSession mSession = new MyMailboxSession(11);
         MyImapSession imapsession = new MyImapSession(mSession);
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,new
Flags());
         
         final FakeMailboxListenerFlagsUpdate update = new FakeMailboxListenerFlagsUpdate(
                 new MyMailboxSession(BASE_SESSION_ID), Arrays.asList(uid), Arrays.asList(new
UpdatedFlags(uid, new Flags(), new Flags(Flags.Flag.ANSWERED))), mailboxPath);
@@ -294,7 +294,7 @@ public class MailboxEventAnalyserTest {
             throws Exception {
         MyMailboxSession mSession = new MyMailboxSession(BASE_SESSION_ID);
         MyImapSession imapsession = new MyImapSession(mSession);
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
         
         
         final FakeMailboxListenerFlagsUpdate update = new FakeMailboxListenerFlagsUpdate(
@@ -311,7 +311,7 @@ public class MailboxEventAnalyserTest {
     public void testShouldNotSetUidWhenOnlyRecentFlagUpdated() throws Exception {
         MyMailboxSession mSession = new MyMailboxSession(BASE_SESSION_ID);
         MyImapSession imapsession = new MyImapSession(mSession);
-        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath);
+        MailboxEventAnalyser analyser = new MailboxEventAnalyser(imapsession, mailboxPath,
new Flags());
         
         
         final FakeMailboxListenerFlagsUpdate update = new FakeMailboxListenerFlagsUpdate(



---------------------------------------------------------------------
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