You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/01/12 09:22:53 UTC

[camel] 01/02: (chores) camel-rest: removed deprecated option

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

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

commit 19358a63279e75cbadde97b32c313feb6798e43e
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jan 10 13:24:50 2023 +0100

    (chores) camel-rest: removed deprecated option
---
 .../org/apache/camel/catalog/components/rest.json  |  1 -
 .../component/rest/RestComponentConfigurer.java    |  6 ------
 .../org/apache/camel/component/rest/rest.json      |  1 -
 .../apache/camel/component/rest/RestComponent.java | 21 ---------------------
 .../ROOT/pages/camel-3x-upgrade-guide-3_21.adoc    |  4 ++++
 .../dsl/RestEndpointComponentBuilderFactory.java   | 22 ----------------------
 6 files changed, 4 insertions(+), 51 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json
index b05d3f739d9..7ac6a930256 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest.json
@@ -26,7 +26,6 @@
     "bridgeErrorHandler": { "kind": "property", "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 me [...]
     "consumerComponentName": { "kind": "property", "displayName": "Consumer Component Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel Rest component to use for the consumer REST transport, such as jetty, servlet, undertow. If no component has been explicitly configured, then Camel will lookup if there is a Camel component that integrate [...]
     "apiDoc": { "kind": "property", "displayName": "Api Doc", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The swagger api doc resource to use. The resource is loaded from classpath by default and must be in JSON format." },
-    "componentName": { "kind": "property", "displayName": "Component Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "The Camel Rest component to use for the producer REST transport, such as http, undertow. If no component has been explicitly configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a [...]
     "host": { "kind": "property", "displayName": "Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Host and port of HTTP service to use (override host in swagger schema)" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
     "producerComponentName": { "kind": "property", "displayName": "Producer Component Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel Rest component to use for the producer REST transport, such as http, undertow. If no component has been explicitly configured, then Camel will lookup if there is a Camel component that integrates with the [...]
diff --git a/components/camel-rest/src/generated/java/org/apache/camel/component/rest/RestComponentConfigurer.java b/components/camel-rest/src/generated/java/org/apache/camel/component/rest/RestComponentConfigurer.java
index a49723e27aa..0302f752692 100644
--- a/components/camel-rest/src/generated/java/org/apache/camel/component/rest/RestComponentConfigurer.java
+++ b/components/camel-rest/src/generated/java/org/apache/camel/component/rest/RestComponentConfigurer.java
@@ -27,8 +27,6 @@ public class RestComponentConfigurer extends PropertyConfigurerSupport implement
         case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
-        case "componentname":
-        case "componentName": target.setComponentName(property(camelContext, java.lang.String.class, value)); return true;
         case "consumercomponentname":
         case "consumerComponentName": target.setConsumerComponentName(property(camelContext, java.lang.String.class, value)); return true;
         case "host": target.setHost(property(camelContext, java.lang.String.class, value)); return true;
@@ -49,8 +47,6 @@ public class RestComponentConfigurer extends PropertyConfigurerSupport implement
         case "autowiredEnabled": return boolean.class;
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": return boolean.class;
-        case "componentname":
-        case "componentName": return java.lang.String.class;
         case "consumercomponentname":
         case "consumerComponentName": return java.lang.String.class;
         case "host": return java.lang.String.class;
@@ -72,8 +68,6 @@ public class RestComponentConfigurer extends PropertyConfigurerSupport implement
         case "autowiredEnabled": return target.isAutowiredEnabled();
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": return target.isBridgeErrorHandler();
-        case "componentname":
-        case "componentName": return target.getComponentName();
         case "consumercomponentname":
         case "consumerComponentName": return target.getConsumerComponentName();
         case "host": return target.getHost();
diff --git a/components/camel-rest/src/generated/resources/org/apache/camel/component/rest/rest.json b/components/camel-rest/src/generated/resources/org/apache/camel/component/rest/rest.json
index b05d3f739d9..7ac6a930256 100644
--- a/components/camel-rest/src/generated/resources/org/apache/camel/component/rest/rest.json
+++ b/components/camel-rest/src/generated/resources/org/apache/camel/component/rest/rest.json
@@ -26,7 +26,6 @@
     "bridgeErrorHandler": { "kind": "property", "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 me [...]
     "consumerComponentName": { "kind": "property", "displayName": "Consumer Component Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel Rest component to use for the consumer REST transport, such as jetty, servlet, undertow. If no component has been explicitly configured, then Camel will lookup if there is a Camel component that integrate [...]
     "apiDoc": { "kind": "property", "displayName": "Api Doc", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The swagger api doc resource to use. The resource is loaded from classpath by default and must be in JSON format." },
-    "componentName": { "kind": "property", "displayName": "Component Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "The Camel Rest component to use for the producer REST transport, such as http, undertow. If no component has been explicitly configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a [...]
     "host": { "kind": "property", "displayName": "Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Host and port of HTTP service to use (override host in swagger schema)" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
     "producerComponentName": { "kind": "property", "displayName": "Producer Component Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel Rest component to use for the producer REST transport, such as http, undertow. If no component has been explicitly configured, then Camel will lookup if there is a Camel component that integrates with the [...]
diff --git a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestComponent.java b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestComponent.java
index 1353e191da0..8b63431b457 100644
--- a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestComponent.java
+++ b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestComponent.java
@@ -38,9 +38,6 @@ public class RestComponent extends DefaultComponent {
 
     public static final String DEFAULT_REST_CONFIGURATION_ID = "rest-configuration";
 
-    @Deprecated
-    @Metadata(label = "producer")
-    private String componentName;
     @Metadata(label = "consumer")
     private String consumerComponentName;
     @Metadata(label = "producer")
@@ -167,24 +164,6 @@ public class RestComponent extends DefaultComponent {
         this.producerComponentName = producerComponentName;
     }
 
-    @Deprecated
-    public String getComponentName() {
-        return producerComponentName;
-    }
-
-    /**
-     * The Camel Rest component to use for the producer REST transport, such as http, undertow. If no component has been
-     * explicitly configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or
-     * if a org.apache.camel.spi.RestProducerFactory is registered in the registry. If either one is found, then that is
-     * being used.
-     *
-     * @deprecated use producerComponentName instead
-     */
-    @Deprecated
-    public void setComponentName(String componentName) {
-        this.producerComponentName = componentName;
-    }
-
     public String getApiDoc() {
         return apiDoc;
     }
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
index aa982121bf6..1653c4740a0 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
@@ -95,6 +95,10 @@ The `camel-java-joor-dsl` cannot anymore load routes defined in class files as w
 
 The `certificatePath` parameter can now be specified as resource: for user pointing to a local certificate, the file should be now prefixed with `file:`. It's also possible to use the classic resource helper prefixes, like `classpath`, `https` etc.
 
+=== camel-rest
+
+The deprecated option `componentName` was removed. Please use either `producerComponentName` or `consumerComponentName`.
+
 === Deprecated Components
 
 The following components that had been marked as deprecated, were removed in this release:
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestEndpointComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestEndpointComponentBuilderFactory.java
index 41a41879a76..74b26f04a05 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestEndpointComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestEndpointComponentBuilderFactory.java
@@ -107,27 +107,6 @@ public interface RestEndpointComponentBuilderFactory {
             doSetProperty("apiDoc", apiDoc);
             return this;
         }
-        /**
-         * The Camel Rest component to use for the producer REST transport, such
-         * as http, undertow. If no component has been explicitly configured,
-         * then Camel will lookup if there is a Camel component that integrates
-         * with the Rest DSL, or if a org.apache.camel.spi.RestProducerFactory
-         * is registered in the registry. If either one is found, then that is
-         * being used.
-         * 
-         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
-         * 
-         * Group: producer
-         * 
-         * @param componentName the value to set
-         * @return the dsl builder
-         */
-        @Deprecated
-        default RestEndpointComponentBuilder componentName(
-                java.lang.String componentName) {
-            doSetProperty("componentName", componentName);
-            return this;
-        }
         /**
          * Host and port of HTTP service to use (override host in swagger
          * schema).
@@ -228,7 +207,6 @@ public interface RestEndpointComponentBuilderFactory {
             case "bridgeErrorHandler": ((RestComponent) component).setBridgeErrorHandler((boolean) value); return true;
             case "consumerComponentName": ((RestComponent) component).setConsumerComponentName((java.lang.String) value); return true;
             case "apiDoc": ((RestComponent) component).setApiDoc((java.lang.String) value); return true;
-            case "componentName": ((RestComponent) component).setComponentName((java.lang.String) value); return true;
             case "host": ((RestComponent) component).setHost((java.lang.String) value); return true;
             case "lazyStartProducer": ((RestComponent) component).setLazyStartProducer((boolean) value); return true;
             case "producerComponentName": ((RestComponent) component).setProducerComponentName((java.lang.String) value); return true;