james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [01/44] james-project git commit: JAMES-2267 Use constants for processor state
Date Fri, 05 Jan 2018 02:56:20 GMT
Repository: james-project
Updated Branches:
  refs/heads/improve-mailet-testing-experience-v1 [created] 55dc6ff94


JAMES-2267 Use constants for processor state

Also rely on provided specific builders for specific states


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

Branch: refs/heads/improve-mailet-testing-experience-v1
Commit: b8e7d528260623623464c6b320e65e4d2d1d0e71
Parents: 2e14352
Author: benwa <btellier@linagora.com>
Authored: Tue Dec 19 11:14:07 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Jan 5 09:13:50 2018 +0700

----------------------------------------------------------------------
 .../james/mailets/BounceIntegrationTest.java    |  8 ++--
 .../GatewayRemoteDeliveryIntegrationTest.java   | 15 +++----
 .../mailets/NetworkMatcherIntegrationTest.java  | 43 ++++++++------------
 .../james/mailets/SmtpAuthIntegrationTest.java  | 13 +++---
 .../mailets/configuration/CommonProcessors.java | 27 +++++-------
 .../configuration/ProcessorConfiguration.java   | 24 ++++++++++-
 .../crypto/SMIMEDecryptIntegrationTest.java     |  3 +-
 .../crypto/SMIMESignIntegrationTest.java        |  3 +-
 .../james/smtp/SmtpAuthorizedAddressesTest.java | 12 +++---
 .../james/smtp/SmtpBracketEnforcementTest.java  | 10 ++---
 .../smtp/SmtpIdentityVerificationTest.java      |  8 ++--
 .../james/smtp/SmtpSizeLimitationTest.java      | 10 ++---
 .../mailets/AmqpForwardAttachmentTest.java      |  3 +-
 .../transport/mailets/ContactExtractorTest.java |  3 +-
 .../transport/mailets/GroupMappingTest.java     |  7 ++--
 .../mailets/ICSAttachmentWorkflowTest.java      |  3 +-
 .../transport/mailets/StripAttachmentTest.java  |  3 +-
 17 files changed, 89 insertions(+), 106 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
