Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 364b8da94 -> d408674e4


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/d408674e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d408674e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d408674e

Branch: refs/heads/camel-2.15.x
Commit: d408674e4a168ba2a2dca0c7664f224ffa1ee62e
Parents: 364b8da
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Apr 14 13:52:02 2015 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Apr 14 14:42:45 2015 +0200

----------------------------------------------------------------------
 .../bean/validator/BeanValidatorEndpoint.java   | 17 ++++-
 .../freemarker/FreemarkerComponent.java         |  5 +-
 .../camel/component/jdbc/JdbcComponent.java     |  3 +
 .../camel/component/jdbc/JdbcEndpoint.java      | 35 ++++++++-
 .../camel/component/jpa/JpaComponent.java       | 27 +++++--
 .../apache/camel/component/jpa/JpaEndpoint.java | 75 ++++++++++++++++----
 .../component/mustache/MustacheComponent.java   |  3 +
 .../component/mustache/MustacheEndpoint.java    | 16 ++++-
 .../component/mybatis/MyBatisComponent.java     |  8 +++
 .../component/mybatis/MyBatisEndpoint.java      | 15 ++--
 10 files changed, 174 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorEndpoint.java
 
b/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorEndpoint.java
index 6d4d63f..7faaab4 100644
--- 
a/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorEndpoint.java
+++ 
b/components/camel-bean-validator/src/main/java/org/apache/camel/component/bean/validator/BeanValidatorEndpoint.java
@@ -40,7 +40,7 @@ public class BeanValidatorEndpoint extends DefaultEndpoint {
 
     @UriPath(description = "Where label is an arbitrary text value describing 
the endpoint") @Metadata(required = "true")
     private String label;
-    @UriParam
+    @UriParam(defaultValue = "javax.validation.groups.Default")
     private String group;
     @UriParam
     private ValidationProviderResolver validationProviderResolver;
@@ -98,6 +98,9 @@ public class BeanValidatorEndpoint extends DefaultEndpoint {
         return group;
     }
 
+    /**
+     * To use a custom validation group
+     */
     public void setGroup(String group) {
         this.group = group;
     }
@@ -106,6 +109,9 @@ public class BeanValidatorEndpoint extends DefaultEndpoint {
         return validationProviderResolver;
     }
 
+    /**
+     * To use a a custom {@link ValidationProviderResolver}
+     */
     public void setValidationProviderResolver(ValidationProviderResolver 
validationProviderResolver) {
         this.validationProviderResolver = validationProviderResolver;
     }
@@ -114,6 +120,9 @@ public class BeanValidatorEndpoint extends DefaultEndpoint {
         return messageInterpolator;
     }
 
+    /**
+     * To use a custom {@link MessageInterpolator}
+     */
     public void setMessageInterpolator(MessageInterpolator 
messageInterpolator) {
         this.messageInterpolator = messageInterpolator;
     }
@@ -122,6 +131,9 @@ public class BeanValidatorEndpoint extends DefaultEndpoint {
         return traversableResolver;
     }
 
+    /**
+     * To use a custom {@link TraversableResolver}
+     */
     public void setTraversableResolver(TraversableResolver 
traversableResolver) {
         this.traversableResolver = traversableResolver;
     }
@@ -130,6 +142,9 @@ public class BeanValidatorEndpoint extends DefaultEndpoint {
         return constraintValidatorFactory;
     }
 
+    /**
+     * To use a custom {@link ConstraintValidatorFactory}
+     */
     public void setConstraintValidatorFactory(ConstraintValidatorFactory 
constraintValidatorFactory) {
         this.constraintValidatorFactory = constraintValidatorFactory;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java
 
b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java
index fe46555..a81096c 100644
--- 
a/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java
+++ 
b/components/camel-freemarker/src/main/java/org/apache/camel/component/freemarker/FreemarkerComponent.java
@@ -71,7 +71,7 @@ public class FreemarkerComponent extends UriEndpointComponent 
{
 
     public synchronized Configuration getConfiguration() {
         if (configuration == null) {
-            configuration = new Configuration();
+            configuration = new Configuration(Configuration.VERSION_2_3_21);
             configuration.setTemplateLoader(new URLTemplateLoader() {
                 @Override
                 protected URL getURL(String name) {
@@ -88,6 +88,9 @@ public class FreemarkerComponent extends UriEndpointComponent 
{
         return (Configuration) configuration.clone();
     }
 
+    /**
+     * To use an existing {@link freemarker.template.Configuration} instance 
as the configuration.
+     */
     public void setConfiguration(Configuration configuration) {
         this.configuration = configuration;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcComponent.java
 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcComponent.java
index 663836b..9e6d990 100755
--- 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcComponent.java
+++ 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcComponent.java
@@ -59,6 +59,9 @@ public class JdbcComponent extends UriEndpointComponent {
         return jdbc;
     }
 
+    /**
+     * To use the {@link DataSource} instance instead of looking up the data 
source by name from the registry.
+     */
     public void setDataSource(DataSource dataSource) {
         this.ds = dataSource;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
index ff77f51..84fd696 100755
--- 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
+++ 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
@@ -82,6 +82,9 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return readSize;
     }
 
+    /**
+     * The default maximum number of rows that can be read by a polling query. 
The default value is 0.
+     */
     public void setReadSize(int readSize) {
         this.readSize = readSize;
     }
@@ -90,6 +93,9 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return transacted;
     }
 
+    /**
+     * Whether transactions are in use.
+     */
     public void setTransacted(boolean transacted) {
         this.transacted = transacted;
     }
@@ -98,6 +104,12 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return resetAutoCommit;
     }
 
+    /**
+     * Camel will set the autoCommit on the JDBC connection to be false, 
commit the change after executed the statement and reset
+     * the autoCommit flag of the connection at the end, if the 
resetAutoCommit is true. If the JDBC connection doesn't support
+     * to reset the autoCommit flag, you can set the resetAutoCommit flag to 
be false, and Camel will not try to reset the autoCommit flag.
+     * When used with XA transactions you most likely need to set it to false 
so that the transaction manager is in charge of committing this tx.
+     */
     public void setResetAutoCommit(boolean resetAutoCommit) {
         this.resetAutoCommit = resetAutoCommit;
     }
@@ -141,8 +153,7 @@ public class JdbcEndpoint extends DefaultEndpoint {
      * <p/>
      * This option is default <tt>true</tt>.
      *
-     * @param useJDBC4ColumnNameAndLabelSemantics
-     *         <tt>true</tt> to use JDBC 4.0 semantics, <tt>false</tt> to use 
JDBC 3.0.
+     * @param useJDBC4ColumnNameAndLabelSemantics <tt>true</tt> to use JDBC 
4.0 semantics, <tt>false</tt> to use JDBC 3.0.
      */
     public void setUseJDBC4ColumnNameAndLabelSemantics(boolean 
useJDBC4ColumnNameAndLabelSemantics) {
         this.useJDBC4ColumnNameAndLabelSemantics = 
useJDBC4ColumnNameAndLabelSemantics;
@@ -152,6 +163,9 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return prepareStatementStrategy;
     }
 
+    /**
+     * Allows to plugin to use a custom 
org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy to control 
preparation of the query and prepared statement.
+     */
     public void setPrepareStatementStrategy(JdbcPrepareStatementStrategy 
prepareStatementStrategy) {
         this.prepareStatementStrategy = prepareStatementStrategy;
     }
@@ -160,6 +174,9 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return allowNamedParameters;
     }
 
+    /**
+     * Whether to allow using named parameters in the queries.
+     */
     public void setAllowNamedParameters(boolean allowNamedParameters) {
         this.allowNamedParameters = allowNamedParameters;
     }
@@ -168,6 +185,10 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return useHeadersAsParameters;
     }
 
+    /**
+     * Set this option to true to use the prepareStatementStrategy with named 
parameters.
+     * This allows to define queries with named placeholders, and use headers 
with the dynamic values for the query placeholders.
+     */
     public void setUseHeadersAsParameters(boolean useHeadersAsParameters) {
         this.useHeadersAsParameters = useHeadersAsParameters;
     }
@@ -176,6 +197,9 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return outputType;
     }
 
+    /**
+     * Determines the output the producer should use.
+     */
     public void setOutputType(JdbcOutputType outputType) {
         this.outputType = outputType;
     }
@@ -184,6 +208,9 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return outputClass;
     }
 
+    /**
+     * Specify the full package and class name to use as conversion when 
outputType=SelectOne or SelectList.
+     */
     public void setOutputClass(String outputClass) {
         this.outputClass = outputClass;
     }
@@ -192,6 +219,10 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return beanRowMapper;
     }
 
+    /**
+     * To use a custom org.apache.camel.component.jdbc.BeanRowMapper when 
using outputClass.
+     * The default implementation will lower case the row names and skip 
underscores, and dashes. For example "CUST_ID" is mapped as "custId".
+     */
     public void setBeanRowMapper(BeanRowMapper beanRowMapper) {
         this.beanRowMapper = beanRowMapper;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
 
b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
index c59b48a..73416e2 100644
--- 
a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
+++ 
b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
@@ -48,6 +48,9 @@ public class JpaComponent extends UriEndpointComponent {
         return entityManagerFactory;
     }
 
+    /**
+     * To use the {@link EntityManagerFactory}. This is strongly recommended 
to configure.
+     */
     public void setEntityManagerFactory(EntityManagerFactory 
entityManagerFactory) {
         this.entityManagerFactory = entityManagerFactory;
     }
@@ -56,10 +59,27 @@ public class JpaComponent extends UriEndpointComponent {
         return transactionManager;
     }
 
+    /**
+     * To use the {@link PlatformTransactionManager} for managing transactions.
+     */
     public void setTransactionManager(PlatformTransactionManager 
transactionManager) {
         this.transactionManager = transactionManager;
     }
 
+    public boolean isJoinTransaction() {
+        return joinTransaction;
+    }
+
+    /**
+     * The camel-jpa component will join transaction by default.
+     * You can use this option to turn this off, for example if you use 
LOCAL_RESOURCE and join transaction
+     * doesn't work with your JPA provider. This option can also be set 
globally on the JpaComponent,
+     * instead of having to set it on all endpoints.
+     */
+    public void setJoinTransaction(boolean joinTransaction) {
+        this.joinTransaction = joinTransaction;
+    }
+
     // Implementation methods
     //-------------------------------------------------------------------------
 
@@ -139,11 +159,4 @@ public class JpaComponent extends UriEndpointComponent {
         }
     }
 
-    public boolean isJoinTransaction() {
-        return joinTransaction;
-    }
-
-    public void setJoinTransaction(boolean joinTransaction) {
-        this.joinTransaction = joinTransaction;
-    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
 
b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
index 88717ef..578689f 100644
--- 
a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
+++ 
b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
@@ -47,28 +47,29 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
 
     private EntityManagerFactory entityManagerFactory;
     private PlatformTransactionManager transactionManager;
+    private Expression producerExpression;
+    private Map<String, Object> entityManagerProperties;
 
     @UriPath(description = "Entity class name") @Metadata(required = "true")
     private Class<?> entityType;
-    @UriParam(defaultValue = "camel")
+    @UriParam(defaultValue = "camel") @Metadata(required = "true")
     private String persistenceUnit = "camel";
-    private Expression producerExpression;
-    @UriParam(defaultValue = "-1")
-    private int maximumResults = -1;
-    private Map<String, Object> entityManagerProperties;
     @UriParam(defaultValue = "true")
+    private boolean joinTransaction = true;
+    @UriParam(label = "consumer", defaultValue = "-1")
+    private int maximumResults = -1;
+    @UriParam(label = "consumer", defaultValue = "true")
     private boolean consumeDelete = true;
-    @UriParam(defaultValue = "true")
+    @UriParam(label = "consumer", defaultValue = "true")
     private boolean consumeLockEntity = true;
-    @UriParam(defaultValue = "true")
-    private boolean flushOnSend = true;
-    @UriParam
+    @UriParam(label = "consumer")
     private int maxMessagesPerPoll;
-    @UriParam
+
+    @UriParam(label = "producer", defaultValue = "true")
+    private boolean flushOnSend = true;
+    @UriParam(label = "producer")
     private boolean usePersist;
-    @UriParam(defaultValue = "true")
-    private boolean joinTransaction = true;
-    @UriParam
+    @UriParam(label = "producer")
     private boolean usePassedInEntityManager;
 
     public JpaEndpoint() {
@@ -156,6 +157,9 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return maximumResults;
     }
 
+    /**
+     * Set the maximum number of results to retrieve on the Query.
+     */
     public void setMaximumResults(int maximumResults) {
         this.maximumResults = maximumResults;
     }
@@ -164,6 +168,9 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return entityType;
     }
 
+    /**
+     * The JPA annotated class to use as entity.
+     */
     public void setEntityType(Class<?> entityType) {
         this.entityType = entityType;
     }
@@ -175,6 +182,9 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return entityManagerFactory;
     }
 
+    /**
+     * The {@link EntityManagerFactory} to use.
+     */
     public void setEntityManagerFactory(EntityManagerFactory 
entityManagerFactory) {
         this.entityManagerFactory = entityManagerFactory;
     }
@@ -186,10 +196,16 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return transactionManager;
     }
 
+    /**
+     * To use the {@link PlatformTransactionManager} for managing transactions.
+     */
     public void setTransactionManager(PlatformTransactionManager 
transactionManager) {
         this.transactionManager = transactionManager;
     }
 
+    /**
+     * Additional properties for the entity manager to use.
+     */
     public Map<String, Object> getEntityManagerProperties() {
         if (entityManagerProperties == null) {
             entityManagerProperties = CastUtils.cast(System.getProperties());
@@ -205,6 +221,9 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return persistenceUnit;
     }
 
+    /**
+     * The JPA persistence unit used by default.
+     */
     public void setPersistenceUnit(String persistenceUnit) {
         this.persistenceUnit = persistenceUnit;
     }
@@ -213,6 +232,9 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return consumeDelete;
     }
 
+    /**
+     * If true, the entity is deleted after it is consumed; if false, the 
entity is not deleted.
+     */
     public void setConsumeDelete(boolean consumeDelete) {
         this.consumeDelete = consumeDelete;
     }
@@ -221,6 +243,9 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return consumeLockEntity;
     }
 
+    /**
+     * Specifies whether or not to set an exclusive lock on each entity bean 
while processing the results from polling.
+     */
     public void setConsumeLockEntity(boolean consumeLockEntity) {
         this.consumeLockEntity = consumeLockEntity;
     }
@@ -229,6 +254,9 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return flushOnSend;
     }
 
