james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [08/11] james-project git commit: JAMES-1746 As Maildir do not support NAMESPACE in the MailboxPath, introduce a related mailbox feature
Date Wed, 08 Jun 2016 11:36:06 GMT
JAMES-1746 As Maildir do not support NAMESPACE in the MailboxPath, introduce a related mailbox
feature


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/e2a1708f
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/e2a1708f
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/e2a1708f

Branch: refs/heads/master
Commit: e2a1708f861da8e7615c11d679a24022587f02c4
Parents: 311d63a
Author: Benoit Tellier <btellier@linagora.com>
Authored: Tue Jun 7 13:59:16 2016 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Wed Jun 8 17:09:21 2016 +0700

----------------------------------------------------------------------
 .../main/java/org/apache/james/mailbox/MailboxManager.java    | 3 ++-
 .../james/mailbox/cassandra/CassandraMailboxManager.java      | 2 +-
 .../org/apache/james/mailbox/hbase/HBaseMailboxManager.java   | 7 +++++++
 .../java/org/apache/james/mailbox/jcr/JCRMailboxManager.java  | 6 ++++++
 .../java/org/apache/james/mailbox/jpa/JPAMailboxManager.java  | 7 +++++++
 .../apache/james/mailbox/inmemory/InMemoryMailboxManager.java | 2 +-
 6 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e2a1708f/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxManager.java b/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxManager.java
index 351d654..4e597b8 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxManager.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxManager.java
@@ -72,7 +72,8 @@ public interface MailboxManager extends RequestAware, MailboxListenerSupport
{
 
     enum MailboxCapabilities {
         Move,
-        UserFlag
+        UserFlag,
+        Namespace
     }
 
     EnumSet<MailboxCapabilities> getSupportedMailboxCapabilities();

http://git-wip-us.apache.org/repos/asf/james-project/blob/e2a1708f/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
index 45290f0..1e087bd 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
@@ -64,7 +64,7 @@ public class CassandraMailboxManager extends StoreMailboxManager {
 
     @Override
     public EnumSet<MailboxManager.MailboxCapabilities> getSupportedMailboxCapabilities()
{
-        return EnumSet.of(MailboxCapabilities.Move, MailboxCapabilities.UserFlag);
+        return EnumSet.of(MailboxCapabilities.Move, MailboxCapabilities.UserFlag, MailboxCapabilities.Namespace);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/e2a1708f/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java
b/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java
index 17d5ef4..cd3ce88 100644
--- a/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java
+++ b/mailbox/hbase/src/main/java/org/apache/james/mailbox/hbase/HBaseMailboxManager.java
@@ -18,6 +18,8 @@
  ****************************************************************/
 package org.apache.james.mailbox.hbase;
 
+import java.util.EnumSet;
+
 import org.apache.james.mailbox.MailboxPathLocker;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.acl.GroupMembershipResolver;
@@ -80,6 +82,11 @@ public class HBaseMailboxManager extends StoreMailboxManager {
     }
 
     @Override
+    public EnumSet<MailboxCapabilities> getSupportedMailboxCapabilities() {
+        return EnumSet.of(MailboxCapabilities.Namespace);
+    }
+
+    @Override
     protected StoreMessageManager createMessageManager(Mailbox mailboxRow, MailboxSession
session) throws MailboxException {
         return new HBaseMessageManager(getMapperFactory(),
             getMessageSearchIndex(),

http://git-wip-us.apache.org/repos/asf/james-project/blob/e2a1708f/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java
b/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java
index 853d7c6..1cb8f84 100644
--- a/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java
+++ b/mailbox/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java
@@ -18,6 +18,8 @@
  ****************************************************************/
 package org.apache.james.mailbox.jcr;
 
+import java.util.EnumSet;
+
 import org.apache.james.mailbox.MailboxPathLocker;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.acl.GroupMembershipResolver;
@@ -50,6 +52,10 @@ public class JCRMailboxManager extends StoreMailboxManager implements JCRImapCon
         super(mapperFactory, authenticator, locker, aclResolver, groupMembershipResolver,
messageParser);
     }
 
+    @Override
+    public EnumSet<MailboxCapabilities> getSupportedMailboxCapabilities() {
+        return EnumSet.of(MailboxCapabilities.Namespace);
+    }
     
     @Override
     protected StoreMessageManager createMessageManager(Mailbox mailboxEntity, MailboxSession
session) throws MailboxException{

http://git-wip-us.apache.org/repos/asf/james-project/blob/e2a1708f/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMailboxManager.java
b/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMailboxManager.java
index 34db106..626f7dc 100644
--- a/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMailboxManager.java
+++ b/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/JPAMailboxManager.java
@@ -18,6 +18,8 @@
  ****************************************************************/
 package org.apache.james.mailbox.jpa;
 
+import java.util.EnumSet;
+
 import org.apache.james.mailbox.MailboxPathLocker;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.acl.GroupMembershipResolver;
@@ -47,6 +49,11 @@ public abstract class JPAMailboxManager extends StoreMailboxManager {
         return  new JPAMailbox(path, randomUidValidity());
     }
 
+    @Override
+    public EnumSet<MailboxCapabilities> getSupportedMailboxCapabilities() {
+        return EnumSet.of(MailboxCapabilities.UserFlag, MailboxCapabilities.Namespace);
+    }
+
     /**
      * Delete all mailboxes 
      * 

http://git-wip-us.apache.org/repos/asf/james-project/blob/e2a1708f/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManager.java
b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManager.java
index 22fb603..0986aff 100644
--- a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManager.java
+++ b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManager.java
@@ -44,7 +44,7 @@ public class InMemoryMailboxManager extends StoreMailboxManager {
 
     @Override
     public EnumSet<MailboxCapabilities> getSupportedMailboxCapabilities() {
-        return EnumSet.of(MailboxCapabilities.Move, MailboxCapabilities.UserFlag);
+        return EnumSet.of(MailboxCapabilities.Move, MailboxCapabilities.UserFlag, MailboxCapabilities.Namespace);
     }
     
     @Override


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