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 75cd4aec6288ea8e589723793e081a6295b900bf Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun Feb 20 09:49:57 2022 +0100 Polished --- .../org/apache/camel/model/rest/RestsDefinition.java | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestsDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestsDefinition.java index f051889..06b6460 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestsDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestsDefinition.java @@ -23,10 +23,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; -import org.apache.camel.CamelContext; -import org.apache.camel.CamelContextAware; import org.apache.camel.model.OptionalIdentifiedDefinition; import org.apache.camel.spi.Metadata; @@ -36,11 +33,10 @@ import org.apache.camel.spi.Metadata; @Metadata(label = "rest") @XmlRootElement(name = "rests") @XmlAccessorType(XmlAccessType.FIELD) -public class RestsDefinition extends OptionalIdentifiedDefinition<RestsDefinition> implements RestContainer, CamelContextAware { +public class RestsDefinition extends OptionalIdentifiedDefinition<RestsDefinition> implements RestContainer { + @XmlElementRef private List<RestDefinition> rests = new ArrayList<>(); - @XmlTransient - private CamelContext camelContext; public RestsDefinition() { } @@ -76,16 +72,6 @@ public class RestsDefinition extends OptionalIdentifiedDefinition<RestsDefinitio this.rests = rests; } - @Override - public CamelContext getCamelContext() { - return camelContext; - } - - @Override - public void setCamelContext(CamelContext camelContext) { - this.camelContext = camelContext; - } - // Fluent API // ------------------------------------------------------------------------- @@ -118,6 +104,7 @@ public class RestsDefinition extends OptionalIdentifiedDefinition<RestsDefinitio // Implementation methods // ------------------------------------------------------------------------- + protected RestDefinition createRest() { RestDefinition rest = new RestDefinition(); return rest;