+    /**
+     * Flushes the EntityManager after the entity bean has been persisted.
+     */
     public void setFlushOnSend(boolean flushOnSend) {
         this.flushOnSend = flushOnSend;
     }
@@ -237,6 +265,11 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return maxMessagesPerPoll;
     }
 
+    /**
+     * An integer value to define the maximum number of messages to gather per 
poll.
+     * By default, no maximum is set. Can be used to avoid polling many 
thousands of messages when starting up the server.
+     * Set a value of 0 or negative to disable.
+     */
     public void setMaxMessagesPerPoll(int maxMessagesPerPoll) {
         this.maxMessagesPerPoll = maxMessagesPerPoll;
     }
@@ -245,6 +278,11 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return usePersist;
     }
 
+    /**
+     * Indicates to use entityManager.persist(entity) instead of 
entityManager.merge(entity).
+     * Note: entityManager.persist(entity) doesn't work for detached entities
+     * (where the EntityManager has to execute an UPDATE instead of an INSERT 
query)!
+     */
     public void setUsePersist(boolean usePersist) {
         this.usePersist = usePersist;
     }
@@ -253,6 +291,12 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return joinTransaction;
     }
 
+    /**
+     * The camel-jpa component will join transaction by default.
+     * You can use this option to turn this off, for example if you use 
LOCAL_RESOURCE and join transaction
+     * doesn't work with your JPA provider. This option can also be set 
globally on the JpaComponent,
+     * instead of having to set it on all endpoints.
+     */
     public void setJoinTransaction(boolean joinTransaction) {
         this.joinTransaction = joinTransaction;
     }
