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

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


The following commit(s) were added to refs/heads/master by this push:
     new bb660c5  core(rest): mark VerbDefinition as an OutputNode
bb660c5 is described below

commit bb660c52b7326e7143b4460070f20f535f7cbeea
Author: Luca Burgazzoli <[email protected]>
AuthorDate: Mon Feb 15 10:46:34 2021 +0100

    core(rest): mark VerbDefinition as an OutputNode
---
 .../java/org/apache/camel/model/rest/VerbDefinition.java   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
index 8f969ac..8284ed1 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
@@ -28,7 +28,10 @@ import javax.xml.bind.annotation.XmlElements;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.model.Block;
 import org.apache.camel.model.OptionalIdentifiedDefinition;
+import org.apache.camel.model.OutputNode;
+import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.model.RouteDefinition;
 import org.apache.camel.model.ToDefinition;
 import org.apache.camel.model.ToDynamicDefinition;
@@ -40,7 +43,7 @@ import org.apache.camel.spi.Metadata;
 @Metadata(label = "rest")
 @XmlRootElement(name = "verb")
 @XmlAccessorType(XmlAccessType.FIELD)
-public class VerbDefinition extends 
OptionalIdentifiedDefinition<VerbDefinition> {
+public class VerbDefinition extends 
OptionalIdentifiedDefinition<VerbDefinition> implements Block, OutputNode {
 
     @XmlAttribute
     private String method;
@@ -129,6 +132,15 @@ public class VerbDefinition extends 
OptionalIdentifiedDefinition<VerbDefinition>
         }
     }
 
+    @Override
+    public void addOutput(ProcessorDefinition<?> processorDefinition) {
+        if (route == null) {
+            route = new RouteDefinition();
+        }
+
+        route.addOutput(processorDefinition);
+    }
+
     public List<RestOperationParamDefinition> getParams() {
         return params;
     }

Reply via email to