You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/02/25 13:05:04 UTC

[GitHub] [camel] davsclaus commented on a change in pull request #5119: CAMEL-12545: create a yaml based route loader

davsclaus commented on a change in pull request #5119:
URL: https://github.com/apache/camel/pull/5119#discussion_r582808936



##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl-common/src/main/java/org/apache/camel/dsl/yaml/common/YamlSupport.java
##########
@@ -0,0 +1,232 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.yaml.common;
+
+import java.net.URISyntaxException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.function.Function;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.ExtendedCamelContext;
+import org.apache.camel.PropertyBindingException;
+import org.apache.camel.dsl.yaml.common.exception.UnsupportedNodeTypeException;
+import org.apache.camel.spi.CamelContextCustomizer;
+import org.apache.camel.spi.EndpointUriFactory;
+import org.apache.camel.spi.PropertyConfigurer;
+import org.apache.camel.support.PropertyBindingSupport;
+import org.apache.camel.support.service.ServiceHelper;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.StringHelper;
+import org.apache.camel.util.URISupport;
+import org.snakeyaml.engine.v2.api.ConstructNode;
+import org.snakeyaml.engine.v2.nodes.MappingNode;
+import org.snakeyaml.engine.v2.nodes.Node;
+import org.snakeyaml.engine.v2.nodes.NodeTuple;
+import org.snakeyaml.engine.v2.nodes.NodeType;
+import org.snakeyaml.engine.v2.nodes.SequenceNode;
+
+public final class YamlSupport {
+    private YamlSupport() {
+    }
+
+    public static void setPropertiesOnTarget(CamelContext context, Object target, Map<String, Object> properties) {
+        ObjectHelper.notNull(context, "context");
+        ObjectHelper.notNull(target, "target");
+        ObjectHelper.notNull(properties, "properties");
+
+        if (target instanceof CamelContext) {
+            throw new UnsupportedOperationException("Configuring the Camel Context si not supported");

Review comment:
       typo in the exception text

##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/EndpointConsumerDeserializersResolver.java
##########
@@ -0,0 +1,244 @@
+package org.apache.camel.dsl.yaml.deserializers;
+
+import java.lang.Override;
+import java.lang.String;
+import org.apache.camel.dsl.yaml.common.YamlDeserializerResolver;
+import org.snakeyaml.engine.v2.api.ConstructNode;
+
+public final class EndpointConsumerDeserializersResolver implements YamlDeserializerResolver {

Review comment:
       Is this code source code generated? If so then it would be good to add that javadoc header / code comment we have about ... this code is source code generated by xxxx do NOT edit




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org