@@ -261,6 +305,11 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return this.usePassedInEntityManager;
     }
 
+    /**
+     * If set to true, then Camel will use the EntityManager from the header
+     * JpaConstants.ENTITYMANAGER instead of the configured entity manager on 
the component/endpoint.
+     * This allows end users to control which entity manager will be in use.
+     */
     public void setUsePassedInEntityManager(boolean usePassedIn) {
         this.usePassedInEntityManager = usePassedIn;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheComponent.java
 
b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheComponent.java
index 7733221..5fcc4c9 100644
--- 
a/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheComponent.java
+++ 
b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheComponent.java
@@ -53,6 +53,9 @@ public class MustacheComponent extends UriEndpointComponent {
         return mustacheFactory;
     }
 
+    /**
+     * To use a custom {@link MustacheFactory}
+     */
     public void setMustacheFactory(MustacheFactory mustacheFactory) {
         this.mustacheFactory = mustacheFactory;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheEndpoint.java
 
b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheEndpoint.java
index b365f10..f48448d 100644
--- 
a/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheEndpoint.java
+++ 
b/components/camel-mustache/src/main/java/org/apache/camel/component/mustache/MustacheEndpoint.java
@@ -49,9 +49,9 @@ public class MustacheEndpoint extends ResourceEndpoint {
     private Mustache mustache;
     @UriParam
     private String encoding;
-    @UriParam
+    @UriParam(defaultValue = "{{")
     private String startDelimiter;
-    @UriParam
+    @UriParam(defaultValue = "}}")
     private String endDelimiter;
 
     public MustacheEndpoint() {
@@ -166,6 +166,9 @@ public class MustacheEndpoint extends ResourceEndpoint {
         return mustacheFactory;
     }
 
+    /**
+     * To use a custom {@link MustacheFactory}
+     */
     public void setMustacheFactory(MustacheFactory mustacheFactory) {
         this.mustacheFactory = mustacheFactory;
     }
@@ -174,6 +177,9 @@ public class MustacheEndpoint extends ResourceEndpoint {
         return encoding;
     }
 
+    /**
+     * Character encoding of the resource content.
+     */
     public void setEncoding(String encoding) {
         this.encoding = encoding;
     }
@@ -188,6 +194,9 @@ public class MustacheEndpoint extends ResourceEndpoint {
         return startDelimiter;
     }
 
+    /**
+     * Characters used to mark template code beginning.
+     */
     public void setStartDelimiter(String startDelimiter) {
         this.startDelimiter = startDelimiter;
     }
@@ -196,6 +205,9 @@ public class MustacheEndpoint extends ResourceEndpoint {
         return endDelimiter;
     }
 
+    /**
+     * Characters used to mark template code end.
+     */
     public void setEndDelimiter(String endDelimiter) {
         this.endDelimiter = endDelimiter;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
 
b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
index 4af9125..d0f260c 100644
--- 
a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
+++ 
b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
@@ -61,6 +61,9 @@ public class MyBatisComponent extends UriEndpointComponent {
         return sqlSessionFactory;
     }
 
+    /**
+     * To use the {@link SqlSessionFactory}
+     */
     public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
         this.sqlSessionFactory = sqlSessionFactory;
     }
@@ -69,6 +72,11 @@ public class MyBatisComponent extends UriEndpointComponent {
         return configurationUri;
     }
 
+    /**
+     * Location of MyBatis xml configuration file.
+     * <p/>
+     * The default value is: SqlMapConfig.xml loaded from the classpath
+     */
     public void setConfigurationUri(String configurationUri) {
         this.configurationUri = configurationUri;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d408674e/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java
 
b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java
index 09a2d85..e39ddb2 100644
--- 
a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java
+++ 
b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java
@@ -38,17 +38,18 @@ import org.apache.ibatis.session.SqlSessionFactory;
 public class MyBatisEndpoint extends DefaultPollingEndpoint {
 
     private MyBatisProcessingStrategy processingStrategy = new 
DefaultMyBatisProcessingStrategy();
-    private ExecutorType executorType;
     @UriPath @Metadata(required = "true")
     private String statement;
-    @UriParam
+    @UriParam(label = "producer")
     private StatementType statementType;
-    @UriParam
+    @UriParam(label = "consumer", defaultValue = "0")
     private int maxMessagesPerPoll;
     @UriParam
     private String outputHeader;
-    @UriParam
+    @UriParam(label = "consumer")
     private String inputHeader;
+    @UriParam(label = "producer", defaultValue = "SIMPLE")
+    private ExecutorType executorType;
 
     public MyBatisEndpoint() {
     }
@@ -139,6 +140,12 @@ public class MyBatisEndpoint extends 
DefaultPollingEndpoint {
         return maxMessagesPerPoll;
     }
 
+    /**
+     * This option is intended to split results returned by the database pool 
into the batches and deliver them in multiple exchanges.
+     * This integer defines the maximum messages to deliver in single 
exchange. By default, no maximum is set.
+     * Can be used to set a limit of e.g. 1000 to avoid when starting up the 
server that there are thousands of files.
+     * Set a value of 0 or negative to disable it.
+     */
     public void setMaxMessagesPerPoll(int maxMessagesPerPoll) {
         this.maxMessagesPerPoll = maxMessagesPerPoll;
     }

Reply via email to