You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/04/13 16:24:26 UTC

[2/3] camel git commit: Add component documentation.

Add component documentation.


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

Branch: refs/heads/camel-2.15.x
Commit: 232d90ac2c2711b1e64495ac9e1c3a6afa2487a4
Parents: 89c987f
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Apr 13 16:04:53 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 13 16:27:08 2015 +0200

----------------------------------------------------------------------
 .../camel/component/mail/MailComponent.java     |  3 ++
 .../camel/component/mail/MailConfiguration.java |  9 ++++++
 .../camel/component/mail/MailEndpoint.java      | 31 +++++++++++++-------
 3 files changed, 32 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/232d90ac/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
index 9154818..693d686 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
@@ -118,6 +118,9 @@ public class MailComponent extends UriEndpointComponent {
         return contentTypeResolver;
     }
 
+    /**
+     * Resolver to determine Content-Type for file attachments.
+     */
     public void setContentTypeResolver(ContentTypeResolver contentTypeResolver) {
         this.contentTypeResolver = contentTypeResolver;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/232d90ac/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
index 794ebf6..a2d61ca 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
@@ -531,6 +531,9 @@ public class MailConfiguration implements Cloneable {
         return dummyTrustManager;
     }
 
+    /**
+     * To use a dummy security setting for trusting all certificates. Should only be used for development mode, and not production.
+     */
     public void setDummyTrustManager(boolean dummyTrustManager) {
         this.dummyTrustManager = dummyTrustManager;
     }
@@ -563,6 +566,9 @@ public class MailConfiguration implements Cloneable {
         return useInlineAttachments;
     }
 
+    /**
+     * Whether to use disposition inline or attachment.
+     */
     public void setUseInlineAttachments(boolean useInlineAttachments) {
         this.useInlineAttachments = useInlineAttachments;
     }
@@ -607,6 +613,9 @@ public class MailConfiguration implements Cloneable {
         return sslContextParameters;
     }
 
+    /**
+     * To configure security using SSLContextParameters.
+     */
     public void setSslContextParameters(SSLContextParameters sslContextParameters) {
         this.sslContextParameters = sslContextParameters;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/232d90ac/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
index 5eb5783..2ab1ce5 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
@@ -158,6 +158,9 @@ public class MailEndpoint extends ScheduledPollEndpoint {
         return configuration;
     }
 
+    /**
+     * Sets the Mail configuration
+     */
     public void setConfiguration(MailConfiguration configuration) {
         this.configuration = configuration;
     }
@@ -166,6 +169,9 @@ public class MailEndpoint extends ScheduledPollEndpoint {
         return headerFilterStrategy;
     }
 
+    /**
+     * To use a custom {@link org.apache.camel.spi.HeaderFilterStrategy} to filter headers.
+     */
     public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy) {
         this.headerFilterStrategy = headerFilterStrategy;
     }
@@ -174,6 +180,9 @@ public class MailEndpoint extends ScheduledPollEndpoint {
         return contentTypeResolver;
     }
 
+    /**
+     * Resolver to determine Content-Type for file attachments.
+     */
     public void setContentTypeResolver(ContentTypeResolver contentTypeResolver) {
         this.contentTypeResolver = contentTypeResolver;
     }
@@ -182,6 +191,11 @@ public class MailEndpoint extends ScheduledPollEndpoint {
         return maxMessagesPerPoll;
     }
 
+    /**
+     * 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.
+     */
     public void setMaxMessagesPerPoll(int maxMessagesPerPoll) {
         this.maxMessagesPerPoll = maxMessagesPerPoll;
     }
@@ -190,36 +204,31 @@ public class MailEndpoint extends ScheduledPollEndpoint {
         return searchTerm;
     }
 
+    /**
+     * Refers to a {@link javax.mail.search.SearchTerm} which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc.
+     */
     public void setSearchTerm(SearchTerm searchTerm) {
         this.searchTerm = searchTerm;
     }
 
-    /**
-     * @return Sorting order for messages. Only natively supported for IMAP. Emulated to some degree when using POP3
-     * or when IMAP server does not have the SORT capability.
-     * @see com.sun.mail.imap.SortTerm
-     */
     public SortTerm[] getSortTerm() {
         return sortTerm == null ? null : sortTerm.clone();
     }
 
     /**
-     * @param sortTerm {@link #getSortTerm()}
+     * Sorting order for messages. Only natively supported for IMAP. Emulated to some degree when using POP3
+     * or when IMAP server does not have the SORT capability.
      */
     public void setSortTerm(SortTerm[] sortTerm) {
         this.sortTerm = sortTerm == null ? null : sortTerm.clone();
     }
 
-    /**
-     * @return Post processor that can e.g. delete old email. Gets called once the messages have been polled and
-     * processed.
-     */
     public MailBoxPostProcessAction getPostProcessAction() {
         return postProcessAction;
     }
 
     /**
-     * @param postProcessAction {@link #getPostProcessAction()}
+     * Refers to an {@link MailBoxPostProcessAction} for doing post processing tasks on the mailbox once the normal processing ended.
      */
     public void setPostProcessAction(MailBoxPostProcessAction postProcessAction) {
         this.postProcessAction = postProcessAction;