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

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

commit 5436d39feaee8104989c238614a3665e7f9fd910
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Feb 27 13:25:47 2024 +0100

    CAMEL-20466: camel-core - Rest DSL to be inlined by default to avoid 
clutter up list of routes
---
 .../java/org/apache/camel/impl/DefaultModel.java   | 27 +++++++++++++++++-----
 .../org/apache/camel/model/RouteDefinition.java    |  2 +-
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java 
b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java
index 446b540444b..77cc5c6d5f0 100644
--- 
a/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java
+++ 
b/core/camel-core-engine/src/main/java/org/apache/camel/impl/DefaultModel.java
@@ -228,15 +228,30 @@ public class DefaultModel implements Model {
                                 // inline by replacing the outputs
                                 r.getOutputs().clear();
                                 
r.getOutputs().addAll(toBeInlined.getOutputs());
-                                // and copy over various ids
+                                // and copy over various configurations
                                 if (toBeInlined.getRouteId() != null) {
                                     r.setId(toBeInlined.getRouteId());
                                 }
-                                if (toBeInlined.getNodePrefixId() != null) {
-                                    
r.setNodePrefixId(toBeInlined.getNodePrefixId());
-                                }
-                                if (toBeInlined.getGroup() != null) {
-                                    r.setGroup(toBeInlined.getRouteId());
+                                
r.setNodePrefixId(toBeInlined.getNodePrefixId());
+                                r.setGroup(toBeInlined.getGroup());
+                                r.setAutoStartup(toBeInlined.getAutoStartup());
+                                r.setDelayer(toBeInlined.getDelayer());
+                                r.setInputType(toBeInlined.getInputType());
+                                r.setOutputType(toBeInlined.getOutputType());
+                                r.setLogMask(toBeInlined.getLogMask());
+                                
r.setMessageHistory(toBeInlined.getMessageHistory());
+                                r.setStreamCache(toBeInlined.getStreamCache());
+                                r.setTrace(toBeInlined.getTrace());
+                                
r.setStartupOrder(toBeInlined.getStartupOrder());
+                                
r.setRoutePolicyRef(toBeInlined.getRoutePolicyRef());
+                                
r.setRouteConfigurationId(toBeInlined.getRouteConfigurationId());
+                                
r.setRoutePolicies(toBeInlined.getRoutePolicies());
+                                
r.setShutdownRoute(toBeInlined.getShutdownRoute());
+                                
r.setShutdownRunningTask(toBeInlined.getShutdownRunningTask());
+                                
r.setErrorHandlerRef(toBeInlined.getErrorHandlerRef());
+                                
r.setPrecondition(toBeInlined.getPrecondition());
+                                if (toBeInlined.isErrorHandlerFactorySet()) {
+                                    
r.setErrorHandlerFactory(toBeInlined.getErrorHandlerFactory());
                                 }
                             }
                         }
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
index aa78b73fdc4..fea85633ba5 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
@@ -1153,7 +1153,7 @@ public class RouteDefinition extends 
OutputDefinition<RouteDefinition>
     /**
      * Is a custom error handler been set
      */
-    boolean isErrorHandlerFactorySet() {
+    public boolean isErrorHandlerFactorySet() {
         return errorHandlerFactory != null;
     }
 

Reply via email to