You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/10/04 08:10:07 UTC

[camel] branch camel-3.11.x updated (618f0b6 -> baef424)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch camel-3.11.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 618f0b6  CAMEL-17031 - Performances/Profiling: Avoid boolean allocation in EventHelper (#6194)
     new 0e43dc9  CAMEL-17034 - Camel-Github: StartingSha should be an URI param and not an URI path
     new baef424  CAMEL-17034 - Camel-Github: StartingSha should be an URI param and not an URI path

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../component/github/GitHubEndpointConfigurer.java |  6 ++++
 .../component/github/GitHubEndpointUriFactory.java |  1 -
 .../org/apache/camel/component/github/github.json  |  2 +-
 .../camel/component/github/GitHubEndpoint.java     |  2 +-
 .../builder/endpoint/StaticEndpointBuilders.java   | 12 --------
 .../endpoint/dsl/GitHubEndpointBuilderFactory.java | 32 ++++++++++++----------
 6 files changed, 26 insertions(+), 29 deletions(-)

[camel] 01/02: CAMEL-17034 - Camel-Github: StartingSha should be an URI param and not an URI path

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-3.11.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0e43dc9cad9dafe757e0a46ded4d2a7a8485c80e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Oct 4 10:07:17 2021 +0200

    CAMEL-17034 - Camel-Github: StartingSha should be an URI param and not an URI path
---
 .../src/main/java/org/apache/camel/component/github/GitHubEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubEndpoint.java b/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubEndpoint.java
index 0233c73..ad2465a 100644
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubEndpoint.java
+++ b/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubEndpoint.java
@@ -69,7 +69,7 @@ public class GitHubEndpoint extends ScheduledPollEndpoint {
     private GitHubType type;
     @UriPath(label = "consumer")
     private String branchName;
-    @UriPath(label = "consumer", defaultValue = "last")
+    @UriParam(label = "consumer", defaultValue = "last")
     private String startingSha = "last";
     @UriParam(label = "security", secret = true)
     private String oauthToken;

[camel] 02/02: CAMEL-17034 - Camel-Github: StartingSha should be an URI param and not an URI path

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-3.11.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit baef4240481b0a35952270687a03b52926b4b9d3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Oct 4 10:08:40 2021 +0200

    CAMEL-17034 - Camel-Github: StartingSha should be an URI param and not an URI path
---
 .../component/github/GitHubEndpointConfigurer.java |  6 ++++
 .../component/github/GitHubEndpointUriFactory.java |  1 -
 .../org/apache/camel/component/github/github.json  |  2 +-
 .../builder/endpoint/StaticEndpointBuilders.java   | 12 --------
 .../endpoint/dsl/GitHubEndpointBuilderFactory.java | 32 ++++++++++++----------
 5 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointConfigurer.java b/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointConfigurer.java
index 7bb1bf7..6c52bbb 100644
--- a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointConfigurer.java
+++ b/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointConfigurer.java
@@ -63,6 +63,8 @@ public class GitHubEndpointConfigurer extends PropertyConfigurerSupport implemen
         case "sendEmptyMessageWhenIdle": target.setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
         case "startscheduler":
         case "startScheduler": target.setStartScheduler(property(camelContext, boolean.class, value)); return true;
+        case "startingsha":
+        case "startingSha": target.setStartingSha(property(camelContext, java.lang.String.class, value)); return true;
         case "state": target.setState(property(camelContext, java.lang.String.class, value)); return true;
         case "targeturl":
         case "targetUrl": target.setTargetUrl(property(camelContext, java.lang.String.class, value)); return true;
@@ -119,6 +121,8 @@ public class GitHubEndpointConfigurer extends PropertyConfigurerSupport implemen
         case "sendEmptyMessageWhenIdle": return boolean.class;
         case "startscheduler":
         case "startScheduler": return boolean.class;
+        case "startingsha":
+        case "startingSha": return java.lang.String.class;
         case "state": return java.lang.String.class;
         case "targeturl":
         case "targetUrl": return java.lang.String.class;
@@ -176,6 +180,8 @@ public class GitHubEndpointConfigurer extends PropertyConfigurerSupport implemen
         case "sendEmptyMessageWhenIdle": return target.isSendEmptyMessageWhenIdle();
         case "startscheduler":
         case "startScheduler": return target.isStartScheduler();
+        case "startingsha":
+        case "startingSha": return target.getStartingSha();
         case "state": return target.getState();
         case "targeturl":
         case "targetUrl": return target.getTargetUrl();
diff --git a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointUriFactory.java b/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointUriFactory.java
index 0e9021d..f5f9c96 100644
--- a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointUriFactory.java
+++ b/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointUriFactory.java
@@ -71,7 +71,6 @@ public class GitHubEndpointUriFactory extends org.apache.camel.support.component
 
         uri = buildPathParameter(syntax, uri, "type", null, true, copy);
         uri = buildPathParameter(syntax, uri, "branchName", null, false, copy);
-        uri = buildPathParameter(syntax, uri, "startingSha", "last", false, copy);
         uri = buildQueryParameters(uri, copy, encode);
         return uri;
     }
diff --git a/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json b/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json
index b37592d..876c870 100644
--- a/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json
+++ b/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json
@@ -30,11 +30,11 @@
   "properties": {
     "type": { "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.github.GitHubType", "enum": [ "CLOSEPULLREQUEST", "PULLREQUESTCOMMENT", "COMMIT", "PULLREQUEST", "TAG", "PULLREQUESTSTATE", "PULLREQUESTFILES", "GETCOMMITFILE", "CREATEISSUE", "EVENT" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What git operation to execute" },
     "branchName": { "kind": "path", "displayName": "Branch Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of branch" },
-    "startingSha": { "kind": "path", "displayName": "Starting Sha", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "last", "description": "The starting sha to use for polling commits with the commit consumer. The value can either be a sha for the sha to start from, or use beginning to start from the beginning, or last to start from the last commit." },
     "repoName": { "kind": "parameter", "displayName": "Repo Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "GitHub repository name" },
     "repoOwner": { "kind": "parameter", "displayName": "Repo Owner", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "GitHub repository owner (organization)" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
     "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." },
+    "startingSha": { "kind": "parameter", "displayName": "Starting Sha", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "last", "description": "The starting sha to use for polling commits with the commit consumer. The value can either be a sha for the sha to start from, or use beginning to start from the beginning, or last to start from the last commit." },
     "eventFetchStrategy": { "kind": "parameter", "displayName": "Event Fetch Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.github.event.GitHubEventFetchStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To specify a custom strategy that configures how the EventsConsumer fetches events." },
     "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...]
     "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 7798495..91d5a7c 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -5235,12 +5235,6 @@ public class StaticEndpointBuilders {
      * Path parameter: branchName
      * Name of branch
      * 
-     * Path parameter: startingSha
-     * The starting sha to use for polling commits with the commit consumer. The
-     * value can either be a sha for the sha to start from, or use beginning to
-     * start from the beginning, or last to start from the last commit.
-     * Default value: last
-     * 
      * @param path type/branchName
      * @return the dsl builder
      */
@@ -5267,12 +5261,6 @@ public class StaticEndpointBuilders {
      * Path parameter: branchName
      * Name of branch
      * 
-     * Path parameter: startingSha
-     * The starting sha to use for polling commits with the commit consumer. The
-     * value can either be a sha for the sha to start from, or use beginning to
-     * start from the beginning, or last to start from the last commit.
-     * Default value: last
-     * 
      * @param componentName to use a custom component name for the endpoint
      * instead of the default name
      * @param path type/branchName
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java
index a3414ee..336b64c 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java
@@ -157,6 +157,24 @@ public interface GitHubEndpointBuilderFactory {
             return this;
         }
         /**
+         * The starting sha to use for polling commits with the commit consumer.
+         * The value can either be a sha for the sha to start from, or use
+         * beginning to start from the beginning, or last to start from the last
+         * commit.
+         * 
+         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
+         * 
+         * Default: last
+         * Group: consumer
+         * 
+         * @param startingSha the value to set
+         * @return the dsl builder
+         */
+        default GitHubEndpointConsumerBuilder startingSha(String startingSha) {
+            doSetProperty("startingSha", startingSha);
+            return this;
+        }
+        /**
          * The number of subsequent error polls (failed due some error) that
          * should happen before the backoffMultipler should kick-in.
          * 
@@ -1049,13 +1067,6 @@ public interface GitHubEndpointBuilderFactory {
          * Path parameter: branchName
          * Name of branch
          * 
-         * Path parameter: startingSha
-         * The starting sha to use for polling commits with the commit consumer.
-         * The value can either be a sha for the sha to start from, or use
-         * beginning to start from the beginning, or last to start from the last
-         * commit.
-         * Default value: last
-         * 
          * @param path type/branchName
          * @return the dsl builder
          */
@@ -1081,13 +1092,6 @@ public interface GitHubEndpointBuilderFactory {
          * Path parameter: branchName
          * Name of branch
          * 
-         * Path parameter: startingSha
-         * The starting sha to use for polling commits with the commit consumer.
-         * The value can either be a sha for the sha to start from, or use
-         * beginning to start from the beginning, or last to start from the last
-         * commit.
-         * Default value: last
-         * 
          * @param componentName to use a custom component name for the endpoint
          * instead of the default name
          * @param path type/branchName