Package org.apache.james.mailbox.model

Examples of org.apache.james.mailbox.model.UpdatedFlags


        assertFalse(iterator.hasNext());
    }

    @Test
    public void testShouldShowRecentRemoved() {
        dispatcher.flagsUpdated(session, Arrays.asList(result.getUid()), mailbox, Arrays.asList(new UpdatedFlags(result.getUid(), -1, new Flags(
                Flags.Flag.RECENT), new Flags())));
        assertEquals(1, collector.events.size());
        assertTrue(collector.events.get(0) instanceof MailboxListener.FlagsUpdated);
        MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.events
                .get(0);
View Full Code Here


        assertFalse(iterator.hasNext());
    }

    @Test
    public void testShouldShowSeenAdded() {
        dispatcher.flagsUpdated(session, Arrays.asList(result.getUid()), mailbox, Arrays.asList(new UpdatedFlags(result.getUid(), -1, new Flags(),
                new Flags(Flags.Flag.SEEN))));
        assertEquals(1, collector.events.size());
        assertTrue(collector.events.get(0) instanceof MailboxListener.FlagsUpdated);
        MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.events
                .get(0);
View Full Code Here

        assertFalse(iterator.hasNext());
    }

    @Test
    public void testShouldShowSeenRemoved() {
        dispatcher.flagsUpdated(session, Arrays.asList(result.getUid()), mailbox, Arrays.asList(new UpdatedFlags(result.getUid(), -1, new Flags(
                Flags.Flag.SEEN), new Flags())));
        assertEquals(1, collector.events.size());
        assertTrue(collector.events.get(0) instanceof MailboxListener.FlagsUpdated);
        MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.events
                .get(0);
View Full Code Here

        Flags updated = new Flags();
        updated.add(Flags.Flag.ANSWERED);
        updated.add(Flags.Flag.DRAFT);
        updated.add(Flags.Flag.SEEN);

        dispatcher.flagsUpdated(session, Arrays.asList(result.getUid()), mailbox, Arrays.asList(new UpdatedFlags(result.getUid(), -1, originals, updated)));
        assertEquals(1, collector.events.size());
        assertTrue(collector.events.get(0) instanceof MailboxListener.FlagsUpdated);
        MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.events
                .get(0);
        Iterator<Flags.Flag> iterator = event.getUpdatedFlags().get(0).systemFlagIterator();
View Full Code Here

                    } else {
                        modSeq = messageFile.lastModified();
                    }
                    member.setModSeq(modSeq);

                    updatedFlags.add(new UpdatedFlags(member.getUid(), modSeq, originalFlags, newFlags));

                    long uid = member.getUid();
                    folder.update(mailboxSession, uid, newMessageName);
                }
            } catch (IOException e) {
View Full Code Here

                    // update put not to include the allready existing flags
                    messages.put(put);
                    messages.flushCommits();
                }

                UpdatedFlags uFlags = new UpdatedFlags(member.getUid(), member.getModSeq(), originalFlags, newFlags);
                updatedFlags.add(uFlags);
            }
        } catch (IOException e) {
            throw new MailboxException("Error setting flags for messages in " + mailbox, e);
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.model.UpdatedFlags

Copyright © 2018 www.massapicom. 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.