You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/12/02 05:16:55 UTC

[GitHub] [james-project] vttranlina opened a new pull request, #1343: [WIP] Imap modular

vttranlina opened a new pull request, #1343:
URL: https://github.com/apache/james-project/pull/1343

   resolve https://github.com/linagora/james-project/issues/4690
   
   jira: TODO


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa commented on a diff in pull request #1343: [WIP] Imap modular

Posted by GitBox <gi...@apache.org>.
chibenwa commented on code in PR #1343:
URL: https://github.com/apache/james-project/pull/1343#discussion_r1042838498


##########
server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/ImapPackage.java:
##########
@@ -0,0 +1,314 @@
+package org.apache.james.modules.protocols;
+
+import java.util.Collection;
+
+import javax.inject.Inject;
+
+import org.apache.james.imap.decode.parser.AppendCommandParser;
+import org.apache.james.imap.decode.parser.AuthenticateCommandParser;
+import org.apache.james.imap.decode.parser.CapabilityCommandParser;
+import org.apache.james.imap.decode.parser.CheckCommandParser;
+import org.apache.james.imap.decode.parser.CloseCommandParser;
+import org.apache.james.imap.decode.parser.CompressCommandParser;
+import org.apache.james.imap.decode.parser.CopyCommandParser;
+import org.apache.james.imap.decode.parser.CreateCommandParser;
+import org.apache.james.imap.decode.parser.DeleteACLCommandParser;
+import org.apache.james.imap.decode.parser.DeleteCommandParser;
+import org.apache.james.imap.decode.parser.EnableCommandParser;
+import org.apache.james.imap.decode.parser.ExamineCommandParser;
+import org.apache.james.imap.decode.parser.ExpungeCommandParser;
+import org.apache.james.imap.decode.parser.FetchCommandParser;
+import org.apache.james.imap.decode.parser.GetACLCommandParser;
+import org.apache.james.imap.decode.parser.GetMetadataCommandParser;
+import org.apache.james.imap.decode.parser.GetQuotaCommandParser;
+import org.apache.james.imap.decode.parser.GetQuotaRootCommandParser;
+import org.apache.james.imap.decode.parser.IdleCommandParser;
+import org.apache.james.imap.decode.parser.ListCommandParser;
+import org.apache.james.imap.decode.parser.ListRightsCommandParser;
+import org.apache.james.imap.decode.parser.LoginCommandParser;
+import org.apache.james.imap.decode.parser.LsubCommandParser;
+import org.apache.james.imap.decode.parser.MoveCommandParser;
+import org.apache.james.imap.decode.parser.MyRightsCommandParser;
+import org.apache.james.imap.decode.parser.NamespaceCommandParser;
+import org.apache.james.imap.decode.parser.NoopCommandParser;
+import org.apache.james.imap.decode.parser.RenameCommandParser;
+import org.apache.james.imap.decode.parser.SearchCommandParser;
+import org.apache.james.imap.decode.parser.SelectCommandParser;
+import org.apache.james.imap.decode.parser.SetACLCommandParser;
+import org.apache.james.imap.decode.parser.SetAnnotationCommandParser;
+import org.apache.james.imap.decode.parser.SetQuotaCommandParser;
+import org.apache.james.imap.decode.parser.StartTLSCommandParser;
+import org.apache.james.imap.decode.parser.StatusCommandParser;
+import org.apache.james.imap.decode.parser.StoreCommandParser;
+import org.apache.james.imap.decode.parser.SubscribeCommandParser;
+import org.apache.james.imap.decode.parser.UidCommandParser;
+import org.apache.james.imap.decode.parser.UnselectCommandParser;
+import org.apache.james.imap.decode.parser.UnsubscribeCommandParser;
+import org.apache.james.imap.decode.parser.XListCommandParser;
+import org.apache.james.imap.encode.AuthenticateResponseEncoder;
+import org.apache.james.imap.encode.CapabilityResponseEncoder;
+import org.apache.james.imap.encode.ContinuationResponseEncoder;
+import org.apache.james.imap.encode.ESearchResponseEncoder;
+import org.apache.james.imap.encode.EnableResponseEncoder;
+import org.apache.james.imap.encode.ExistsResponseEncoder;
+import org.apache.james.imap.encode.ExpungeResponseEncoder;
+import org.apache.james.imap.encode.FetchResponseEncoder;
+import org.apache.james.imap.encode.FlagsResponseEncoder;
+import org.apache.james.imap.encode.LSubResponseEncoder;
+import org.apache.james.imap.encode.ListResponseEncoder;
+import org.apache.james.imap.encode.ListRightsResponseEncoder;
+import org.apache.james.imap.encode.MailboxStatusResponseEncoder;
+import org.apache.james.imap.encode.MetadataResponseEncoder;
+import org.apache.james.imap.encode.MyRightsResponseEncoder;
+import org.apache.james.imap.encode.NamespaceResponseEncoder;
+import org.apache.james.imap.encode.QuotaResponseEncoder;
+import org.apache.james.imap.encode.QuotaRootResponseEncoder;
+import org.apache.james.imap.encode.RecentResponseEncoder;
+import org.apache.james.imap.encode.SearchResponseEncoder;
+import org.apache.james.imap.encode.StatusResponseEncoder;
+import org.apache.james.imap.encode.VanishedResponseEncoder;
+import org.apache.james.imap.encode.XListResponseEncoder;
+import org.apache.james.imap.processor.AppendProcessor;
+import org.apache.james.imap.processor.AuthenticateProcessor;
+import org.apache.james.imap.processor.CapabilityProcessor;
+import org.apache.james.imap.processor.CheckProcessor;
+import org.apache.james.imap.processor.CloseProcessor;
+import org.apache.james.imap.processor.CompressProcessor;
+import org.apache.james.imap.processor.CopyProcessor;
+import org.apache.james.imap.processor.CreateProcessor;
+import org.apache.james.imap.processor.DeleteACLProcessor;
+import org.apache.james.imap.processor.DeleteProcessor;
+import org.apache.james.imap.processor.EnableProcessor;
+import org.apache.james.imap.processor.ExamineProcessor;
+import org.apache.james.imap.processor.ExpungeProcessor;
+import org.apache.james.imap.processor.GetACLProcessor;
+import org.apache.james.imap.processor.GetMetadataProcessor;
+import org.apache.james.imap.processor.GetQuotaProcessor;
+import org.apache.james.imap.processor.GetQuotaRootProcessor;
+import org.apache.james.imap.processor.IdProcessor;
+import org.apache.james.imap.processor.IdleProcessor;
+import org.apache.james.imap.processor.LSubProcessor;
+import org.apache.james.imap.processor.ListProcessor;
+import org.apache.james.imap.processor.ListRightsProcessor;
+import org.apache.james.imap.processor.LoginProcessor;
+import org.apache.james.imap.processor.LogoutProcessor;
+import org.apache.james.imap.processor.MoveProcessor;
+import org.apache.james.imap.processor.MyRightsProcessor;
+import org.apache.james.imap.processor.NamespaceProcessor;
+import org.apache.james.imap.processor.NoopProcessor;
+import org.apache.james.imap.processor.RenameProcessor;
+import org.apache.james.imap.processor.SearchProcessor;
+import org.apache.james.imap.processor.SelectProcessor;
+import org.apache.james.imap.processor.SetACLProcessor;
+import org.apache.james.imap.processor.SetMetadataProcessor;
+import org.apache.james.imap.processor.SetQuotaProcessor;
+import org.apache.james.imap.processor.StartTLSProcessor;
+import org.apache.james.imap.processor.StatusProcessor;
+import org.apache.james.imap.processor.StoreProcessor;
+import org.apache.james.imap.processor.SubscribeProcessor;
+import org.apache.james.imap.processor.UnselectProcessor;
+import org.apache.james.imap.processor.UnsubscribeProcessor;
+import org.apache.james.imap.processor.XListProcessor;
+import org.apache.james.imap.processor.base.ImapResponseMessageProcessor;
+import org.apache.james.imap.processor.fetch.FetchProcessor;
+import org.apache.james.utils.ClassName;
+
+import com.google.common.collect.ImmutableList;
+
+public interface ImapPackage {
+    Collection<ClassName> processors();
+
+    Collection<ClassName> decoders();
+
+    Collection<ClassName> encoders();
+
+    class Impl implements ImapPackage {
+        private final ImmutableList<ClassName> processors;
+        private final ImmutableList<ClassName> decoders;
+        private final ImmutableList<ClassName> encoders;
+
+        public Impl(ImmutableList<ClassName> processors,
+                    ImmutableList<ClassName> decoders,
+                    ImmutableList<ClassName> encoders) {
+            this.processors = processors;
+            this.decoders = decoders;
+            this.encoders = encoders;
+        }
+
+        @Override
+        public Collection<ClassName> processors() {
+            return processors;
+        }
+
+        @Override
+        public Collection<ClassName> decoders() {
+            return decoders;
+        }
+
+        @Override
+        public Collection<ClassName> encoders() {
+            return encoders;
+        }
+    }
+
+    static ImapPackage and(Collection<ImapPackage> packages) {
+        return new ImapPackage() {
+            @Override
+            public Collection<ClassName> processors() {
+                return packages.stream()
+                    .flatMap(p -> p.processors().stream())
+                    .collect(ImmutableList.toImmutableList());
+            }
+
+            @Override
+            public Collection<ClassName> decoders() {
+                return packages.stream()
+                    .flatMap(p -> p.decoders().stream())
+                    .collect(ImmutableList.toImmutableList());
+            }
+
+            @Override
+            public Collection<ClassName> encoders() {
+                return packages.stream()
+                    .flatMap(p -> p.encoders().stream())
+                    .collect(ImmutableList.toImmutableList());
+            }
+        };
+    }
+
+    ImapPackage DEFAULT = and(ImmutableList.of(new DefaultNoAuth(), new DefaultAuth()));
+
+    class DefaultNoAuth extends Impl {
+        public DefaultNoAuth() {
+            super(
+                ImmutableList.of(
+                    CapabilityProcessor.class,

Review Comment:
   If we are rebased on master we need to add here IdProcessor + its encoder and command parser



##########
server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/ImapPackage.java:
##########
@@ -0,0 +1,314 @@
+package org.apache.james.modules.protocols;

Review Comment:
   Missing license



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa commented on pull request #1343: [WIP] Imap modular

Posted by GitBox <gi...@apache.org>.
chibenwa commented on PR #1343:
URL: https://github.com/apache/james-project/pull/1343#issuecomment-1341868419

   FYI https://issues.apache.org/jira/browse/JAMES-3867


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa commented on a diff in pull request #1343: [WIP] Imap modular

Posted by GitBox <gi...@apache.org>.
chibenwa commented on code in PR #1343:
URL: https://github.com/apache/james-project/pull/1343#discussion_r1042839261


##########
server/container/guice/common/src/main/java/org/apache/james/TemporaryJamesServer.java:
##########
@@ -0,0 +1,106 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.james.server.core.configuration.Configuration;
+
+import com.google.common.collect.ImmutableList;
+
+public class TemporaryJamesServer {

Review Comment:
   Maybe not needed. Can't we just use a MemoryJamesServer for this test?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa merged pull request #1343: JAMES-3867 Make IMAP modular

Posted by GitBox <gi...@apache.org>.
chibenwa merged PR #1343:
URL: https://github.com/apache/james-project/pull/1343


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] vttranlina commented on pull request #1343: [WIP] Imap modular

Posted by GitBox <gi...@apache.org>.
vttranlina commented on PR #1343:
URL: https://github.com/apache/james-project/pull/1343#issuecomment-1341852476

   TODO: 
   - [ ] Add more test cases
   - [ ] Document


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa commented on pull request #1343: JAMES-3867 Make IMAP modular

Posted by GitBox <gi...@apache.org>.
chibenwa commented on PR #1343:
URL: https://github.com/apache/james-project/pull/1343#issuecomment-1343717178

   <p><span style="font-weight:bold">org.apache.james.imap.processor.GetAnnotationProcessorTest.processShouldGetAnnotationsAndReturnCompleteResponseWithTruncateDataByLessThenOrEqualMaxsize</span></p><div style="text-align:right;">Failing for the past 1 build
             (Since <a href="https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1343/5/" class="model-link"><span style="width: 16px; height: 16px; " class="build-status-icon__wrapper icon-red icon-sm"><span class="build-status-icon__outer"><svg viewBox="0 0 24 24" focusable="false" class="svg-icon "><use href="https://ci-builds.apache.org/images/build-status/build-status-sprite.svg#build-status-static"></use></svg></span><svg viewBox="0 0 24 24" focusable="false" class="svg-icon icon-red icon-sm"><use href="https://ci-builds.apache.org/static/919f2990/images/build-status/build-status-sprite.svg#last-failed"></use></svg></span><span class="jenkins-icon-adjacent">#5</span></a> )
           </div><div style="text-align:right;"><a href="https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1343/5/testReport/junit/org.apache.james.imap.processor/GetAnnotationProcessorTest/processShouldGetAnnotationsAndReturnCompleteResponseWithTruncateDataByLessThenOrEqualMaxsize/history">Took 4 ms.</a></div><div id="description"><div></div><div class="jenkins-buttons-row jenkins-buttons-row--invert"></div></div>
   <h3>Stacktrace</h3><pre>java.lang.NullPointerException
   	at org.apache.james.imap.processor.GetAnnotationProcessorTest.setUp(GetAnnotationProcessorTest.java:127)
   </pre>org.apache.james.imap.processor.GetAnnotationProcessorTest.processShouldGetAnnotationsAndReturnCompleteResponseWithTruncateDataByLessThenOrEqualMaxsize
   Failing for the past 1 build (Since
   [#5](https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1343/5/) )
   [Took 4 ms.](https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1343/5/testReport/junit/org.apache.james.imap.processor/GetAnnotationProcessorTest/processShouldGetAnnotationsAndReturnCompleteResponseWithTruncateDataByLessThenOrEqualMaxsize/history)
   Stacktrace
   
   java.lang.NullPointerException
   	at org.apache.james.imap.processor.GetAnnotationProcessorTest.setUp(GetAnnotationProcessorTest.java:127)
   
   Looks related...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] vttranlina commented on a diff in pull request #1343: [WIP] Imap modular

Posted by GitBox <gi...@apache.org>.
vttranlina commented on code in PR #1343:
URL: https://github.com/apache/james-project/pull/1343#discussion_r1042842057


##########
server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/ImapPackage.java:
##########
@@ -0,0 +1,314 @@
+package org.apache.james.modules.protocols;
+
+import java.util.Collection;
+
+import javax.inject.Inject;
+
+import org.apache.james.imap.decode.parser.AppendCommandParser;
+import org.apache.james.imap.decode.parser.AuthenticateCommandParser;
+import org.apache.james.imap.decode.parser.CapabilityCommandParser;
+import org.apache.james.imap.decode.parser.CheckCommandParser;
+import org.apache.james.imap.decode.parser.CloseCommandParser;
+import org.apache.james.imap.decode.parser.CompressCommandParser;
+import org.apache.james.imap.decode.parser.CopyCommandParser;
+import org.apache.james.imap.decode.parser.CreateCommandParser;
+import org.apache.james.imap.decode.parser.DeleteACLCommandParser;
+import org.apache.james.imap.decode.parser.DeleteCommandParser;
+import org.apache.james.imap.decode.parser.EnableCommandParser;
+import org.apache.james.imap.decode.parser.ExamineCommandParser;
+import org.apache.james.imap.decode.parser.ExpungeCommandParser;
+import org.apache.james.imap.decode.parser.FetchCommandParser;
+import org.apache.james.imap.decode.parser.GetACLCommandParser;
+import org.apache.james.imap.decode.parser.GetMetadataCommandParser;
+import org.apache.james.imap.decode.parser.GetQuotaCommandParser;
+import org.apache.james.imap.decode.parser.GetQuotaRootCommandParser;
+import org.apache.james.imap.decode.parser.IdleCommandParser;
+import org.apache.james.imap.decode.parser.ListCommandParser;
+import org.apache.james.imap.decode.parser.ListRightsCommandParser;
+import org.apache.james.imap.decode.parser.LoginCommandParser;
+import org.apache.james.imap.decode.parser.LsubCommandParser;
+import org.apache.james.imap.decode.parser.MoveCommandParser;
+import org.apache.james.imap.decode.parser.MyRightsCommandParser;
+import org.apache.james.imap.decode.parser.NamespaceCommandParser;
+import org.apache.james.imap.decode.parser.NoopCommandParser;
+import org.apache.james.imap.decode.parser.RenameCommandParser;
+import org.apache.james.imap.decode.parser.SearchCommandParser;
+import org.apache.james.imap.decode.parser.SelectCommandParser;
+import org.apache.james.imap.decode.parser.SetACLCommandParser;
+import org.apache.james.imap.decode.parser.SetAnnotationCommandParser;
+import org.apache.james.imap.decode.parser.SetQuotaCommandParser;
+import org.apache.james.imap.decode.parser.StartTLSCommandParser;
+import org.apache.james.imap.decode.parser.StatusCommandParser;
+import org.apache.james.imap.decode.parser.StoreCommandParser;
+import org.apache.james.imap.decode.parser.SubscribeCommandParser;
+import org.apache.james.imap.decode.parser.UidCommandParser;
+import org.apache.james.imap.decode.parser.UnselectCommandParser;
+import org.apache.james.imap.decode.parser.UnsubscribeCommandParser;
+import org.apache.james.imap.decode.parser.XListCommandParser;
+import org.apache.james.imap.encode.AuthenticateResponseEncoder;
+import org.apache.james.imap.encode.CapabilityResponseEncoder;
+import org.apache.james.imap.encode.ContinuationResponseEncoder;
+import org.apache.james.imap.encode.ESearchResponseEncoder;
+import org.apache.james.imap.encode.EnableResponseEncoder;
+import org.apache.james.imap.encode.ExistsResponseEncoder;
+import org.apache.james.imap.encode.ExpungeResponseEncoder;
+import org.apache.james.imap.encode.FetchResponseEncoder;
+import org.apache.james.imap.encode.FlagsResponseEncoder;
+import org.apache.james.imap.encode.LSubResponseEncoder;
+import org.apache.james.imap.encode.ListResponseEncoder;
+import org.apache.james.imap.encode.ListRightsResponseEncoder;
+import org.apache.james.imap.encode.MailboxStatusResponseEncoder;
+import org.apache.james.imap.encode.MetadataResponseEncoder;
+import org.apache.james.imap.encode.MyRightsResponseEncoder;
+import org.apache.james.imap.encode.NamespaceResponseEncoder;
+import org.apache.james.imap.encode.QuotaResponseEncoder;
+import org.apache.james.imap.encode.QuotaRootResponseEncoder;
+import org.apache.james.imap.encode.RecentResponseEncoder;
+import org.apache.james.imap.encode.SearchResponseEncoder;
+import org.apache.james.imap.encode.StatusResponseEncoder;
+import org.apache.james.imap.encode.VanishedResponseEncoder;
+import org.apache.james.imap.encode.XListResponseEncoder;
+import org.apache.james.imap.processor.AppendProcessor;
+import org.apache.james.imap.processor.AuthenticateProcessor;
+import org.apache.james.imap.processor.CapabilityProcessor;
+import org.apache.james.imap.processor.CheckProcessor;
+import org.apache.james.imap.processor.CloseProcessor;
+import org.apache.james.imap.processor.CompressProcessor;
+import org.apache.james.imap.processor.CopyProcessor;
+import org.apache.james.imap.processor.CreateProcessor;
+import org.apache.james.imap.processor.DeleteACLProcessor;
+import org.apache.james.imap.processor.DeleteProcessor;
+import org.apache.james.imap.processor.EnableProcessor;
+import org.apache.james.imap.processor.ExamineProcessor;
+import org.apache.james.imap.processor.ExpungeProcessor;
+import org.apache.james.imap.processor.GetACLProcessor;
+import org.apache.james.imap.processor.GetMetadataProcessor;
+import org.apache.james.imap.processor.GetQuotaProcessor;
+import org.apache.james.imap.processor.GetQuotaRootProcessor;
+import org.apache.james.imap.processor.IdProcessor;
+import org.apache.james.imap.processor.IdleProcessor;
+import org.apache.james.imap.processor.LSubProcessor;
+import org.apache.james.imap.processor.ListProcessor;
+import org.apache.james.imap.processor.ListRightsProcessor;
+import org.apache.james.imap.processor.LoginProcessor;
+import org.apache.james.imap.processor.LogoutProcessor;
+import org.apache.james.imap.processor.MoveProcessor;
+import org.apache.james.imap.processor.MyRightsProcessor;
+import org.apache.james.imap.processor.NamespaceProcessor;
+import org.apache.james.imap.processor.NoopProcessor;
+import org.apache.james.imap.processor.RenameProcessor;
+import org.apache.james.imap.processor.SearchProcessor;
+import org.apache.james.imap.processor.SelectProcessor;
+import org.apache.james.imap.processor.SetACLProcessor;
+import org.apache.james.imap.processor.SetMetadataProcessor;
+import org.apache.james.imap.processor.SetQuotaProcessor;
+import org.apache.james.imap.processor.StartTLSProcessor;
+import org.apache.james.imap.processor.StatusProcessor;
+import org.apache.james.imap.processor.StoreProcessor;
+import org.apache.james.imap.processor.SubscribeProcessor;
+import org.apache.james.imap.processor.UnselectProcessor;
+import org.apache.james.imap.processor.UnsubscribeProcessor;
+import org.apache.james.imap.processor.XListProcessor;
+import org.apache.james.imap.processor.base.ImapResponseMessageProcessor;
+import org.apache.james.imap.processor.fetch.FetchProcessor;
+import org.apache.james.utils.ClassName;
+
+import com.google.common.collect.ImmutableList;
+
+public interface ImapPackage {
+    Collection<ClassName> processors();
+
+    Collection<ClassName> decoders();
+
+    Collection<ClassName> encoders();
+
+    class Impl implements ImapPackage {
+        private final ImmutableList<ClassName> processors;
+        private final ImmutableList<ClassName> decoders;
+        private final ImmutableList<ClassName> encoders;
+
+        public Impl(ImmutableList<ClassName> processors,
+                    ImmutableList<ClassName> decoders,
+                    ImmutableList<ClassName> encoders) {
+            this.processors = processors;
+            this.decoders = decoders;
+            this.encoders = encoders;
+        }
+
+        @Override
+        public Collection<ClassName> processors() {
+            return processors;
+        }
+
+        @Override
+        public Collection<ClassName> decoders() {
+            return decoders;
+        }
+
+        @Override
+        public Collection<ClassName> encoders() {
+            return encoders;
+        }
+    }
+
+    static ImapPackage and(Collection<ImapPackage> packages) {
+        return new ImapPackage() {
+            @Override
+            public Collection<ClassName> processors() {
+                return packages.stream()
+                    .flatMap(p -> p.processors().stream())
+                    .collect(ImmutableList.toImmutableList());
+            }
+
+            @Override
+            public Collection<ClassName> decoders() {
+                return packages.stream()
+                    .flatMap(p -> p.decoders().stream())
+                    .collect(ImmutableList.toImmutableList());
+            }
+
+            @Override
+            public Collection<ClassName> encoders() {
+                return packages.stream()
+                    .flatMap(p -> p.encoders().stream())
+                    .collect(ImmutableList.toImmutableList());
+            }
+        };
+    }
+
+    ImapPackage DEFAULT = and(ImmutableList.of(new DefaultNoAuth(), new DefaultAuth()));
+
+    class DefaultNoAuth extends Impl {
+        public DefaultNoAuth() {
+            super(
+                ImmutableList.of(
+                    CapabilityProcessor.class,

Review Comment:
   `org.apache.james.imap.processor.IdProcessor` already
   yes, i forgot encoder/decoder



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org