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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit fc8dcb7d99dc752ce2844f314d935b75586c2873
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Feb 27 19:21:07 2023 +0100

    CAMEL-19090: Remove deprecated apis in core
---
 .../org/apache/camel/impl/DefaultCamelContext.java |  5 -----
 .../camel/impl/lw/LightweightCamelContext.java     |  5 -----
 .../org/apache/camel/model/ModelCamelContext.java  |  9 --------
 .../MainConfigurationPropertiesConfigurer.java     |  6 -----
 .../camel-main-configuration-metadata.json         |  1 -
 core/camel-main/src/main/docs/main.adoc            |  3 +--
 .../camel/main/DefaultConfigurationConfigurer.java |  3 ---
 .../camel/main/DefaultConfigurationProperties.java | 26 ----------------------
 .../main/MainSupervisingRouteControllerTest.java   |  2 +-
 9 files changed, 2 insertions(+), 58 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
 
b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index ca5adf8dc4a..b871278c21b 100644
--- 
a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ 
b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -996,11 +996,6 @@ public class DefaultCamelContext extends 
SimpleCamelContext implements ModelCame
         return model.getModelReifierFactory().createPredicate(this, 
definition);
     }
 
-    @Override
-    public RouteDefinition adviceWith(RouteDefinition definition, 
AdviceWithRouteBuilder builder) throws Exception {
-        return AdviceWith.adviceWith(definition, this, builder);
-    }
-
     @Override
     public void registerValidator(ValidatorDefinition def) {
         if (model == null && isLightweight()) {
diff --git 
a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
 
b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
index a035754b143..17d8ee7e391 100644
--- 
a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
+++ 
b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
@@ -1465,11 +1465,6 @@ public class LightweightCamelContext implements 
CamelContext, CatalogCamelContex
         return getModelCamelContext().createPredicate(definition);
     }
 
-    @Override
-    public RouteDefinition adviceWith(RouteDefinition definition, 
AdviceWithRouteBuilder builder) throws Exception {
-        return getModelCamelContext().adviceWith(definition, builder);
-    }
-
     @Override
     public void registerValidator(ValidatorDefinition validator) {
         getModelCamelContext().registerValidator(validator);
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/ModelCamelContext.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/ModelCamelContext.java
index f08736d5699..39e3c23f69d 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/ModelCamelContext.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/ModelCamelContext.java
@@ -52,15 +52,6 @@ public interface ModelCamelContext extends CamelContext, 
Model {
      */
     Predicate createPredicate(ExpressionDefinition definition);
 
-    /**
-     * Advices the route model with the advice with builder and returns the 
adviced route model
-     *
-     * @deprecated use
-     *             {@link 
org.apache.camel.builder.AdviceWith#adviceWith(RouteDefinition, CamelContext, 
RouteBuilder)}
-     */
-    @Deprecated
-    RouteDefinition adviceWith(RouteDefinition definition, 
AdviceWithRouteBuilder builder) throws Exception;
-
     /**
      * Registers the route input validator
      */
diff --git 
a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
 
b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
index a29498b6ce3..b18dd20177e 100644
--- 
a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
+++ 
b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
@@ -153,8 +153,6 @@ public class MainConfigurationPropertiesConfigurer extends 
org.apache.camel.supp
         case "RouteControllerIncludeRoutes": 
target.setRouteControllerIncludeRoutes(property(camelContext, 
java.lang.String.class, value)); return true;
         case "routecontrollerinitialdelay":
         case "RouteControllerInitialDelay": 
target.setRouteControllerInitialDelay(property(camelContext, long.class, 
value)); return true;
-        case "routecontrollerlogginglevel":
-        case "RouteControllerLoggingLevel": 
target.setRouteControllerLoggingLevel(property(camelContext, 
org.apache.camel.LoggingLevel.class, value)); return true;
         case "routecontrollersuperviseenabled":
         case "RouteControllerSuperviseEnabled": 
target.setRouteControllerSuperviseEnabled(property(camelContext, boolean.class, 
value)); return true;
         case "routecontrollerthreadpoolsize":
@@ -394,8 +392,6 @@ public class MainConfigurationPropertiesConfigurer extends 
org.apache.camel.supp
         case "RouteControllerIncludeRoutes": return java.lang.String.class;
         case "routecontrollerinitialdelay":
         case "RouteControllerInitialDelay": return long.class;
-        case "routecontrollerlogginglevel":
-        case "RouteControllerLoggingLevel": return 
org.apache.camel.LoggingLevel.class;
         case "routecontrollersuperviseenabled":
         case "RouteControllerSuperviseEnabled": return boolean.class;
         case "routecontrollerthreadpoolsize":
@@ -636,8 +632,6 @@ public class MainConfigurationPropertiesConfigurer extends 
org.apache.camel.supp
         case "RouteControllerIncludeRoutes": return 
target.getRouteControllerIncludeRoutes();
         case "routecontrollerinitialdelay":
         case "RouteControllerInitialDelay": return 
target.getRouteControllerInitialDelay();
-        case "routecontrollerlogginglevel":
-        case "RouteControllerLoggingLevel": return 
target.getRouteControllerLoggingLevel();
         case "routecontrollersuperviseenabled":
         case "RouteControllerSuperviseEnabled": return 
target.isRouteControllerSuperviseEnabled();
         case "routecontrollerthreadpoolsize":
diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 0aedabb2e68..dac149fe578 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -78,7 +78,6 @@
     { "name": "camel.main.routeControllerExcludeRoutes", "description": 
"Pattern for filtering routes to be excluded as supervised. The pattern is 
matching on route id, and endpoint uri for the route. Multiple patterns can be 
separated by comma. For example to exclude all JMS routes, you can say jms:. 
And to exclude routes with specific route ids 
mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the 
matcher from org.apache.camel.support.PatternHelper#matchPatter [...]
     { "name": "camel.main.routeControllerIncludeRoutes", "description": 
"Pattern for filtering routes to be included as supervised. The pattern is 
matching on route id, and endpoint uri for the route. Multiple patterns can be 
separated by comma. For example to include all kafka routes, you can say 
kafka:. And to include routes with specific route ids myRoute,myOtherRoute. The 
pattern supports wildcards and uses the matcher from 
org.apache.camel.support.PatternHelper#matchPattern.", "sour [...]
     { "name": "camel.main.routeControllerInitialDelay", "description": 
"Initial delay in milli seconds before the route controller starts, after 
CamelContext has been started.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", 
"javaType": "long" },
-    { "name": "camel.main.routeControllerLoggingLevel", "description": "Sets 
the logging level used for logging route activity (such as starting and 
stopping routes). The default logging level is DEBUG.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object", 
"javaType": "org.apache.camel.LoggingLevel", "defaultValue": "DEBUG", "enum": [ 
"ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF" ], "deprecated": true },
     { "name": "camel.main.routeControllerSuperviseEnabled", "description": "To 
enable using supervising route controller which allows Camel to startup and 
then the controller takes care of starting the routes in a safe manner. This 
can be used when you want to startup Camel despite a route may otherwise fail 
fast during startup and cause Camel to fail to startup as well. By delegating 
the route startup to the supervising route controller then its manages the 
startup using a background th [...]
     { "name": "camel.main.routeControllerThreadPoolSize", "description": "The 
number of threads used by the route controller scheduled thread pool that are 
used for restarting routes. The pool uses 1 thread by default, but you can 
increase this to allow the controller to concurrently attempt to restart 
multiple routes in case more than one route has problems starting.", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"integer", "javaType": "int" },
     { "name": "camel.main.routeControllerUnhealthyOnExhausted", "description": 
"Whether to mark the route as unhealthy (down) when all restarting attempts 
(backoff) have failed and the route is not successfully started and the route 
manager is giving up. Setting this to true allows health checks to know about 
this and can report the Camel application as DOWN. The default is false.", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "bool [...]
diff --git a/core/camel-main/src/main/docs/main.adoc 
b/core/camel-main/src/main/docs/main.adoc
index 7d7687063f4..5c23b953115 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -18,7 +18,7 @@ The following tables lists all the options:
 
 // main options: START
 === Camel Main configurations
-The camel.main supports 117 options, which are listed below.
+The camel.main supports 116 options, which are listed below.
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
@@ -89,7 +89,6 @@ The camel.main supports 117 options, which are listed below.
 | *camel.main.routeController{zwsp}ExcludeRoutes* | Pattern for filtering 
routes to be excluded as supervised. The pattern is matching on route id, and 
endpoint uri for the route. Multiple patterns can be separated by comma. For 
example to exclude all JMS routes, you can say jms:. And to exclude routes with 
specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports 
wildcards and uses the matcher from 
org.apache.camel.support.PatternHelper#matchPattern. |  | String
 | *camel.main.routeController{zwsp}IncludeRoutes* | Pattern for filtering 
routes to be included as supervised. The pattern is matching on route id, and 
endpoint uri for the route. Multiple patterns can be separated by comma. For 
example to include all kafka routes, you can say kafka:. And to include routes 
with specific route ids myRoute,myOtherRoute. The pattern supports wildcards 
and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. 
|  | String
 | *camel.main.routeController{zwsp}InitialDelay* | Initial delay in milli 
seconds before the route controller starts, after CamelContext has been 
started. |  | long
-| *camel.main.routeController{zwsp}LoggingLevel* | Sets the logging level used 
for logging route activity (such as starting and stopping routes). The default 
logging level is DEBUG. | DEBUG | LoggingLevel
 | *camel.main.routeController{zwsp}SuperviseEnabled* | To enable using 
supervising route controller which allows Camel to startup and then the 
controller takes care of starting the routes in a safe manner. This can be used 
when you want to startup Camel despite a route may otherwise fail fast during 
startup and cause Camel to fail to startup as well. By delegating the route 
startup to the supervising route controller then its manages the startup using 
a background thread. The controller  [...]
 | *camel.main.routeController{zwsp}ThreadPoolSize* | The number of threads 
used by the route controller scheduled thread pool that are used for restarting 
routes. The pool uses 1 thread by default, but you can increase this to allow 
the controller to concurrently attempt to restart multiple routes in case more 
than one route has problems starting. |  | int
 | *camel.main.routeController{zwsp}UnhealthyOnExhausted* | Whether to mark the 
route as unhealthy (down) when all restarting attempts (backoff) have failed 
and the route is not successfully started and the route manager is giving up. 
Setting this to true allows health checks to know about this and can report the 
Camel application as DOWN. The default is false. | false | boolean
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
index 719d373142f..84e23a03b74 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
@@ -346,9 +346,6 @@ public final class DefaultConfigurationConfigurer {
             }
             
src.setUnhealthyOnExhausted(config.isRouteControllerUnhealthyOnExhausted());
         }
-        if (config.getRouteControllerLoggingLevel() != null) {
-            
camelContext.getRouteController().setLoggingLevel(config.getRouteControllerLoggingLevel());
-        }
     }
 
     /**
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index cc1132b6264..a6fc8a4b63e 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -128,9 +128,6 @@ public abstract class DefaultConfigurationProperties<T> {
     private boolean dumpRoutes;
     private Map<String, String> globalOptions;
     // route controller
-    @Metadata(defaultValue = "DEBUG")
-    @Deprecated
-    private LoggingLevel routeControllerLoggingLevel;
     private boolean routeControllerSuperviseEnabled;
     private String routeControllerIncludeRoutes;
     private String routeControllerExcludeRoutes;
@@ -1359,20 +1356,6 @@ public abstract class DefaultConfigurationProperties<T> {
         this.globalOptions.put(key, value.toString());
     }
 
-    @Deprecated
-    public LoggingLevel getRouteControllerLoggingLevel() {
-        return routeControllerLoggingLevel;
-    }
-
-    /**
-     * Sets the logging level used for logging route activity (such as 
starting and stopping routes). The default
-     * logging level is DEBUG.
-     */
-    @Deprecated
-    public void setRouteControllerLoggingLevel(LoggingLevel 
routeControllerLoggingLevel) {
-        this.routeControllerLoggingLevel = routeControllerLoggingLevel;
-    }
-
     public boolean isRouteControllerSuperviseEnabled() {
         return routeControllerSuperviseEnabled;
     }
@@ -2526,15 +2509,6 @@ public abstract class DefaultConfigurationProperties<T> {
         return (T) this;
     }
 
-    /**
-     * Sets the logging level used for logging route activity (such as 
starting and stopping routes). The default
-     * logging level is DEBUG.
-     */
-    public T withRouteControllerLoggingLevel(LoggingLevel 
routeControllerLoggingLevel) {
-        this.routeControllerLoggingLevel = routeControllerLoggingLevel;
-        return (T) this;
-    }
-
     /**
      * To enable using supervising route controller which allows Camel to 
startup and then the controller takes care of
      * starting the routes in a safe manner.
diff --git 
a/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java
 
b/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java
index 8211954090c..7e924059278 100644
--- 
a/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java
+++ 
b/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java
@@ -42,7 +42,7 @@ public class MainSupervisingRouteControllerTest {
         // lets make a simple route
         Main main = new Main();
         main.configure().addRoutesBuilder(new MyRoute());
-        main.configure().withRouteControllerLoggingLevel(LoggingLevel.OFF)
+        main.configure()
                 .withRouteControllerSuperviseEnabled(true)
                 .withRouteControllerBackOffDelay(25)
                 .withRouteControllerBackOffMaxAttempts(3)

Reply via email to