james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject svn commit: r1724225 [3/5] - in /james/project/trunk: dockerfiles/run/guice/destination/conf/META-INF/ dockerfiles/run/spring/destination/conf/META-INF/ mailbox/caching/src/main/java/org/apache/james/mailbox/caching/ mailbox/cassandra/src/main/java/org...
Date Tue, 12 Jan 2016 13:17:05 GMT
Modified: james/project/trunk/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/StrictLuceneMessageSearchIndexText.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/StrictLuceneMessageSearchIndexText.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/StrictLuceneMessageSearchIndexText.java (original)
+++ james/project/trunk/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/StrictLuceneMessageSearchIndexText.java Tue Jan 12 13:17:03 2016
@@ -18,7 +18,7 @@
  ****************************************************************/
 package org.apache.james.mailbox.lucene.search;
 
-public class StrictLuceneMessageSearchIndexText extends LuceneMessageSearchIndexTest{
+public class StrictLuceneMessageSearchIndexText extends LuceneMailboxMessageSearchIndexTest {
 
     @Override
     protected boolean useLenient() {

Modified: james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java (original)
+++ james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMessageMapper.java Tue Jan 12 13:17:03 2016
@@ -41,7 +41,7 @@ import org.apache.james.mailbox.maildir.
 import org.apache.james.mailbox.maildir.MaildirId;
 import org.apache.james.mailbox.maildir.MaildirMessageName;
 import org.apache.james.mailbox.maildir.MaildirStore;
-import org.apache.james.mailbox.maildir.mail.model.MaildirMessage;
+import org.apache.james.mailbox.maildir.mail.model.MaildirMailboxMessage;
 import org.apache.james.mailbox.model.MessageMetaData;
 import org.apache.james.mailbox.model.MessageRange;
 import org.apache.james.mailbox.model.MessageRange.Type;
@@ -50,8 +50,8 @@ import org.apache.james.mailbox.store.Fl
 import org.apache.james.mailbox.store.SimpleMessageMetaData;
 import org.apache.james.mailbox.store.mail.AbstractMessageMapper;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
-import org.apache.james.mailbox.store.mail.model.Message;
-import org.apache.james.mailbox.store.mail.model.impl.SimpleMessage;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
+import org.apache.james.mailbox.store.mail.model.impl.SimpleMailboxMessage;
 
 public class MaildirMessageMapper extends AbstractMessageMapper<MaildirId> {
 
@@ -99,15 +99,15 @@ public class MaildirMessageMapper extend
 
     /**
      * @see org.apache.james.mailbox.store.mail.MessageMapper#delete(org.apache.james.mailbox.store.mail.model.Mailbox,
-     *      org.apache.james.mailbox.store.mail.model.Message)
+     *      MailboxMessage)
      */
     @Override
-    public void delete(Mailbox<MaildirId> mailbox, Message<MaildirId> message) throws MailboxException {
+    public void delete(Mailbox<MaildirId> mailbox, MailboxMessage<MaildirId> message) throws MailboxException {
         MaildirFolder folder = maildirStore.createMaildirFolder(mailbox);
         try {
             folder.delete(mailboxSession, message.getUid());
         } catch (MailboxException e) {
-            throw new MailboxException("Unable to delete Message " + message + " in Mailbox " + mailbox, e);
+            throw new MailboxException("Unable to delete MailboxMessage " + message + " in Mailbox " + mailbox, e);
         }
     }
 
@@ -117,9 +117,9 @@ public class MaildirMessageMapper extend
      *      org.apache.james.mailbox.store.mail.MessageMapper.FetchType, int)
      */
     @Override
-    public Iterator<Message<MaildirId>> findInMailbox(Mailbox<MaildirId> mailbox, MessageRange set, FetchType fType, int max)
+    public Iterator<MailboxMessage<MaildirId>> findInMailbox(Mailbox<MaildirId> mailbox, MessageRange set, FetchType fType, int max)
             throws MailboxException {
-        final List<Message<MaildirId>> results;
+        final List<MailboxMessage<MaildirId>> results;
         final long from = set.getUidFrom();
         final long to = set.getUidTo();
         final Type type = set.getType();
@@ -158,7 +158,7 @@ public class MaildirMessageMapper extend
      */
     @Override
     public Long findFirstUnseenMessageUid(Mailbox<MaildirId> mailbox) throws MailboxException {
-        List<Message<MaildirId>> result = findMessagesInMailbox(mailbox, MaildirMessageName.FILTER_UNSEEN_MESSAGES, 1);
+        List<MailboxMessage<MaildirId>> result = findMessagesInMailbox(mailbox, MaildirMessageName.FILTER_UNSEEN_MESSAGES, 1);
         if (result.isEmpty()) {
             return null;
         } else {
@@ -176,9 +176,9 @@ public class MaildirMessageMapper extend
         final List<UpdatedFlags> updatedFlags = new ArrayList<UpdatedFlags>();
         final MaildirFolder folder = maildirStore.createMaildirFolder(mailbox);
 
-        Iterator<Message<MaildirId>> it = findInMailbox(mailbox, set, FetchType.Metadata, -1);
+        Iterator<MailboxMessage<MaildirId>> it = findInMailbox(mailbox, set, FetchType.Metadata, -1);
         while (it.hasNext()) {
-            final Message<MaildirId> member = it.next();
+            final MailboxMessage<MaildirId> member = it.next();
             Flags originalFlags = member.createFlags();
             member.setFlags(flagsUpdateCalculator.buildNewFlags(originalFlags));
             Flags newFlags = member.createFlags();
@@ -221,7 +221,7 @@ public class MaildirMessageMapper extend
                     folder.update(mailboxSession, uid, newMessageName);
                 }
             } catch (IOException e) {
-                throw new MailboxException("Failure while save Message " + member + " in Mailbox " + mailbox, e);
+                throw new MailboxException("Failure while save MailboxMessage " + member + " in Mailbox " + mailbox, e);
             }
 
         }
@@ -232,7 +232,7 @@ public class MaildirMessageMapper extend
     @Override
     public Map<Long, MessageMetaData> expungeMarkedForDeletionInMailbox(Mailbox<MaildirId> mailbox, MessageRange set)
             throws MailboxException {
-        List<Message<MaildirId>> results = new ArrayList<Message<MaildirId>>();
+        List<MailboxMessage<MaildirId>> results = new ArrayList<MailboxMessage<MaildirId>>();
         final long from = set.getUidFrom();
         final long to = set.getUidTo();
         final Type type = set.getType();
@@ -255,7 +255,7 @@ public class MaildirMessageMapper extend
         }
         Map<Long, MessageMetaData> uids = new HashMap<Long, MessageMetaData>();
         for (int i = 0; i < results.size(); i++) {
-            Message<MaildirId> m = results.get(i);
+            MailboxMessage<MaildirId> m = results.get(i);
             long uid = m.getUid();
             uids.put(uid, new SimpleMessageMetaData(m));
             delete(mailbox, m);
@@ -268,22 +268,22 @@ public class MaildirMessageMapper extend
      * (non-Javadoc)
      * 
      * @see org.apache.james.mailbox.store.mail.MessageMapper#move(org.apache.james.mailbox.store.mail.model.Mailbox,
-     *      org.apache.james.mailbox.store.mail.model.Message)
+     *      MailboxMessage)
      */
     @Override
-    public MessageMetaData move(Mailbox<MaildirId> mailbox, Message<MaildirId> original) throws MailboxException {
+    public MessageMetaData move(Mailbox<MaildirId> mailbox, MailboxMessage<MaildirId> original) throws MailboxException {
         throw new UnsupportedOperationException("Not implemented - see https://issues.apache.org/jira/browse/IMAP-370");
     }
 
     /**
      * @see org.apache.james.mailbox.store.mail.AbstractMessageMapper#copy(org.apache
      *      .james.mailbox.store.mail.model.Mailbox, long, long,
-     *      org.apache.james.mailbox.store.mail.model.Message)
+     *      MailboxMessage)
      */
     @Override
-    protected MessageMetaData copy(Mailbox<MaildirId> mailbox, long uid, long modSeq, Message<MaildirId> original)
+    protected MessageMetaData copy(Mailbox<MaildirId> mailbox, long uid, long modSeq, MailboxMessage<MaildirId> original)
             throws MailboxException {
-        SimpleMessage<MaildirId> theCopy = SimpleMessage.copy(mailbox.getMailboxId(), original);
+        SimpleMailboxMessage<MaildirId> theCopy = SimpleMailboxMessage.copy(mailbox.getMailboxId(), original);
         Flags flags = theCopy.createFlags();
         flags.add(Flag.RECENT);
         theCopy.setFlags(flags);
@@ -292,10 +292,10 @@ public class MaildirMessageMapper extend
 
     /**
      * @see org.apache.james.mailbox.store.mail.AbstractMessageMapper#save(org.apache.james.mailbox.store.mail.model.Mailbox,
-     *      org.apache.james.mailbox.store.mail.model.Message)
+     *      MailboxMessage)
      */
     @Override
-    protected MessageMetaData save(Mailbox<MaildirId> mailbox, Message<MaildirId> message) throws MailboxException {
+    protected MessageMetaData save(Mailbox<MaildirId> mailbox, MailboxMessage<MaildirId> message) throws MailboxException {
         MaildirFolder folder = maildirStore.createMaildirFolder(mailbox);
         long uid = 0;
         // a new message
@@ -326,7 +326,7 @@ public class MaildirMessageMapper extend
             while ((len = input.read(b)) != -1)
                 fos.write(b, 0, len);
         } catch (IOException ioe) {
-            throw new MailboxException("Failure while save Message " + message + " in Mailbox " + mailbox, ioe);
+            throw new MailboxException("Failure while save MailboxMessage " + message + " in Mailbox " + mailbox, ioe);
         } finally {
             try {
                 if (fos != null)
@@ -359,7 +359,7 @@ public class MaildirMessageMapper extend
             FileUtils.moveFile(messageFile, newMessageFile);
         } catch (IOException e) {
             // TODO: Try copy and delete
-            throw new MailboxException("Failure while save Message " + message + " in Mailbox " + mailbox, e);
+            throw new MailboxException("Failure while save MailboxMessage " + message + " in Mailbox " + mailbox, e);
         }
         try {
             uid = folder.appendMessage(mailboxSession, newMessageFile.getName());
@@ -367,7 +367,7 @@ public class MaildirMessageMapper extend
             message.setModSeq(newMessageFile.lastModified());
             return new SimpleMessageMetaData(message);
         } catch (MailboxException e) {
-            throw new MailboxException("Failure while save Message " + message + " in Mailbox " + mailbox, e);
+            throw new MailboxException("Failure while save MailboxMessage " + message + " in Mailbox " + mailbox, e);
         }
 
     }
@@ -381,25 +381,25 @@ public class MaildirMessageMapper extend
 
     }
 
-    private List<Message<MaildirId>> findMessageInMailboxWithUID(Mailbox<MaildirId> mailbox, long uid)
+    private List<MailboxMessage<MaildirId>> findMessageInMailboxWithUID(Mailbox<MaildirId> mailbox, long uid)
             throws MailboxException {
         MaildirFolder folder = maildirStore.createMaildirFolder(mailbox);
         try {
             MaildirMessageName messageName = folder.getMessageNameByUid(mailboxSession, uid);
 
-            ArrayList<Message<MaildirId>> messages = new ArrayList<Message<MaildirId>>();
+            ArrayList<MailboxMessage<MaildirId>> messages = new ArrayList<MailboxMessage<MaildirId>>();
             if (messageName != null && messageName.getFile().exists()) {
-                messages.add(new MaildirMessage(mailbox, uid, messageName));
+                messages.add(new MaildirMailboxMessage(mailbox, uid, messageName));
             }
             return messages;
 
         } catch (IOException e) {
-            throw new MailboxException("Failure while search for Message with uid " + uid + " in Mailbox " + mailbox, e);
+            throw new MailboxException("Failure while search for MailboxMessage with uid " + uid + " in Mailbox " + mailbox, e);
         }
     }
 
-    private List<Message<MaildirId>> findMessagesInMailboxBetweenUIDs(Mailbox<MaildirId> mailbox, FilenameFilter filter,
-            long from, long to, int max) throws MailboxException {
+    private List<MailboxMessage<MaildirId>> findMessagesInMailboxBetweenUIDs(Mailbox<MaildirId> mailbox, FilenameFilter filter,
+                                                                             long from, long to, int max) throws MailboxException {
         MaildirFolder folder = maildirStore.createMaildirFolder(mailbox);
         int cur = 0;
         SortedMap<Long, MaildirMessageName> uidMap = null;
@@ -409,9 +409,9 @@ public class MaildirMessageMapper extend
             else
                 uidMap = folder.getUidMap(mailboxSession, from, to);
 
-            ArrayList<Message<MaildirId>> messages = new ArrayList<Message<MaildirId>>();
+            ArrayList<MailboxMessage<MaildirId>> messages = new ArrayList<MailboxMessage<MaildirId>>();
             for (Entry<Long, MaildirMessageName> entry : uidMap.entrySet()) {
-                messages.add(new MaildirMessage(mailbox, entry.getKey(), entry.getValue()));
+                messages.add(new MaildirMailboxMessage(mailbox, entry.getKey(), entry.getValue()));
                 if (max != -1) {
                     cur++;
                     if (cur >= max)
@@ -425,15 +425,15 @@ public class MaildirMessageMapper extend
 
     }
 
-    private List<Message<MaildirId>> findMessagesInMailbox(Mailbox<MaildirId> mailbox, FilenameFilter filter, int limit)
+    private List<MailboxMessage<MaildirId>> findMessagesInMailbox(Mailbox<MaildirId> mailbox, FilenameFilter filter, int limit)
             throws MailboxException {
         MaildirFolder folder = maildirStore.createMaildirFolder(mailbox);
         try {
             SortedMap<Long, MaildirMessageName> uidMap = folder.getUidMap(mailboxSession, filter, limit);
 
-            ArrayList<Message<MaildirId>> filtered = new ArrayList<Message<MaildirId>>(uidMap.size());
+            ArrayList<MailboxMessage<MaildirId>> filtered = new ArrayList<MailboxMessage<MaildirId>>(uidMap.size());
             for (Entry<Long, MaildirMessageName> entry : uidMap.entrySet())
-                filtered.add(new MaildirMessage(mailbox, entry.getKey(), entry.getValue()));
+                filtered.add(new MaildirMailboxMessage(mailbox, entry.getKey(), entry.getValue()));
             return filtered;
         } catch (IOException e) {
             throw new MailboxException("Failure while search for Messages in Mailbox " + mailbox, e);
@@ -441,14 +441,14 @@ public class MaildirMessageMapper extend
 
     }
 
-    private List<Message<MaildirId>> findDeletedMessageInMailboxWithUID(Mailbox<MaildirId> mailbox, long uid)
+    private List<MailboxMessage<MaildirId>> findDeletedMessageInMailboxWithUID(Mailbox<MaildirId> mailbox, long uid)
             throws MailboxException {
         MaildirFolder folder = maildirStore.createMaildirFolder(mailbox);
         try {
             MaildirMessageName messageName = folder.getMessageNameByUid(mailboxSession, uid);
-            ArrayList<Message<MaildirId>> messages = new ArrayList<Message<MaildirId>>();
+            ArrayList<MailboxMessage<MaildirId>> messages = new ArrayList<MailboxMessage<MaildirId>>();
             if (MaildirMessageName.FILTER_DELETED_MESSAGES.accept(null, messageName.getFullName())) {
-                messages.add(new MaildirMessage(mailbox, uid, messageName));
+                messages.add(new MaildirMailboxMessage(mailbox, uid, messageName));
             }
             return messages;
 

Copied: james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMailboxMessage.java (from r1724224, james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java)
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMailboxMessage.java?p2=james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMailboxMessage.java&p1=james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java&r1=1724224&r2=1724225&rev=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java (original)
+++ james/project/trunk/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMailboxMessage.java Tue Jan 12 13:17:03 2016
@@ -34,8 +34,9 @@ import org.apache.commons.io.IOUtils;
 import org.apache.james.mailbox.maildir.MaildirFolder;
 import org.apache.james.mailbox.maildir.MaildirId;
 import org.apache.james.mailbox.maildir.MaildirMessageName;
-import org.apache.james.mailbox.store.mail.model.AbstractMessage;
+import org.apache.james.mailbox.store.mail.model.AbstractMailboxMessage;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.mail.model.Property;
 import org.apache.james.mailbox.store.mail.model.impl.PropertyBuilder;
 import org.apache.james.mailbox.store.streaming.CountingInputStream;
@@ -48,7 +49,7 @@ import org.apache.james.mime4j.stream.Mi
 import org.apache.james.mime4j.stream.MimeTokenStream;
 import org.apache.james.mime4j.stream.RecursionMode;
 
-public class MaildirMessage extends AbstractMessage<MaildirId> {
+public class MaildirMailboxMessage extends AbstractMailboxMessage<MaildirId> {
 
 	private MaildirMessageName messageName;
     private int bodyStartOctet;
@@ -65,7 +66,7 @@ public class MaildirMessage extends Abst
     protected boolean newMessage;
     private long modSeq;
     
-    public MaildirMessage(Mailbox<MaildirId> mailbox, long uid, MaildirMessageName messageName) throws IOException {
+    public MaildirMailboxMessage(Mailbox<MaildirId> mailbox, long uid, MaildirMessageName messageName) throws IOException {
         this.mailbox = mailbox;
         setUid(uid);
         setModSeq(messageName.getFile().lastModified());
@@ -105,7 +106,7 @@ public class MaildirMessage extends Abst
     }
     /**
      * @see
-     * org.apache.james.mailbox.store.mail.model.Message#setFlags(
+     * MailboxMessage#setFlags(
      * javax.mail.Flags)
      */
     @Override
@@ -122,7 +123,7 @@ public class MaildirMessage extends Abst
     
     /**
      * @see
-     * org.apache.james.mailbox.store.mail.model.Message#isAnswered()
+     * MailboxMessage#isAnswered()
      */
     @Override
     public boolean isAnswered() {
@@ -131,7 +132,7 @@ public class MaildirMessage extends Abst
 
     /**
      * @see
-     * org.apache.james.mailbox.store.mail.model.Message#isDeleted()
+     * MailboxMessage#isDeleted()
      */
     @Override
     public boolean isDeleted() {
@@ -140,7 +141,7 @@ public class MaildirMessage extends Abst
 
     /**
      * @see
-     * org.apache.james.mailbox.store.mail.model.Message#isDraft()
+     * MailboxMessage#isDraft()
      */
     @Override
     public boolean isDraft() {
@@ -149,7 +150,7 @@ public class MaildirMessage extends Abst
 
     /**
      * @see
-     * org.apache.james.mailbox.store.mail.model.Message#isFlagged()
+     * MailboxMessage#isFlagged()
      */
     @Override
     public boolean isFlagged() {
@@ -158,7 +159,7 @@ public class MaildirMessage extends Abst
 
     /**
      * @see
-     * org.apache.james.mailbox.store.mail.model.Message#isRecent()
+     * MailboxMessage#isRecent()
      */
     @Override
     public boolean isRecent() {
@@ -166,7 +167,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#isSeen()
+     * @see MailboxMessage#isSeen()
      */
     @Override
     public boolean isSeen() {
@@ -174,7 +175,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * Indicates whether this MaildirMessage reflects a new message or one that already
+     * Indicates whether this MaildirMailboxMessage reflects a new message or one that already
      * exists in the file system.
      * @return true if it is new, false if it already exists
      */
@@ -185,7 +186,7 @@ public class MaildirMessage extends Abst
     
     @Override
     public String toString() {
-        StringBuilder theString = new StringBuilder("MaildirMessage ");
+        StringBuilder theString = new StringBuilder("MaildirMailboxMessage ");
         theString.append(getUid());
         theString.append(" {");
         Flags flags = createFlags();
@@ -205,7 +206,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getModSeq()
+     * @see MailboxMessage#getModSeq()
      */
     @Override
     public long getModSeq() {
@@ -213,7 +214,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#setModSeq(long)
+     * @see MailboxMessage#setModSeq(long)
      */
     @Override
     public void setModSeq(long modSeq) {
@@ -321,7 +322,7 @@ public class MaildirMessage extends Abst
 
     /**
      * Return the position in the given {@link InputStream} at which the Body of
-     * the Message starts
+     * the MailboxMessage starts
      * 
      * @param msgIn
      * @return bodyStartOctet
@@ -358,7 +359,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getMediaType()
+     * @see MailboxMessage#getMediaType()
      */
     @Override
     public String getMediaType() {
@@ -367,7 +368,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getSubType()
+     * @see MailboxMessage#getSubType()
      */
     @Override
     public String getSubType() {
@@ -376,7 +377,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getFullContentOctets()
+     * @see MailboxMessage#getFullContentOctets()
      */
     @Override
     public long getFullContentOctets() {
@@ -393,7 +394,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getTextualLineCount()
+     * @see MailboxMessage#getTextualLineCount()
      */
     @Override
     public Long getTextualLineCount() {
@@ -402,7 +403,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getProperties()
+     * @see MailboxMessage#getProperties()
      */
     @Override
     public List<Property> getProperties() {
@@ -411,7 +412,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getInternalDate()
+     * @see MailboxMessage#getInternalDate()
      */
     @Override
     public Date getInternalDate() {
@@ -427,7 +428,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getBodyContent()
+     * @see MailboxMessage#getBodyContent()
      */
     @Override
     public InputStream getBodyContent() throws IOException {
@@ -439,7 +440,7 @@ public class MaildirMessage extends Abst
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.AbstractMessage#getBodyStartOctet()
+     * @see AbstractMailboxMessage#getBodyStartOctet()
      */
     @Override
     protected int getBodyStartOctet() {

Copied: james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MailderMailboxMessageNameTest.java (from r1724224, james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MailderMessageNameTest.java)
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MailderMailboxMessageNameTest.java?p2=james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MailderMailboxMessageNameTest.java&p1=james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MailderMessageNameTest.java&r1=1724224&r2=1724225&rev=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MailderMessageNameTest.java (original)
+++ james/project/trunk/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/MailderMailboxMessageNameTest.java Tue Jan 12 13:17:03 2016
@@ -30,12 +30,12 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 @RunWith(value = Parameterized.class)
-public class MailderMessageNameTest {
+public class MailderMailboxMessageNameTest {
 
     private String validName;
     private Parts parts;
 
-    public MailderMessageNameTest(Parts parts) {
+    public MailderMailboxMessageNameTest(Parts parts) {
         this.validName = parts.fullName;
         this.parts = parts;
     }

Modified: james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageMapper.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageMapper.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageMapper.java (original)
+++ james/project/trunk/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageMapper.java Tue Jan 12 13:17:03 2016
@@ -40,24 +40,24 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.mail.ModSeqProvider;
 import org.apache.james.mailbox.store.mail.UidProvider;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
-import org.apache.james.mailbox.store.mail.model.Message;
-import org.apache.james.mailbox.store.mail.model.impl.SimpleMessage;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
+import org.apache.james.mailbox.store.mail.model.impl.SimpleMailboxMessage;
 
 public class InMemoryMessageMapper extends AbstractMessageMapper<InMemoryId> {
 
-    private Map<InMemoryId, Map<Long, Message<InMemoryId>>> mailboxByUid;
+    private Map<InMemoryId, Map<Long, MailboxMessage<InMemoryId>>> mailboxByUid;
     private static final int INITIAL_SIZE = 256;
 
     public InMemoryMessageMapper(MailboxSession session, UidProvider<InMemoryId> uidProvider,
             ModSeqProvider<InMemoryId> modSeqProvider) {
         super(session, uidProvider, modSeqProvider);
-        this.mailboxByUid = new ConcurrentHashMap<InMemoryId, Map<Long, Message<InMemoryId>>>(INITIAL_SIZE);
+        this.mailboxByUid = new ConcurrentHashMap<InMemoryId, Map<Long, MailboxMessage<InMemoryId>>>(INITIAL_SIZE);
     }
 
-    private Map<Long, Message<InMemoryId>> getMembershipByUidForMailbox(Mailbox<InMemoryId> mailbox) {
-        Map<Long, Message<InMemoryId>> membershipByUid = mailboxByUid.get(mailbox.getMailboxId());
+    private Map<Long, MailboxMessage<InMemoryId>> getMembershipByUidForMailbox(Mailbox<InMemoryId> mailbox) {
+        Map<Long, MailboxMessage<InMemoryId>> membershipByUid = mailboxByUid.get(mailbox.getMailboxId());
         if (membershipByUid == null) {
-            membershipByUid = new ConcurrentHashMap<Long, Message<InMemoryId>>(INITIAL_SIZE);
+            membershipByUid = new ConcurrentHashMap<Long, MailboxMessage<InMemoryId>>(INITIAL_SIZE);
             mailboxByUid.put(mailbox.getMailboxId(), membershipByUid);
         }
         return membershipByUid;
@@ -75,7 +75,7 @@ public class InMemoryMessageMapper exten
      */
     public long countUnseenMessagesInMailbox(Mailbox<InMemoryId> mailbox) throws MailboxException {
         long count = 0;
-        for (Message<InMemoryId> member : getMembershipByUidForMailbox(mailbox).values()) {
+        for (MailboxMessage<InMemoryId> member : getMembershipByUidForMailbox(mailbox).values()) {
             if (!member.isSeen()) {
                 count++;
             }
@@ -85,9 +85,9 @@ public class InMemoryMessageMapper exten
 
     /**
      * @see org.apache.james.mailbox.store.mail.MessageMapper#delete(org.apache.james.mailbox.store.mail.model.Mailbox,
-     *      org.apache.james.mailbox.store.mail.model.Message)
+     *      MailboxMessage)
      */
-    public void delete(Mailbox<InMemoryId> mailbox, Message<InMemoryId> message) throws MailboxException {
+    public void delete(Mailbox<InMemoryId> mailbox, MailboxMessage<InMemoryId> message) throws MailboxException {
         getMembershipByUidForMailbox(mailbox).remove(message.getUid());
     }
 
@@ -96,25 +96,25 @@ public class InMemoryMessageMapper exten
      *      org.apache.james.mailbox.model.MessageRange,
      *      org.apache.james.mailbox.store.mail.MessageMapper.FetchType, int)
      */
-    public Iterator<Message<InMemoryId>> findInMailbox(Mailbox<InMemoryId> mailbox, MessageRange set, FetchType ftype, int max)
+    public Iterator<MailboxMessage<InMemoryId>> findInMailbox(Mailbox<InMemoryId> mailbox, MessageRange set, FetchType ftype, int max)
             throws MailboxException {
-        List<Message<InMemoryId>> results;
+        List<MailboxMessage<InMemoryId>> results;
         final MessageRange.Type type = set.getType();
         switch (type) {
         case ALL:
-            results = new ArrayList<Message<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
+            results = new ArrayList<MailboxMessage<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
             break;
         case FROM:
-            results = new ArrayList<Message<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
-            for (final Iterator<Message<InMemoryId>> it = results.iterator(); it.hasNext();) {
+            results = new ArrayList<MailboxMessage<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
+            for (final Iterator<MailboxMessage<InMemoryId>> it = results.iterator(); it.hasNext();) {
                 if (it.next().getUid() < set.getUidFrom()) {
                     it.remove();
                 }
             }
             break;
         case RANGE:
-            results = new ArrayList<Message<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
-            for (final Iterator<Message<InMemoryId>> it = results.iterator(); it.hasNext();) {
+            results = new ArrayList<MailboxMessage<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
+            for (final Iterator<MailboxMessage<InMemoryId>> it = results.iterator(); it.hasNext();) {
                 final long uid = it.next().getUid();
                 if (uid < set.getUidFrom() || uid > set.getUidTo()) {
                     it.remove();
@@ -122,14 +122,14 @@ public class InMemoryMessageMapper exten
             }
             break;
         case ONE:
-            results = new ArrayList<Message<InMemoryId>>(1);
-            final Message<InMemoryId> member = getMembershipByUidForMailbox(mailbox).get(set.getUidFrom());
+            results = new ArrayList<MailboxMessage<InMemoryId>>(1);
+            final MailboxMessage<InMemoryId> member = getMembershipByUidForMailbox(mailbox).get(set.getUidFrom());
             if (member != null) {
                 results.add(member);
             }
             break;
         default:
-            results = new ArrayList<Message<InMemoryId>>();
+            results = new ArrayList<MailboxMessage<InMemoryId>>();
             break;
         }
         Collections.sort(results);
@@ -145,7 +145,7 @@ public class InMemoryMessageMapper exten
      */
     public List<Long> findRecentMessageUidsInMailbox(Mailbox<InMemoryId> mailbox) throws MailboxException {
         final List<Long> results = new ArrayList<Long>();
-        for (Message<InMemoryId> member : getMembershipByUidForMailbox(mailbox).values()) {
+        for (MailboxMessage<InMemoryId> member : getMembershipByUidForMailbox(mailbox).values()) {
             if (member.isRecent()) {
                 results.add(member.getUid());
             }
@@ -159,10 +159,10 @@ public class InMemoryMessageMapper exten
      * @see org.apache.james.mailbox.store.mail.MessageMapper#findFirstUnseenMessageUid(org.apache.james.mailbox.store.mail.model.Mailbox)
      */
     public Long findFirstUnseenMessageUid(Mailbox<InMemoryId> mailbox) throws MailboxException {
-        List<Message<InMemoryId>> memberships = new ArrayList<Message<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
+        List<MailboxMessage<InMemoryId>> memberships = new ArrayList<MailboxMessage<InMemoryId>>(getMembershipByUidForMailbox(mailbox).values());
         Collections.sort(memberships);
         for (int i = 0; i < memberships.size(); i++) {
-            Message<InMemoryId> m = memberships.get(i);
+            MailboxMessage<InMemoryId> m = memberships.get(i);
             if (m.isSeen() == false) {
                 return m.getUid();
             }
@@ -175,9 +175,9 @@ public class InMemoryMessageMapper exten
             throws MailboxException {
         final Map<Long, MessageMetaData> filteredResult = new HashMap<Long, MessageMetaData>();
 
-        Iterator<Message<InMemoryId>> it = findInMailbox(mailbox, set, FetchType.Metadata, -1);
+        Iterator<MailboxMessage<InMemoryId>> it = findInMailbox(mailbox, set, FetchType.Metadata, -1);
         while (it.hasNext()) {
-            Message<InMemoryId> member = it.next();
+            MailboxMessage<InMemoryId> member = it.next();
             if (member.isDeleted()) {
                 filteredResult.put(member.getUid(), new SimpleMessageMetaData(member));
 
@@ -195,10 +195,10 @@ public class InMemoryMessageMapper exten
      * (non-Javadoc)
      * 
      * @see org.apache.james.mailbox.store.mail.MessageMapper#move(org.apache.james.mailbox.store.mail.model.Mailbox,
-     *      org.apache.james.mailbox.store.mail.model.Message)
+     *      MailboxMessage)
      */
     @Override
-    public MessageMetaData move(Mailbox<InMemoryId> mailbox, Message<InMemoryId> original) throws MailboxException {
+    public MessageMetaData move(Mailbox<InMemoryId> mailbox, MailboxMessage<InMemoryId> original) throws MailboxException {
         throw new UnsupportedOperationException("Not implemented - see https://issues.apache.org/jira/browse/IMAP-370");
     }
 
@@ -211,11 +211,11 @@ public class InMemoryMessageMapper exten
 
     /**
      * @see org.apache.james.mailbox.store.mail.AbstractMessageMapper#copy(org.apache.james.mailbox.store.mail.model.Mailbox,
-     *      long, long, org.apache.james.mailbox.store.mail.model.Message)
+     *      long, long, MailboxMessage)
      */
-    protected MessageMetaData copy(Mailbox<InMemoryId> mailbox, long uid, long modSeq, Message<InMemoryId> original)
+    protected MessageMetaData copy(Mailbox<InMemoryId> mailbox, long uid, long modSeq, MailboxMessage<InMemoryId> original)
             throws MailboxException {
-        SimpleMessage<InMemoryId> message = SimpleMessage.copy(mailbox.getMailboxId(), original);
+        SimpleMailboxMessage<InMemoryId> message = SimpleMailboxMessage.copy(mailbox.getMailboxId(), original);
         message.setUid(uid);
         message.setModSeq(modSeq);
         Flags flags = original.createFlags();
@@ -228,10 +228,10 @@ public class InMemoryMessageMapper exten
 
     /**
      * @see org.apache.james.mailbox.store.mail.AbstractMessageMapper#save(org.apache.james.mailbox.store.mail.model.Mailbox,
-     *      org.apache.james.mailbox.store.mail.model.Message)
+     *      MailboxMessage)
      */
-    protected MessageMetaData save(Mailbox<InMemoryId> mailbox, Message<InMemoryId> message) throws MailboxException {
-        SimpleMessage<InMemoryId> copy = SimpleMessage.copy(mailbox.getMailboxId(), message);
+    protected MessageMetaData save(Mailbox<InMemoryId> mailbox, MailboxMessage<InMemoryId> message) throws MailboxException {
+        SimpleMailboxMessage<InMemoryId> copy = SimpleMailboxMessage.copy(mailbox.getMailboxId(), message);
         copy.setUid(message.getUid());
         copy.setModSeq(message.getModSeq());
         getMembershipByUidForMailbox(mailbox).put(message.getUid(), copy);

Copied: james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryQuotaMailboxMessageManagerTest.java (from r1724224, james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryQuotaMessageManagerTest.java)
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryQuotaMailboxMessageManagerTest.java?p2=james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryQuotaMailboxMessageManagerTest.java&p1=james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryQuotaMessageManagerTest.java&r1=1724224&r2=1724225&rev=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryQuotaMessageManagerTest.java (original)
+++ james/project/trunk/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryQuotaMailboxMessageManagerTest.java Tue Jan 12 13:17:03 2016
@@ -22,12 +22,12 @@ import org.apache.james.mailbox.manager.
 import org.apache.james.mailbox.manager.QuotaMessageManagerTest;
 
 /**
- * Test for quota support upon basic Message manager operation.
+ * Test for quota support upon basic MailboxMessage manager operation.
  *
  * Tests are performed with sufficient rights to ensure all underlying functions behave well.
  * Quota are adjusted and we check that exceptions are well thrown.
  */
-public class InMemoryQuotaMessageManagerTest extends QuotaMessageManagerTest {
+public class InMemoryQuotaMailboxMessageManagerTest extends QuotaMessageManagerTest {
 
     @Override
     protected ManagerTestResources createResources() throws Exception {

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/LazyMimeDescriptor.java Tue Jan 12 13:17:03 2016
@@ -30,7 +30,7 @@ import org.apache.james.mailbox.exceptio
 import org.apache.james.mailbox.model.MessageResult;
 import org.apache.james.mailbox.model.MimeDescriptor;
 import org.apache.james.mailbox.model.MessageResult.Header;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.mail.model.impl.PropertyBuilder;
 
 /**
@@ -41,11 +41,11 @@ import org.apache.james.mailbox.store.ma
  */
 public class LazyMimeDescriptor implements MimeDescriptor{
 
-    private final Message<?> message;
+    private final MailboxMessage<?> message;
     private final MessageResult result;
     private PropertyBuilder pbuilder;
     
-    public LazyMimeDescriptor(final MessageResult result, final Message<?> message) {
+    public LazyMimeDescriptor(final MessageResult result, final MailboxMessage<?> message) {
         this.message = message;
         this.result = result;
     }

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/MessageResultImpl.java Tue Jan 12 13:17:03 2016
@@ -34,7 +34,7 @@ import org.apache.james.mailbox.model.Co
 import org.apache.james.mailbox.model.Headers;
 import org.apache.james.mailbox.model.MessageResult;
 import org.apache.james.mailbox.model.MimeDescriptor;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.streaming.InputStreamContent;
 import org.apache.james.mailbox.store.streaming.InputStreamContent.Type;
 import org.apache.james.mime4j.MimeException;
@@ -48,14 +48,14 @@ public class MessageResultImpl implement
 
     private MimeDescriptor mimeDescriptor;
 
-	private final Message<?> message;
+	private final MailboxMessage<?> message;
 
     private HeadersImpl headers;
     private Content fullContent;
     private Content bodyContent;
 
     
-    public MessageResultImpl(Message<?> message) throws IOException {
+    public MessageResultImpl(MailboxMessage<?> message) throws IOException {
         this.message = message;
         this.headers = new HeadersImpl(message);
         
@@ -373,10 +373,10 @@ public class MessageResultImpl implement
     
     private final class HeadersImpl implements Headers {
 
-        private Message<?> msg;
+        private MailboxMessage<?> msg;
         private List<Header> headers;
         
-        public HeadersImpl(Message<?> msg) {
+        public HeadersImpl(MailboxMessage<?> msg) {
             this.msg = msg;
         }
 

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/ResultUtils.java Tue Jan 12 13:17:03 2016
@@ -31,7 +31,7 @@ import org.apache.james.mailbox.model.Co
 import org.apache.james.mailbox.model.MessageResult;
 import org.apache.james.mailbox.model.MessageResult.FetchGroup;
 import org.apache.james.mailbox.model.MessageResult.MimePath;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.streaming.PartContentBuilder;
 import org.apache.james.mime4j.MimeException;
 import org.apache.james.mime4j.parser.AbstractContentHandler;
@@ -53,7 +53,7 @@ public class ResultUtils {
 
     static final Charset US_ASCII = Charset.forName("US-ASCII");
 
-    public static List<MessageResult.Header> createHeaders(final Message<?> document) throws IOException {
+    public static List<MessageResult.Header> createHeaders(final MailboxMessage<?> document) throws IOException {
         final List<MessageResult.Header> results = new ArrayList<MessageResult.Header>();
         MimeConfig config = MimeConfig.custom().setMaxLineLen(-1).setMaxHeaderLen(-1).build();
         final MimeStreamParser parser = new MimeStreamParser(config);
@@ -99,14 +99,14 @@ public class ResultUtils {
   
     
     /**
-     * Return the {@link MessageResult} for the given {@link Message} and {@link FetchGroup}
+     * Return the {@link MessageResult} for the given {@link MailboxMessage} and {@link FetchGroup}
      * 
      * @param message
      * @param fetchGroup
      * @return result
      * @throws MailboxException
      */
-    public static MessageResult loadMessageResult(final Message<?> message, final FetchGroup fetchGroup) throws MailboxException {
+    public static MessageResult loadMessageResult(final MailboxMessage<?> message, final FetchGroup fetchGroup) throws MailboxException {
         try {
 
             MessageResultImpl messageResult = new MessageResultImpl(message);
@@ -142,7 +142,7 @@ public class ResultUtils {
     }
 
     private static void addPartContent(final FetchGroup fetchGroup,
-            Message<?> message, MessageResultImpl messageResult)
+                                       MailboxMessage<?> message, MessageResultImpl messageResult)
             throws MailboxException, IOException,
             MimeException {
         Collection<FetchGroup.PartContentDescriptor> partContent = fetchGroup.getPartContentDescriptors();
@@ -154,7 +154,7 @@ public class ResultUtils {
     }
 
     private static void addPartContent(
-            FetchGroup.PartContentDescriptor descriptor, Message<?> message,
+            FetchGroup.PartContentDescriptor descriptor, MailboxMessage<?> message,
             MessageResultImpl messageResult) throws 
             MailboxException, IOException, MimeException {
         final MimePath mimePath = descriptor.path();
@@ -176,7 +176,7 @@ public class ResultUtils {
         }
     }
 
-    private static PartContentBuilder build(int[] path, final Message<?> message)
+    private static PartContentBuilder build(int[] path, final MailboxMessage<?> message)
             throws IOException, MimeException {
         final InputStream stream = message.getFullContent();
         PartContentBuilder result = new PartContentBuilder();
@@ -206,7 +206,7 @@ public class ResultUtils {
         return result;
     }
 
-    private static void addHeaders(Message<?> message,
+    private static void addHeaders(MailboxMessage<?> message,
             MessageResultImpl messageResult, MimePath mimePath)
             throws IOException, MimeException {
         final int[] path = path(mimePath);
@@ -218,7 +218,7 @@ public class ResultUtils {
         }
     }
 
-    private static void addMimeHeaders(Message<?> message,
+    private static void addMimeHeaders(MailboxMessage<?> message,
             MessageResultImpl messageResult, MimePath mimePath)
             throws IOException, MimeException {
         final int[] path = path(mimePath);
@@ -229,7 +229,7 @@ public class ResultUtils {
         }
     }
 
-    private static void addBodyContent(Message<?> message,
+    private static void addBodyContent(MailboxMessage<?> message,
             MessageResultImpl messageResult, MimePath mimePath) throws IOException, MimeException {
         final int[] path = path(mimePath);
         if (path != null) {
@@ -239,7 +239,7 @@ public class ResultUtils {
         }
     }
 
-    private static void addMimeBodyContent(Message<?> message,
+    private static void addMimeBodyContent(MailboxMessage<?> message,
             MessageResultImpl messageResult, MimePath mimePath)
             throws IOException, MimeException {
         final int[] path = path(mimePath);
@@ -248,7 +248,7 @@ public class ResultUtils {
         messageResult.setMimeBodyContent(mimePath, content);
     }
 
-    private static void addFullContent(Message<?> message,
+    private static void addFullContent(MailboxMessage<?> message,
             MessageResultImpl messageResult, MimePath mimePath)
             throws MailboxException, IOException,
             MimeException {

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMessageMetaData.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMessageMetaData.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMessageMetaData.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/SimpleMessageMetaData.java Tue Jan 12 13:17:03 2016
@@ -24,7 +24,7 @@ import java.util.Date;
 import javax.mail.Flags;
 
 import org.apache.james.mailbox.model.MessageMetaData;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 
 
 public class SimpleMessageMetaData implements MessageMetaData{
@@ -42,7 +42,7 @@ public class SimpleMessageMetaData imple
         this.internalDate = internalDate;
     }
     
-    public SimpleMessageMetaData(Message<?> message) {
+    public SimpleMessageMetaData(MailboxMessage<?> message) {
         this(message.getUid(), message.getModSeq(), message.createFlags(), message.getFullContentOctets(), message.getInternalDate());
     }
     

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java Tue Jan 12 13:17:03 2016
@@ -66,9 +66,9 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.mail.MessageMapperFactory;
 import org.apache.james.mailbox.store.mail.model.MailboxId;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.mail.model.impl.PropertyBuilder;
-import org.apache.james.mailbox.store.mail.model.impl.SimpleMessage;
+import org.apache.james.mailbox.store.mail.model.impl.SimpleMailboxMessage;
 import org.apache.james.mailbox.store.quota.QuotaChecker;
 import org.apache.james.mailbox.store.search.MessageSearchIndex;
 import org.apache.james.mailbox.store.streaming.BodyOffsetInputStream;
@@ -371,7 +371,7 @@ public class StoreMessageManager<Id exte
             contentIn = new SharedFileInputStream(file);
             final int size = (int) file.length();
 
-            final Message<Id> message = createMessage(internalDate, size, bodyStartOctet, contentIn, flags, propertyBuilder);
+            final MailboxMessage<Id> message = createMessage(internalDate, size, bodyStartOctet, contentIn, flags, propertyBuilder);
 
             new QuotaChecker<Id>(quotaManager, quotaRootResolver, mailbox).tryAddition(1, size);
 
@@ -411,7 +411,7 @@ public class StoreMessageManager<Id exte
     }
 
     /**
-     * Create a new {@link Message} for the given data
+     * Create a new {@link MailboxMessage} for the given data
      * 
      * @param internalDate
      * @param size
@@ -421,8 +421,8 @@ public class StoreMessageManager<Id exte
      * @return membership
      * @throws MailboxException
      */
-    protected Message<Id> createMessage(Date internalDate, final int size, int bodyStartOctet, final SharedInputStream content, final Flags flags, final PropertyBuilder propertyBuilder) throws MailboxException {
-        return new SimpleMessage<Id>(internalDate, size, bodyStartOctet, content, flags, propertyBuilder, getMailboxEntity().getMailboxId());
+    protected MailboxMessage<Id> createMessage(Date internalDate, final int size, int bodyStartOctet, final SharedInputStream content, final Flags flags, final PropertyBuilder propertyBuilder) throws MailboxException {
+        return new SimpleMailboxMessage<Id>(internalDate, size, bodyStartOctet, content, flags, propertyBuilder, getMailboxEntity().getMailboxId());
     }
 
     /**
@@ -611,7 +611,7 @@ public class StoreMessageManager<Id exte
         }, true);
     }
 
-    protected MessageMetaData appendMessageToStore(final Message<Id> message, MailboxSession session) throws MailboxException {
+    protected MessageMetaData appendMessageToStore(final MailboxMessage<Id> message, MailboxSession session) throws MailboxException {
         final MessageMapper<Id> mapper = mapperFactory.getMessageMapper(session);
         return mapperFactory.getMessageMapper(session).execute(new Mapper.Transaction<MessageMetaData>() {
 
@@ -698,13 +698,13 @@ public class StoreMessageManager<Id exte
         return index.search(mailboxSession, getMailboxEntity(), query);
     }
 
-    private Iterator<MessageMetaData> copy(final Iterator<Message<Id>> originalRows, final MailboxSession session) throws MailboxException {
+    private Iterator<MessageMetaData> copy(final Iterator<MailboxMessage<Id>> originalRows, final MailboxSession session) throws MailboxException {
         final List<MessageMetaData> copiedRows = new ArrayList<MessageMetaData>();
         final MessageMapper<Id> messageMapper = mapperFactory.getMessageMapper(session);
         QuotaChecker<Id> quotaChecker = new QuotaChecker<Id>(quotaManager, quotaRootResolver, mailbox);
 
         while (originalRows.hasNext()) {
-            final Message<Id> originalMessage = originalRows.next();
+            final MailboxMessage<Id> originalMessage = originalRows.next();
             quotaChecker.tryAddition(1, originalMessage.getFullContentOctets());
             MessageMetaData data = messageMapper.execute(new Mapper.Transaction<MessageMetaData>() {
                 public MessageMetaData run() throws MailboxException {
@@ -718,13 +718,13 @@ public class StoreMessageManager<Id exte
         return copiedRows.iterator();
     }
 
-    private Iterator<MessageMetaData> move(Iterator<Message<Id>> originalRows,
+    private Iterator<MessageMetaData> move(Iterator<MailboxMessage<Id>> originalRows,
 			MailboxSession session) throws MailboxException {
         final List<MessageMetaData> movedRows = new ArrayList<MessageMetaData>();
         final MessageMapper<Id> messageMapper = mapperFactory.getMessageMapper(session);
 
         while (originalRows.hasNext()) {
-            final Message<Id> originalMessage = originalRows.next();
+            final MailboxMessage<Id> originalMessage = originalRows.next();
             MessageMetaData data = messageMapper.execute(new Mapper.Transaction<MessageMetaData>() {
                 public MessageMetaData run() throws MailboxException {
                     return messageMapper.move(getMailboxEntity(), originalMessage);
@@ -747,7 +747,7 @@ public class StoreMessageManager<Id exte
         MessageMapper<Id> messageMapper = mapperFactory.getMessageMapper(session);
 
         final SortedMap<Long, MessageMetaData> copiedMessages = new TreeMap<Long, MessageMetaData>();
-        Iterator<Message<Id>> originalRows = messageMapper.findInMailbox(mailbox, set, FetchType.Full, -1);
+        Iterator<MailboxMessage<Id>> originalRows = messageMapper.findInMailbox(mailbox, set, FetchType.Full, -1);
         Iterator<MessageMetaData> ids = to.copy(originalRows, session);
         while (ids.hasNext()) {
             MessageMetaData data = ids.next();
@@ -762,7 +762,7 @@ public class StoreMessageManager<Id exte
         MessageMapper<Id> messageMapper = mapperFactory.getMessageMapper(session);
 
         final SortedMap<Long, MessageMetaData> movedMessages = new TreeMap<Long, MessageMetaData>();
-        Iterator<Message<Id>> originalRows = messageMapper.findInMailbox(mailbox, set, FetchType.Full, -1);
+        Iterator<MailboxMessage<Id>> originalRows = messageMapper.findInMailbox(mailbox, set, FetchType.Full, -1);
         Iterator<MessageMetaData> ids = to.move(originalRows, session);
         while (ids.hasNext()) {
             MessageMetaData data = ids.next();

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java Tue Jan 12 13:17:03 2016
@@ -37,11 +37,11 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.mail.MessageMapper.FetchType;
 import org.apache.james.mailbox.store.mail.model.MailboxId;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 
 public class StoreMessageResultIterator<Id extends MailboxId> implements MessageResultIterator {
 
-    private Iterator<Message<Id>> next = null;
+    private Iterator<MailboxMessage<Id>> next = null;
     private MailboxException exception;
     private Mailbox<Id> mailbox;
     private FetchGroup group;
@@ -154,7 +154,7 @@ public class StoreMessageResultIterator<
           throw new NoSuchElementException();
         }
         
-        final Message<Id> message = next.next();
+        final MailboxMessage<Id> message = next.next();
         MessageResult result;
         try {
             result = ResultUtils.loadMessageResult(message, group);
@@ -190,7 +190,7 @@ public class StoreMessageResultIterator<
 
         private long modSeq = -1;
 
-        public UnloadedMessageResult(final Message<Id> message, final MailboxException exception) {
+        public UnloadedMessageResult(final MailboxMessage<Id> message, final MailboxException exception) {
             super();
             internalDate = message.getInternalDate();
             size = message.getFullContentOctets();

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/MessagePackEventSerializer.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/MessagePackEventSerializer.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/MessagePackEventSerializer.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/json/MessagePackEventSerializer.java Tue Jan 12 13:17:03 2016
@@ -25,7 +25,7 @@ import org.apache.james.mailbox.store.ma
 import org.msgpack.jackson.dataformat.MessagePackFactory;
 
 /**
- * Message Pack ( http://msgpack.org/ ) Event Serializer
+ * MailboxMessage Pack ( http://msgpack.org/ ) Event Serializer
  */
 public class MessagePackEventSerializer<Id extends MailboxId> extends JacksonEventSerializer<Id> {
 

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/AbstractMessageMapper.java Tue Jan 12 13:17:03 2016
@@ -32,7 +32,7 @@ import org.apache.james.mailbox.model.Up
 import org.apache.james.mailbox.store.FlagsUpdateCalculator;
 import org.apache.james.mailbox.store.mail.model.MailboxId;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.transaction.TransactionalMapper;
 
 /**
@@ -71,7 +71,7 @@ public abstract class AbstractMessageMap
      */
     public Iterator<UpdatedFlags> updateFlags(final Mailbox<Id> mailbox, final FlagsUpdateCalculator flagsUpdateCalculator, final MessageRange set) throws MailboxException {
         final List<UpdatedFlags> updatedFlags = new ArrayList<UpdatedFlags>();
-        Iterator<Message<Id>> messages = findInMailbox(mailbox, set, FetchType.Metadata, -1);
+        Iterator<MailboxMessage<Id>> messages = findInMailbox(mailbox, set, FetchType.Metadata, -1);
         
         long modSeq = -1;
         if (messages.hasNext()) {
@@ -81,7 +81,7 @@ public abstract class AbstractMessageMap
             }
         }
         while(messages.hasNext()) {
-        	final Message<Id> member = messages.next();
+        	final MailboxMessage<Id> member = messages.next();
             Flags originalFlags = member.createFlags();
             member.setFlags(flagsUpdateCalculator.buildNewFlags(originalFlags));
             Flags newFlags = member.createFlags();
@@ -103,9 +103,9 @@ public abstract class AbstractMessageMap
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.MessageMapper#add(org.apache.james.mailbox.store.mail.model.Mailbox, org.apache.james.mailbox.store.mail.model.Message)
+     * @see org.apache.james.mailbox.store.mail.MessageMapper#add(org.apache.james.mailbox.store.mail.model.Mailbox, MailboxMessage)
      */
-    public MessageMetaData add(final Mailbox<Id> mailbox, Message<Id> message) throws MailboxException {
+    public MessageMetaData add(final Mailbox<Id> mailbox, MailboxMessage<Id> message) throws MailboxException {
         message.setUid(uidProvider.nextUid(mailboxSession, mailbox));
         
         // if a mailbox does not support mod-sequences the provider may be null
@@ -120,9 +120,9 @@ public abstract class AbstractMessageMap
 
     
     /**
-     * @see org.apache.james.mailbox.store.mail.MessageMapper#copy(org.apache.james.mailbox.store.mail.model.Mailbox, org.apache.james.mailbox.store.mail.model.Message)
+     * @see org.apache.james.mailbox.store.mail.MessageMapper#copy(org.apache.james.mailbox.store.mail.model.Mailbox, MailboxMessage)
      */
-    public MessageMetaData copy(final Mailbox<Id> mailbox, final Message<Id> original) throws MailboxException {
+    public MessageMetaData copy(final Mailbox<Id> mailbox, final MailboxMessage<Id> original) throws MailboxException {
         long uid = uidProvider.nextUid(mailboxSession, mailbox);
         long modSeq = -1;
         if (modSeqProvider != null) {
@@ -137,18 +137,18 @@ public abstract class AbstractMessageMap
     
     
     /**
-     * Save the {@link Message} for the given {@link Mailbox} and return the {@link MessageMetaData} 
+     * Save the {@link MailboxMessage} for the given {@link Mailbox} and return the {@link MessageMetaData}
      * 
      * @param mailbox
      * @param message
      * @return metaData
      * @throws MailboxException
      */
-    protected abstract MessageMetaData save(Mailbox<Id> mailbox, Message<Id> message) throws MailboxException;
+    protected abstract MessageMetaData save(Mailbox<Id> mailbox, MailboxMessage<Id> message) throws MailboxException;
 
     
     /**
-     * Copy the Message to the Mailbox, using the given uid and modSeq for the new Message
+     * Copy the MailboxMessage to the Mailbox, using the given uid and modSeq for the new MailboxMessage
      * 
      * @param mailbox
      * @param uid
@@ -157,6 +157,6 @@ public abstract class AbstractMessageMap
      * @return metaData
      * @throws MailboxException
      */
-    protected abstract MessageMetaData copy(Mailbox<Id> mailbox, long uid, long modSeq, Message<Id> original) throws MailboxException;
+    protected abstract MessageMetaData copy(Mailbox<Id> mailbox, long uid, long modSeq, MailboxMessage<Id> original) throws MailboxException;
     
 }

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java Tue Jan 12 13:17:03 2016
@@ -29,28 +29,28 @@ import org.apache.james.mailbox.model.Up
 import org.apache.james.mailbox.store.FlagsUpdateCalculator;
 import org.apache.james.mailbox.store.mail.model.MailboxId;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.mail.model.Property;
 import org.apache.james.mailbox.store.transaction.Mapper;
 
 /**
- * Maps {@link Message} in a {@link org.apache.james.mailbox.MessageManager}. A {@link MessageMapper} has a lifecycle from the start of a request 
+ * Maps {@link MailboxMessage} in a {@link org.apache.james.mailbox.MessageManager}. A {@link MessageMapper} has a lifecycle from the start of a request
  * to the end of the request.
  */
 public interface MessageMapper<Id extends MailboxId> extends Mapper {
 
     /**
      * Return a {@link Iterator} which holds the messages for the given criterias
-     * The list must be ordered by the {@link Message} uid
+     * The list must be ordered by the {@link MailboxMessage} uid
      * 
      * @param mailbox The mailbox to search
      * @param set message range for batch processing
      * @param type
-     * @param limit the maximal limit of returned {@link Message}'s. Use -1 to set no limit. In any case the caller MUST not expect the limit to get applied in all cases as the implementation
+     * @param limit the maximal limit of returned {@link MailboxMessage}'s. Use -1 to set no limit. In any case the caller MUST not expect the limit to get applied in all cases as the implementation
      *              MAY just ignore it
      * @throws MailboxException
      */
-    Iterator<Message<Id>> findInMailbox(Mailbox<Id> mailbox, MessageRange set, FetchType type, int limit)
+    Iterator<MailboxMessage<Id>> findInMailbox(Mailbox<Id> mailbox, MessageRange set, FetchType type, int limit)
             throws MailboxException;
 
     /**
@@ -87,13 +87,13 @@ public interface MessageMapper<Id extend
 
 
     /**
-     * Delete the given {@link Message}
+     * Delete the given {@link MailboxMessage}
      * 
      * @param mailbox
      * @param message
      * @throws StorageException
      */
-    void delete(Mailbox<Id> mailbox, Message<Id> message) throws MailboxException;
+    void delete(Mailbox<Id> mailbox, MailboxMessage<Id> message) throws MailboxException;
 
     /**
      * Return the uid of the first unseen message. If non can be found null will get returned
@@ -106,8 +106,8 @@ public interface MessageMapper<Id extend
     Long findFirstUnseenMessageUid(Mailbox<Id> mailbox) throws MailboxException;
 
     /**
-     * Return a List of {@link Message} which are recent.
-     * The list must be ordered by the {@link Message} uid. 
+     * Return a List of {@link MailboxMessage} which are recent.
+     * The list must be ordered by the {@link MailboxMessage} uid.
      * 
      * @param mailbox
      * @return recentList
@@ -117,7 +117,7 @@ public interface MessageMapper<Id extend
 
 
     /**
-     * Add the given {@link Message} to the underlying storage. Be aware that implementation may choose to replace the uid of the given message while storing.
+     * Add the given {@link MailboxMessage} to the underlying storage. Be aware that implementation may choose to replace the uid of the given message while storing.
      * So you should only depend on the returned uid.
      * 
      * 
@@ -126,7 +126,7 @@ public interface MessageMapper<Id extend
      * @return uid
      * @throws StorageException
      */
-    MessageMetaData add(Mailbox<Id> mailbox, Message<Id> message) throws MailboxException;
+    MessageMetaData add(Mailbox<Id> mailbox, MailboxMessage<Id> message) throws MailboxException;
     
     /**
      * Update flags for the given {@link MessageRange}. Only the flags may be modified after a message was saved to a mailbox.
@@ -141,28 +141,28 @@ public interface MessageMapper<Id extend
             final MessageRange set) throws MailboxException;
     
     /**
-     * Copy the given {@link Message} to a new mailbox and return the uid of the copy. Be aware that the given uid is just a suggestion for the uid of the copied
+     * Copy the given {@link MailboxMessage} to a new mailbox and return the uid of the copy. Be aware that the given uid is just a suggestion for the uid of the copied
      * message. Implementation may choose to use a different one, so only depend on the returned uid!
      * 
      * @param mailbox the Mailbox to copy to
      * @param original the original to copy
      * @throws StorageException
      */
-    MessageMetaData copy(Mailbox<Id> mailbox,Message<Id> original) throws MailboxException;
+    MessageMetaData copy(Mailbox<Id> mailbox,MailboxMessage<Id> original) throws MailboxException;
     
     /**
-     * Move the given {@link Message} to a new mailbox and return the uid of the moved. Be aware that the given uid is just a suggestion for the uid of the moved
+     * Move the given {@link MailboxMessage} to a new mailbox and return the uid of the moved. Be aware that the given uid is just a suggestion for the uid of the moved
      * message. Implementation may choose to use a different one, so only depend on the returned uid!
      * 
      * @param mailbox the Mailbox to move to
      * @param original the original to move
      * @throws StorageException
      */
-    MessageMetaData move(Mailbox<Id> mailbox,Message<Id> original) throws MailboxException;
+    MessageMetaData move(Mailbox<Id> mailbox,MailboxMessage<Id> original) throws MailboxException;
     
     
     /**
-     * Return the last uid which were used for storing a Message in the {@link Mailbox}
+     * Return the last uid which were used for storing a MailboxMessage in the {@link Mailbox}
      * 
      * @param mailbox
      * @return lastUid
@@ -172,7 +172,7 @@ public interface MessageMapper<Id extend
     
     
     /**
-     * Return the higest mod-sequence which were used for storing a Message in the {@link Mailbox}
+     * Return the higest mod-sequence which were used for storing a MailboxMessage in the {@link Mailbox}
      * 
      * @param mailbox
      * @return lastUid
@@ -181,48 +181,48 @@ public interface MessageMapper<Id extend
     long getHighestModSeq(Mailbox<Id> mailbox) throws MailboxException;
     
     /**
-     * Specify what data needs to get filled in a {@link Message} before returning it
+     * Specify what data needs to get filled in a {@link MailboxMessage} before returning it
      * 
      *
      */
     public static enum FetchType {
 
         /**
-         * Fetch only the meta data of the {@link Message} which includes:
+         * Fetch only the meta data of the {@link MailboxMessage} which includes:
          * <p>
-         *  {@link Message#getUid()}
-         *  {@link Message#getModSeq()}
-         *  {@link Message#getBodyOctets()}
-         *  {@link Message#getFullContentOctets()}
-         *  {@link Message#getInternalDate()}
-         *  {@link Message#getMailboxId()}
-         *  {@link Message#getMediaType()}
-         *  {@link Message#getModSeq()}
-         *  {@link Message#getSubType()}
-         *  {@link Message#getTextualLineCount()}
+         *  {@link MailboxMessage#getUid()}
+         *  {@link MailboxMessage#getModSeq()}
+         *  {@link MailboxMessage#getBodyOctets()}
+         *  {@link MailboxMessage#getFullContentOctets()}
+         *  {@link MailboxMessage#getInternalDate()}
+         *  {@link MailboxMessage#getMailboxId()}
+         *  {@link MailboxMessage#getMediaType()}
+         *  {@link MailboxMessage#getModSeq()}
+         *  {@link MailboxMessage#getSubType()}
+         *  {@link MailboxMessage#getTextualLineCount()}
          * </p>
          */
         Metadata,
         /**
-         * Fetch the {@link #Metadata}, {@link Property}'s and the {@link #Headers}'s for the {@link Message}. This includes:
+         * Fetch the {@link #Metadata}, {@link Property}'s and the {@link #Headers}'s for the {@link MailboxMessage}. This includes:
          * 
          * <p>
-         * {@link Message#getProperties()}
-         * {@link Message#getHeaderContent()}
+         * {@link MailboxMessage#getProperties()}
+         * {@link MailboxMessage#getHeaderContent()}
          * </p>
          */
         Headers,
         /**
-         * Fetch the {@link #Metadata} and the Body for the {@link Message}. This includes:
+         * Fetch the {@link #Metadata} and the Body for the {@link MailboxMessage}. This includes:
          * 
          * <p>
-         *  {@link Message#getBodyContent()}
+         *  {@link MailboxMessage#getBodyContent()}
          * </p>
          */
         Body,
         
         /**
-         * Fetch the complete {@link Message}
+         * Fetch the complete {@link MailboxMessage}
          * 
          */
         Full

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/UidProvider.java Tue Jan 12 13:17:03 2016
@@ -33,7 +33,7 @@ import org.apache.james.mailbox.store.ma
 public interface UidProvider<Id extends MailboxId> {
 
     /**
-     * Return the next uid which can be used while append a Message to the {@link Mailbox}.
+     * Return the next uid which can be used while append a MailboxMessage to the {@link Mailbox}.
      * Its important that the returned uid is higher then the last used and that the next call of this method does return a higher
      * one
      * 
@@ -45,7 +45,7 @@ public interface UidProvider<Id extends
     public long nextUid(MailboxSession session, Mailbox<Id> mailbox) throws MailboxException;
     
     /**
-     * Return the last uid which were used for storing a Message in the {@link Mailbox}
+     * Return the last uid which were used for storing a MailboxMessage in the {@link Mailbox}
      * 
      * @param session
      * @param mailbox

Copied: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/AbstractMailboxMessage.java (from r1724224, james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/AbstractMessage.java)
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/AbstractMailboxMessage.java?p2=james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/AbstractMailboxMessage.java&p1=james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/AbstractMessage.java&r1=1724224&r2=1724225&rev=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/AbstractMessage.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/AbstractMailboxMessage.java Tue Jan 12 13:17:03 2016
@@ -27,23 +27,23 @@ import javax.mail.Flags;
 
 
 /**
- * Abstract base class for {@link Message}
+ * Abstract base class for {@link MailboxMessage}
  *
  */
-public abstract class AbstractMessage<Id extends MailboxId> implements Message<Id> {
+public abstract class AbstractMailboxMessage<Id extends MailboxId> implements MailboxMessage<Id> {
     
 
     /**
      * @see java.lang.Comparable#compareTo(java.lang.Object)
      */
-    public int compareTo(Message<Id> other) {
+    public int compareTo(MailboxMessage<Id> other) {
         return (int) (getUid() - other.getUid());
     }
     
     
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#createFlags()
+     * @see MailboxMessage#createFlags()
      */
     public final Flags createFlags() {
         final Flags flags = new Flags();

Copied: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java (from r1724224, james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/Message.java)
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java?p2=james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java&p1=james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/Message.java&r1=1724224&r2=1724225&rev=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/Message.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/MailboxMessage.java Tue Jan 12 13:17:03 2016
@@ -30,7 +30,7 @@ import javax.mail.Flags;
  * plus body content. In the case of multipart documents, this body content
  * has internal structure described by the meta-data.
  */
-public interface Message<Id extends MailboxId> extends Comparable<Message<Id>>{
+public interface MailboxMessage<Id extends MailboxId> extends Comparable<MailboxMessage<Id>>{
 
     MessageId getMessageId();
     
@@ -190,7 +190,7 @@ public interface Message<Id extends Mail
     InputStream getHeaderContent() throws IOException;
     
     /**
-     *Returns the full raw content of the Message via an {@link InputStream}.
+     *Returns the full raw content of the MailboxMessage via an {@link InputStream}.
      *
      * Be aware that this method need to return a new fresh {@link InputStream}
      * on every call

Copied: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMailboxMessage.java (from r1724224, james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMessage.java)
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMailboxMessage.java?p2=james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMailboxMessage.java&p1=james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMessage.java&r1=1724224&r2=1724225&rev=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMessage.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMailboxMessage.java Tue Jan 12 13:17:03 2016
@@ -30,26 +30,27 @@ import javax.mail.util.SharedByteArrayIn
 
 import org.apache.commons.io.IOUtils;
 import org.apache.james.mailbox.exception.MailboxException;
-import org.apache.james.mailbox.store.mail.model.AbstractMessage;
+import org.apache.james.mailbox.store.mail.model.AbstractMailboxMessage;
 import org.apache.james.mailbox.store.mail.model.MailboxId;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.mail.model.Property;
 
 import com.google.common.primitives.Ints;
 
-public class SimpleMessage<Id extends MailboxId> extends AbstractMessage<Id> {
 
-    public static <Id extends MailboxId> SimpleMessage<Id> copy(Id mailboxId, Message<Id> original) throws MailboxException {
+public class SimpleMailboxMessage<Id extends MailboxId> extends AbstractMailboxMessage<Id> {
+
+    public static <Id extends MailboxId> SimpleMailboxMessage<Id> copy(Id mailboxId, MailboxMessage<Id> original) throws MailboxException {
         Date internalDate = original.getInternalDate();
         long size = original.getFullContentOctets();
         Flags flags = original.createFlags();
         SharedByteArrayInputStream content = copyFullContent(original);
         int bodyStartOctet = Ints.checkedCast(original.getFullContentOctets() - original.getBodyOctets());
         PropertyBuilder pBuilder = new PropertyBuilder(original.getProperties());
-        return new SimpleMessage<Id>(internalDate, size, bodyStartOctet, content, flags, pBuilder, mailboxId);
+        return new SimpleMailboxMessage<Id>(internalDate, size, bodyStartOctet, content, flags, pBuilder, mailboxId);
     }
 
-    private static <Id extends MailboxId> SharedByteArrayInputStream copyFullContent(Message<Id> original) throws MailboxException {
+    private static <Id extends MailboxId> SharedByteArrayInputStream copyFullContent(MailboxMessage<Id> original) throws MailboxException {
         try {
             return new SharedByteArrayInputStream(IOUtils.toByteArray(original.getFullContent()));
         } catch (IOException e) {
@@ -76,9 +77,9 @@ public class SimpleMessage<Id extends Ma
     private long modSeq;
     private SharedInputStream content;
 
-    public SimpleMessage(Date internalDate, long size, int bodyStartOctet,
-            SharedInputStream content, Flags flags,
-            PropertyBuilder propertyBuilder, final Id mailboxId) {
+    public SimpleMailboxMessage(Date internalDate, long size, int bodyStartOctet,
+                                SharedInputStream content, Flags flags,
+                                PropertyBuilder propertyBuilder, final Id mailboxId) {
         this.content = content;
 
         this.size = size;
@@ -185,7 +186,7 @@ public class SimpleMessage<Id extends Ma
             return false;
         if (getClass() != obj.getClass())
             return false;
-        final SimpleMessage<Id> other = (SimpleMessage<Id>) obj;
+        final SimpleMailboxMessage<Id> other = (SimpleMailboxMessage<Id>) obj;
         if (uid != other.uid)
             return false;
         return true;
@@ -213,21 +214,21 @@ public class SimpleMessage<Id extends Ma
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#getModSeq()
+     * @see MailboxMessage#getModSeq()
      */
     public long getModSeq() {
         return modSeq;
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#setModSeq(long)
+     * @see MailboxMessage#setModSeq(long)
      */
     public void setModSeq(long modSeq) {
         this.modSeq = modSeq;
     }
 
     /**
-     * @see org.apache.james.mailbox.store.mail.model.Message#setUid(long)
+     * @see MailboxMessage#setUid(long)
      */
     public void setUid(long uid) {
         this.uid = uid;

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java Tue Jan 12 13:17:03 2016
@@ -33,7 +33,7 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.mail.MessageMapper;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.store.mail.model.MailboxId;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 
 import javax.inject.Inject;
 import javax.inject.Singleton;
@@ -59,7 +59,7 @@ public class CurrentQuotaCalculator<Id e
         long messagesSizes = 0;
         long messageCount = 0;
         for (Mailbox<Id> mailbox : mailboxes) {
-            Iterator<Message<Id>> messages = mapper.findInMailbox(mailbox, MessageRange.all(), MessageMapper.FetchType.Metadata, -1);
+            Iterator<MailboxMessage<Id>> messages = mapper.findInMailbox(mailbox, MessageRange.all(), MessageMapper.FetchType.Metadata, -1);
             messageCount += mapper.countMessagesInMailbox(mailbox);
             while(messages.hasNext()) {
                 messagesSizes +=  messages.next().getFullContentOctets();

Modified: james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java?rev=1724225&r1=1724224&r2=1724225&view=diff
==============================================================================
--- james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java (original)
+++ james/project/trunk/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/LazyMessageSearchIndex.java Tue Jan 12 13:17:03 2016
@@ -30,7 +30,7 @@ import org.apache.james.mailbox.model.Se
 import org.apache.james.mailbox.store.mail.MessageMapper.FetchType;
 import org.apache.james.mailbox.store.mail.model.MailboxId;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
-import org.apache.james.mailbox.store.mail.model.Message;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 
 /**
  * {@link ListeningMessageSearchIndex} implementation which wraps another {@link ListeningMessageSearchIndex} and will forward all calls to it.
@@ -59,7 +59,7 @@ public class LazyMessageSearchIndex<Id e
     }
 
     @Override
-    public void add(MailboxSession session, Mailbox<Id> mailbox, Message<Id> message) throws MailboxException {    
+    public void add(MailboxSession session, Mailbox<Id> mailbox, MailboxMessage<Id> message) throws MailboxException {
         index.add(session, mailbox, message);
     }
 
@@ -86,9 +86,9 @@ public class LazyMessageSearchIndex<Id e
                 done = oldDone;
             }
             synchronized (done) {
-                Iterator<Message<Id>> messages = getFactory().getMessageMapper(session).findInMailbox(mailbox, MessageRange.all(), FetchType.Full, -1);
+                Iterator<MailboxMessage<Id>> messages = getFactory().getMessageMapper(session).findInMailbox(mailbox, MessageRange.all(), FetchType.Full, -1);
                 while(messages.hasNext()) {
-                    final Message<Id> message = messages.next();
+                    final MailboxMessage<Id> message = messages.next();
                     try {
                         add(session, mailbox, message);
                     } catch (MailboxException e) {



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