james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1134605 - in /james/mailbox/trunk: jcr/src/main/java/org/apache/james/mailbox/jcr/mail/ jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/ maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/ memory/src/main/j...
Date Sat, 11 Jun 2011 12:50:40 GMT
Author: norman
Date: Sat Jun 11 12:50:39 2011
New Revision: 1134605

URL: http://svn.apache.org/viewvc?rev=1134605&view=rev
Log:
Set the \RECENT flag on copied messages. See MAILBOX-85

Modified:
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java
    james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java
    james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java
    james/mailbox/trunk/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/model/SimpleMailboxMembership.java

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java?rev=1134605&r1=1134604&r2=1134605&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java
(original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java
Sat Jun 11 12:50:39 2011
@@ -607,7 +607,9 @@ public class JCRMessageMapper extends Ab
             node.setProperty(JCRMessage.MAILBOX_UUID_PROPERTY, mailbox.getMailboxId());
             node.setProperty(JCRMessage.UID_PROPERTY, uid);
             node.setProperty(JCRMessage.MODSEQ_PROPERTY, modSeq);
-            
+            // A copy of a message is recent 
+            // See MAILBOX-85
+            node.setProperty(JCRMessage.RECENT_PROPERTY, true);
             return new SimpleMessageMetaData(new JCRMessage(node, mailboxSession.getLog()));
         } catch (RepositoryException e) {
             throw new MailboxException("Unable to copy message " +original + " in mailbox
" + mailbox, e);

Modified: james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java?rev=1134605&r1=1134604&r2=1134605&view=diff
==============================================================================
--- james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java
(original)
+++ james/mailbox/trunk/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/model/openjpa/AbstractJPAMessage.java
Sat Jun 11 12:50:39 2011
@@ -289,9 +289,12 @@ public abstract class AbstractJPAMessage
         this.mailbox = mailbox;
         this.uid = uid;
         this.modSeq = modSeq;
-        userFlags = new ArrayList<JPAUserFlag>();
+        this.userFlags = new ArrayList<JPAUserFlag>();
         setFlags(original.createFlags());
         
+        // A copy of a message is recent 
+        // See MAILBOX-85
+        this.recent = true;
 
         this.contentOctets = original.getFullContentOctets();
         this.bodyStartOctet = (int) (original.getFullContentOctets() - original.getBodyOctets());

Modified: james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java?rev=1134605&r1=1134604&r2=1134605&view=diff
==============================================================================
--- james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java
(original)
+++ james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java
Sat Jun 11 12:50:39 2011
@@ -105,7 +105,7 @@ public class MaildirMessage extends Abst
         this.deleted = message.isDeleted();
         this.draft = message.isDraft();
         this.flagged = message.isFlagged();
-        this.recent = message.isRecent();
+
         this.seen = message.isSeen();
         
         try {
@@ -134,6 +134,9 @@ public class MaildirMessage extends Abst
         }
         // this is a copy and thus new
         newMessage = true;
+        // A copy of a message is recent 
+        // See MAILBOX-85
+        this.recent = true;
     }
 
   

Modified: james/mailbox/trunk/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/model/SimpleMailboxMembership.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/model/SimpleMailboxMembership.java?rev=1134605&r1=1134604&r2=1134605&view=diff
==============================================================================
--- james/mailbox/trunk/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/model/SimpleMailboxMembership.java
(original)
+++ james/mailbox/trunk/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/model/SimpleMailboxMembership.java
Sat Jun 11 12:50:39 2011
@@ -61,7 +61,9 @@ public class SimpleMailboxMembership ext
         this.deleted = original.deleted;
         this.draft = original.draft;
         this.flagged = original.flagged;
-        this.recent = original.recent;
+        // A copy of a message is recent 
+        // See MAILBOX-85
+        this.recent = true;
         this.seen = original.seen;
         this.internalDate = original.internalDate;
         this.subType  = original.subType;



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