index 1d0c2a9..f79e61c 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
@@ -257,8 +257,7 @@ public class BounceIntegrationTest {
     private ProcessorConfiguration transport() {
         // This processor delivers emails to BOUNCE_RECEIVER and POSTMASTER
         // Other recipients will be bouncing
-        return ProcessorConfiguration.builder()
-            .state("transport")
+        return ProcessorConfiguration.transport()
             .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(RecipientIsLocal.class)
@@ -274,13 +273,12 @@ public class BounceIntegrationTest {
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "bounces"))
+                .addProperty("processor", ProcessorConfiguration.STATE_BOUNCES))
             .build();
     }
 
     public static ProcessorConfiguration bounces(MailetConfiguration.Builder redirectionMailetConfiguration)
{
-        return ProcessorConfiguration.builder()
-            .state("bounces")
+        return ProcessorConfiguration.bounces()
             .addMailet(redirectionMailetConfiguration)
             .build();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
index 0f07481..5eb773b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
@@ -274,8 +274,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
                 .threads(5)
                 .addProcessor(root())
                 .addProcessor(CommonProcessors.error())
-                .addProcessor(ProcessorConfiguration.builder()
-                    .state("transport")
+                .addProcessor(ProcessorConfiguration.transport()
                     .enableJmx(true)
                     .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
@@ -367,8 +366,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
 
     public ProcessorConfiguration root() {
         // Custom in memory DNS resolution is not possible combined with InSpamerBackList
-        return ProcessorConfiguration.builder()
-            .state("root")
+        return ProcessorConfiguration.root()
             .enableJmx(true)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
@@ -385,8 +383,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     private ProcessorConfiguration relayOnlyTransport(String gatewayProperty) {
-        return ProcessorConfiguration.builder()
-            .state("transport")
+        return ProcessorConfiguration.transport()
             .enableJmx(true)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
@@ -407,8 +404,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     private ProcessorConfiguration relayAndLocalDeliveryTransport(String gatewayProperty)
{
-        return ProcessorConfiguration.builder()
-            .state("transport")
+        return ProcessorConfiguration.transport()
             .enableJmx(true)
             .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
@@ -429,8 +425,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
     }
 
     private ProcessorConfiguration directResolutionTransport() {
-        return ProcessorConfiguration.builder()
-            .state("transport")
+        return ProcessorConfiguration.transport()
             .enableJmx(true)
             .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
index d9fb2fd..985b906 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
@@ -94,8 +94,7 @@ public class NetworkMatcherIntegrationTest {
     }
 
     private ProcessorConfiguration deliverOnlyTransport() {
-        return ProcessorConfiguration.builder()
-            .state("transport")
+        return ProcessorConfiguration.transport()
             .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
@@ -117,13 +116,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrInNetwork() throws
Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.0.0.0/8")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =
@@ -140,13 +138,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void mailsFromAuthorizedNetworksShouldBeDeliveredWithRemoteAddrNotInNetwork()
throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrNotInNetwork.class)
                 .matcherCondition("172.0.0.0/8")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =
@@ -163,13 +160,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void remoteAddrInNetworkShouldSupportLargerMask() throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.0.0.0/2")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =
@@ -186,13 +182,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void remoteAddrInNetworkShouldSupportRangesDefinedByAMiddleIp() throws Exception
{
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.0.4.108/8")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =
@@ -209,13 +204,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void remoteAddrInNetworkShouldSupportRangesDefinedByEndingIp() throws Exception
{
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("127.255.255.255/8")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =
@@ -232,13 +226,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void remoteAddrInNetworkShouldSupportRangesWithNonEightMultipleSubMasks() throws
Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("126.0.0.0/4")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =
@@ -255,13 +248,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrInNetwork()
throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrInNetwork.class)
                 .matcherCondition("172.0.0.0/8")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =
@@ -280,13 +272,12 @@ public class NetworkMatcherIntegrationTest {
 
     @Test
     public void mailsFromNonAuthorizedNetworksShouldNotBeDeliveredWithRemoteAddrNotInNetwork()
throws Exception {
-        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.builder()
-            .state("root")
+        jamesServer = createJamesServerWithRootProcessor(ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(RemoteAddrNotInNetwork.class)
                 .matcherCondition("127.0.0.0/8")
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(toRepository()));
 
         try (SMTPMessageSender messageSender =

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
index 012334c..f2a7b04 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
@@ -65,16 +65,15 @@ public class SmtpAuthIntegrationTest {
 
     @Before
     public void setup() throws Exception {
-        ProcessorConfiguration rootProcessor = ProcessorConfiguration.builder()
-            .state("root")
+        ProcessorConfiguration rootProcessor = ProcessorConfiguration.root()
             .addMailet(MailetConfiguration.builder()
                 .matcher(SMTPAuthSuccessful.class)
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "transport"))
+                .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
                 .mailet(ToProcessor.class)
-                .addProperty("processor", "bounces"))
+                .addProperty("processor", ProcessorConfiguration.STATE_BOUNCES))
             .build();
 
         MailetContainer mailetContainer = MailetContainer.builder()
@@ -104,8 +103,7 @@ public class SmtpAuthIntegrationTest {
     }
 
     private ProcessorConfiguration deliverOnlyTransport() {
-        return ProcessorConfiguration.builder()
-            .state("transport")
+        return ProcessorConfiguration.transport()
             .enableJmx(true)
             .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
@@ -115,8 +113,7 @@ public class SmtpAuthIntegrationTest {
     }
 
     private ProcessorConfiguration bounces() {
-        return ProcessorConfiguration.builder()
-            .state("bounces")
+        return ProcessorConfiguration.bounces()
             .enableJmx(true)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
index 0af0d61..a3f9a4a 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
@@ -48,9 +48,8 @@ public class CommonProcessors {
 
 	public static final String ERROR_REPOSITORY = "file://var/mail/error/";
 
-	public static ProcessorConfiguration root() {
-        return ProcessorConfiguration.builder()
-                .state("root")
+    public static ProcessorConfiguration root() {
+        return ProcessorConfiguration.root()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
@@ -68,7 +67,7 @@ public class CommonProcessors {
                         .matcher(HasMailAttribute.class)
                         .matcherCondition("spamChecked")
                         .mailet(ToProcessor.class)
-                        .addProperty("processor", "transport"))
+                        .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
                 .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(SetMailAttribute.class)
@@ -76,28 +75,27 @@ public class CommonProcessors {
                 .addMailet(MailetConfiguration.builder()
                         .matcher(SMTPAuthSuccessful.class)
                         .mailet(ToProcessor.class)
-                        .addProperty("processor", "transport"))
+                        .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
                 .addMailet(MailetConfiguration.builder()
                         .matcher(InSpammerBlacklist.class)
                         .matcherCondition("query.bondedsender.org.")
                         .mailet(ToProcessor.class)
-                        .addProperty("processor", "transport"))
+                        .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
                 .addMailet(MailetConfiguration.builder()
                         .matcher(InSpammerBlacklist.class)
                         .matcherCondition("dnsbl.njabl.org.")
                         .mailet(ToProcessor.class)
-                        .addProperty("processor", "spam")
+                        .addProperty("processor", ProcessorConfiguration.STATE_SPAM)
                         .addProperty("notice", "550 Requested action not taken: rejected
- see http://njabl.org/"))
                 .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(ToProcessor.class)
-                        .addProperty("processor", "transport"))
+                        .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
                 .build();
     }
 
     public static ProcessorConfiguration error() {
-        return ProcessorConfiguration.builder()
-                .state("error")
+        return ProcessorConfiguration.error()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
@@ -110,8 +108,7 @@ public class CommonProcessors {
     }
 
     public static ProcessorConfiguration transport() {
-        return ProcessorConfiguration.builder()
-                .state("transport")
+        return ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                         .matcher(SMTPAuthSuccessful.class)
@@ -158,8 +155,7 @@ public class CommonProcessors {
     }
 
     public static ProcessorConfiguration spam() {
-        return ProcessorConfiguration.builder()
-                .state("spam")
+        return ProcessorConfiguration.spam()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
@@ -200,8 +196,7 @@ public class CommonProcessors {
     }
 
     public static ProcessorConfiguration bounces() {
-        return ProcessorConfiguration.builder()
-                .state("bounces")
+        return ProcessorConfiguration.bounces()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/ProcessorConfiguration.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/ProcessorConfiguration.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/ProcessorConfiguration.java
index 5faa8be..8f207fa 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/ProcessorConfiguration.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/ProcessorConfiguration.java
@@ -28,12 +28,34 @@ import com.google.common.collect.ImmutableList;
 
 public class ProcessorConfiguration implements SerializableAsXml {
 
+    public static final String STATE_TRANSPORT = "transport";
+    public static final String STATE_ROOT = "root";
+    public static final String STATE_BOUNCES = "bounces";
+    public static final String STATE_ERROR = "error";
+    public static final String STATE_SPAM = "spam";
+
     public static Builder builder() {
         return new Builder();
     }
 
     public static Builder transport() {
-        return builder().state("transport");
+        return builder().state(STATE_TRANSPORT);
+    }
+
+    public static Builder root() {
+        return builder().state(STATE_ROOT);
+    }
+
+    public static Builder bounces() {
+        return builder().state(STATE_BOUNCES);
+    }
+
+    public static Builder error() {
+        return builder().state(STATE_ERROR);
+    }
+
+    public static Builder spam() {
+        return builder().state(STATE_SPAM);
     }
 
     public static class Builder {

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
index 9b4a13c..19ca898 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
@@ -76,8 +76,7 @@ public class SMIMEDecryptIntegrationTest {
             .threads(5)
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
index 1fad706..c943d76 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
@@ -82,8 +82,7 @@ public class SMIMESignIntegrationTest {
             .threads(5)
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(SMTPAuthSuccessful.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
index d0cdcaa..389af55 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
@@ -110,15 +110,13 @@ public class SmtpAuthorizedAddressesTest {
         MailetContainer mailetContainer = MailetContainer.builder()
             .postmaster("postmaster@" + DEFAULT_DOMAIN)
             .threads(5)
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("root")
+            .addProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
@@ -133,12 +131,12 @@ public class SmtpAuthorizedAddressesTest {
                     .addProperty("maxDnsProblemRetries", "0")
                     .addProperty("deliveryThreads", "10")
                     .addProperty("sendpartial", "true")
-                    .addProperty("bounceProcessor", "bounces")
+                    .addProperty("bounceProcessor", ProcessorConfiguration.STATE_BOUNCES)
                     .addProperty("gateway", fakeSmtp.getContainerIp()))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "bounces")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_BOUNCES)))
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())
             .addProcessor(CommonProcessors.bounces())

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
index 51e33e8..bfc553b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
@@ -73,15 +73,13 @@ public class SmtpBracketEnforcementTest {
         MailetContainer mailetContainer = MailetContainer.builder()
             .postmaster("postmaster@" + DEFAULT_DOMAIN)
             .threads(5)
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("root")
+            .addProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
@@ -90,7 +88,7 @@ public class SmtpBracketEnforcementTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "bounces")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_BOUNCES)))
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())
             .addProcessor(CommonProcessors.bounces())

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
index 9317282..2dc73d2 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
@@ -75,15 +75,13 @@ public class SmtpIdentityVerificationTest {
         MailetContainer mailetContainer = MailetContainer.builder()
             .postmaster("postmaster@" + DEFAULT_DOMAIN)
             .threads(5)
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("root")
+            .addProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
index 73a4426..46d90b9 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
@@ -74,15 +74,13 @@ public class SmtpSizeLimitationTest {
         MailetContainer mailetContainer = MailetContainer.builder()
             .postmaster("postmaster@" + DEFAULT_DOMAIN)
             .threads(5)
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("root")
+            .addProcessor(ProcessorConfiguration.root()
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
@@ -91,7 +89,7 @@ public class SmtpSizeLimitationTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "bounces")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_BOUNCES)))
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())
             .addProcessor(CommonProcessors.bounces())

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
index 054ec81..11108ff 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
@@ -92,8 +92,7 @@ public class AmqpForwardAttachmentTest {
             .threads(5)
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                    .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                     .enableJmx(true)
                     .addMailet(MailetConfiguration.BCC_STRIPPER)
                     .addMailet(MailetConfiguration.builder()

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
index 8429a6e..e63a9db 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
@@ -84,8 +84,7 @@ public class ContactExtractorTest {
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
             .addProcessor(
-                ProcessorConfiguration.builder()
-                    .state("transport")
+                ProcessorConfiguration.transport()
                     .addMailet(MailetConfiguration.builder()
                         .matcher(SMTPAuthSuccessful.class)
                         .mailet(ContactExtractor.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
index ae536f9..9911a21 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
@@ -110,8 +110,7 @@ public class GroupMappingTest {
         MailetContainer mailetContainer = MailetContainer.builder()
             .postmaster("postmaster@" + DOMAIN1)
             .threads(5)
-            .addProcessor(ProcessorConfiguration.builder()
-                .state("root")
+            .addProcessor(ProcessorConfiguration.root()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
@@ -123,11 +122,11 @@ public class GroupMappingTest {
                 .addMailet(MailetConfiguration.builder()
                     .matcher(SMTPAuthSuccessful.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport"))
+                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
-                    .addProperty("processor", "transport")))
+                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
index cdafabc..2359b00 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
@@ -458,8 +458,7 @@ public class ICSAttachmentWorkflowTest {
             .threads(5)
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                    .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                     .enableJmx(true)
                     .addMailet(MailetConfiguration.BCC_STRIPPER)
                     .addMailet(MailetConfiguration.builder()

http://git-wip-us.apache.org/repos/asf/james-project/blob/b8e7d528/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
index bc13e9a..69397e2 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
@@ -76,8 +76,7 @@ public class StripAttachmentTest {
             .threads(5)
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.builder()
-                    .state("transport")
+            .addProcessor(ProcessorConfiguration.transport()
                     .enableJmx(true)
                     .addMailet(MailetConfiguration.BCC_STRIPPER)
                     .addMailet(MailetConfiguration.builder()


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