CAMEL-11872: Regen and fixed CS. This closes #1992

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

Branch: refs/heads/master
Commit: dbbdc490ebb8e3ff70b142021fde8cd4409beb41
Parents: 87be1a3
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Oct 3 19:27:50 2017 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Oct 3 19:27:50 2017 +0200

----------------------------------------------------------------------
 .../camel-mail/src/main/docs/mail-component.adoc       |  3 ++-
 .../component/mail/MailMimeDecodeHeadersTest.java      |  4 ++--
 .../mail/springboot/MailComponentConfiguration.java    | 13 +++++++++++++
 3 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dbbdc490/components/camel-mail/src/main/docs/mail-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/docs/mail-component.adoc 
b/components/camel-mail/src/main/docs/mail-component.adoc
index e3904e0..4ce60aa 100644
--- a/components/camel-mail/src/main/docs/mail-component.adoc
+++ b/components/camel-mail/src/main/docs/mail-component.adoc
@@ -114,7 +114,7 @@ with the following path and query parameters:
 | *port* | The port number of the mail server |  | int
 |===
 
-==== Query Parameters (61 parameters):
+==== Query Parameters (62 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
@@ -126,6 +126,7 @@ with the following path and query parameters:
 | *disconnect* (consumer) | Whether the consumer should disconnect after 
polling. If enabled this forces Camel to connect on each poll. | false | boolean
 | *handleFailedMessage* (consumer) | If the mail consumer cannot retrieve a 
given mail message then this option allows to handle the caused exception by 
the consumer's error handler. By enable the bridge error handler on the 
consumer then the Camel routing error handler can handle the exception instead. 
The default behavior would be the consumer throws an exception and no mails 
from the batch would be able to be routed by Camel. | false | boolean
 | *maxMessagesPerPoll* (consumer) | Specifies the maximum number of messages 
to gather per poll. By default no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid downloading thousands of files when the server starts up. 
Set a value of 0 or negative to disable this option. |  | int
+| *mimeDecodeHeaders* (consumer) | This option enables transparent MIME 
decoding and unfolding for mail headers. | false | boolean
 | *peek* (consumer) | Will mark the javax.mail.Message as peeked before 
processing the mail message. This applies to IMAPMessage messages types only. 
By using peek the mail will not be eager marked as SEEN on the mail server 
which allows us to rollback the mail message if there is an error processing in 
Camel. | true | boolean
 | *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll 
any files you can enable this option to send an empty message (no body) 
instead. | false | boolean
 | *skipFailedMessage* (consumer) | If the mail consumer cannot retrieve a 
given mail message then this option allows to skip the message and move on to 
retrieve the next mail message. The default behavior would be the consumer 
throws an exception and no mails from the batch would be able to be routed by 
Camel. | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/dbbdc490/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMimeDecodeHeadersTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMimeDecodeHeadersTest.java
 
b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMimeDecodeHeadersTest.java
index cafe248..c5073b3 100644
--- 
a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMimeDecodeHeadersTest.java
+++ 
b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMimeDecodeHeadersTest.java
@@ -16,14 +16,14 @@
  */
 package org.apache.camel.component.mail;
 
+import javax.mail.internet.MimeUtility;
+
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 import org.jvnet.mock_javamail.Mailbox;
 
-import javax.mail.internet.MimeUtility;
-
 /**
  * Unit test for Mail header decoding/unfolding support.
  */

http://git-wip-us.apache.org/repos/asf/camel/blob/dbbdc490/platforms/spring-boot/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
----------------------------------------------------------------------
diff --git 
a/platforms/spring-boot/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
index be43bab..3932baa 100644
--- 
a/platforms/spring-boot/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-mail-starter/src/main/java/org/apache/camel/component/mail/springboot/MailComponentConfiguration.java
@@ -303,6 +303,11 @@ public class MailComponentConfiguration
          * what content-type-encoding to use for attachments.
          */
         private AttachmentsContentTransferEncodingResolver 
attachmentsContentTransferEncodingResolver;
+        /**
+         * This option enables transparent MIME decoding and unfolding for mail
+         * headers.
+         */
+        private Boolean mimeDecodeHeaders = false;
 
         public JavaMailSender getJavaMailSender() {
             return javaMailSender;
@@ -594,5 +599,13 @@ public class MailComponentConfiguration
                 AttachmentsContentTransferEncodingResolver 
attachmentsContentTransferEncodingResolver) {
             this.attachmentsContentTransferEncodingResolver = 
attachmentsContentTransferEncodingResolver;
         }
+
+        public Boolean getMimeDecodeHeaders() {
+            return mimeDecodeHeaders;
+        }
+
+        public void setMimeDecodeHeaders(Boolean mimeDecodeHeaders) {
+            this.mimeDecodeHeaders = mimeDecodeHeaders;
+        }
     }
 }
\ No newline at end of file

Reply via email to