You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/10/07 08:59:41 UTC
[13/14] camel git commit: CAMEL-9799: Regen
CAMEL-9799: Regen
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d8a9ea30
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d8a9ea30
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d8a9ea30
Branch: refs/heads/master
Commit: d8a9ea302f5433b44936c9abd2d931b79ccb8075
Parents: a6172f8
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Oct 7 10:57:11 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Oct 7 10:57:11 2017 +0200
----------------------------------------------------------------------
bom/camel-bom/pom.xml | 10 ++
.../src/main/docs/json-validator-component.adoc | 2 +-
components/readme.adoc | 5 +-
docs/user-manual/en/SUMMARY.md | 1 +
.../camel-json-validator-starter/pom.xml | 4 +-
...hemaValidatorComponentAutoConfiguration.java | 129 -------------------
...onSchemaValidatorComponentConfiguration.java | 49 -------
.../main/resources/META-INF/spring.factories | 2 -
.../camel-spring-boot-dependencies/pom.xml | 10 ++
9 files changed, 28 insertions(+), 184 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/bom/camel-bom/pom.xml
----------------------------------------------------------------------
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 7b968de..69b3a60 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1400,6 +1400,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-json-validator</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-json-validator-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-jsonpath</artifactId>
<version>${project.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/components/camel-json-validator/src/main/docs/json-validator-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-json-validator/src/main/docs/json-validator-component.adoc b/components/camel-json-validator/src/main/docs/json-validator-component.adoc
index d0e6d56..1bb3e20 100644
--- a/components/camel-json-validator/src/main/docs/json-validator-component.adoc
+++ b/components/camel-json-validator/src/main/docs/json-validator-component.adoc
@@ -124,4 +124,4 @@ we can validate incoming JSON with the following Camel route, where `myschema.js
from("direct:start")
.to("json-validator:myschema.json")
.to("mock:end")
-----
\ No newline at end of file
+----
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/components/readme.adoc
----------------------------------------------------------------------
diff --git a/components/readme.adoc b/components/readme.adoc
index 7085dbf..9520eae 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,7 +2,7 @@ Components
^^^^^^^^^^
// components: START
-Number of Components: 283 in 194 JAR artifacts (17 deprecated)
+Number of Components: 284 in 195 JAR artifacts (17 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -440,6 +440,9 @@ Number of Components: 283 in 194 JAR artifacts (17 deprecated)
| link:camel-jpa/src/main/docs/jpa-component.adoc[JPA] (camel-jpa) +
`jpa:entityType` | 1.0 | The jpa component enables you to store and retrieve Java objects from databases using JPA.
+| link:camel-json-validator/src/main/docs/json-validator-component.adoc[JSON Schema Validator] (camel-json-validator) +
+`json-validator:resourceUri` | | Validates the payload of a message using Everit JSON schema validator.
+
| link:camel-jt400/src/main/docs/jt400-component.adoc[JT400] (camel-jt400) +
`jt400:userID:password/systemName/objectPath.type` | 1.5 | The jt400 component allows you to exchanges messages with an AS/400 system using data queues or program call.
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 1ca6513..332940e 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -259,6 +259,7 @@
* [JMX](jmx-component.adoc)
* [JOLT](jolt-component.adoc)
* [JPA](jpa-component.adoc)
+ * [JSON Schema Validator](json-validator-component.adoc)
* [JT400](jt400-component.adoc)
* [Kafka](kafka-component.adoc)
* [Kestrel](kestrel-component.adoc)
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml b/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml
index 83d6fb2..0756538 100644
--- a/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml
+++ b/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml
@@ -26,8 +26,8 @@
</parent>
<artifactId>camel-json-validator-starter</artifactId>
<packaging>jar</packaging>
- <name>Spring-Boot Starter :: Camel :: Everit Kft. JSON Schema validator</name>
- <description>Spring-Boot Starter for Camel JSON Schema validation based on everit-org json-schema library</description>
+ <name>Spring-Boot Starter :: Camel :: JSON validator</name>
+ <description>Spring-Boot Starter for Camel JSON Schema validation based on Everit JSON-schema library</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentAutoConfiguration.java
deleted file mode 100644
index 7d2decc..0000000
--- a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentAutoConfiguration.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.component.everit.jsonschema.springboot;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.everit.jsonschema.JsonSchemaValidatorComponent;
-import org.apache.camel.spi.ComponentCustomizer;
-import org.apache.camel.spi.HasId;
-import org.apache.camel.spring.boot.CamelAutoConfiguration;
-import org.apache.camel.spring.boot.ComponentConfigurationProperties;
-import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
-import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
-import org.apache.camel.spring.boot.util.GroupCondition;
-import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
-import org.apache.camel.util.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Lazy;
-
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@Configuration
-@Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class,
- JsonSchemaValidatorComponentAutoConfiguration.GroupConditions.class})
-@AutoConfigureAfter(CamelAutoConfiguration.class)
-@EnableConfigurationProperties({ComponentConfigurationProperties.class,
- JsonSchemaValidatorComponentConfiguration.class})
-public class JsonSchemaValidatorComponentAutoConfiguration {
-
- private static final Logger LOGGER = LoggerFactory
- .getLogger(JsonSchemaValidatorComponentAutoConfiguration.class);
- @Autowired
- private ApplicationContext applicationContext;
- @Autowired
- private CamelContext camelContext;
- @Autowired
- private JsonSchemaValidatorComponentConfiguration configuration;
- @Autowired(required = false)
- private List<ComponentCustomizer<JsonSchemaValidatorComponent>> customizers;
-
- static class GroupConditions extends GroupCondition {
- public GroupConditions() {
- super("camel.component", "camel.component.json-validator");
- }
- }
-
- @Lazy
- @Bean(name = "json-validator-component")
- @ConditionalOnMissingBean(JsonSchemaValidatorComponent.class)
- public JsonSchemaValidatorComponent configureJsonSchemaValidatorComponent()
- throws Exception {
- JsonSchemaValidatorComponent component = new JsonSchemaValidatorComponent();
- component.setCamelContext(camelContext);
- Map<String, Object> parameters = new HashMap<>();
- IntrospectionSupport.getProperties(configuration, parameters, null,
- false);
- for (Map.Entry<String, Object> entry : parameters.entrySet()) {
- Object value = entry.getValue();
- Class<?> paramClass = value.getClass();
- if (paramClass.getName().endsWith("NestedConfiguration")) {
- Class nestedClass = null;
- try {
- nestedClass = (Class) paramClass.getDeclaredField(
- "CAMEL_NESTED_CLASS").get(null);
- HashMap<String, Object> nestedParameters = new HashMap<>();
- IntrospectionSupport.getProperties(value, nestedParameters,
- null, false);
- Object nestedProperty = nestedClass.newInstance();
- CamelPropertiesHelper.setCamelProperties(camelContext,
- nestedProperty, nestedParameters, false);
- entry.setValue(nestedProperty);
- } catch (NoSuchFieldException e) {
- }
- }
- }
- CamelPropertiesHelper.setCamelProperties(camelContext, component,
- parameters, false);
- if (ObjectHelper.isNotEmpty(customizers)) {
- for (ComponentCustomizer<JsonSchemaValidatorComponent> customizer : customizers) {
- boolean useCustomizer = (customizer instanceof HasId)
- ? HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.component.customizer",
- "camel.component.json-validator.customizer",
- ((HasId) customizer).getId())
- : HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.component.customizer",
- "camel.component.json-validator.customizer");
- if (useCustomizer) {
- LOGGER.debug("Configure component {}, with customizer {}",
- component, customizer);
- customizer.customize(component);
- }
- }
- }
- return component;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentConfiguration.java
deleted file mode 100644
index 7c0ca28..0000000
--- a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/everit/jsonschema/springboot/JsonSchemaValidatorComponentConfiguration.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.component.everit.jsonschema.springboot;
-
-import javax.annotation.Generated;
-import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * Validates the payload of a message using XML Schema and JAXP Validation.
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@ConfigurationProperties(prefix = "camel.component.json-validator")
-public class JsonSchemaValidatorComponentConfiguration
- extends
- ComponentConfigurationPropertiesCommon {
-
- /**
- * Whether the component should resolve property placeholders on itself when
- * starting. Only properties which are of String type can use property
- * placeholders.
- */
- private Boolean resolvePropertyPlaceholders = true;
-
- public Boolean getResolvePropertyPlaceholders() {
- return resolvePropertyPlaceholders;
- }
-
- public void setResolvePropertyPlaceholders(
- Boolean resolvePropertyPlaceholders) {
- this.resolvePropertyPlaceholders = resolvePropertyPlaceholders;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/resources/META-INF/spring.factories b/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/resources/META-INF/spring.factories
index 89e1ba4..84720cd 100644
--- a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/resources/META-INF/spring.factories
+++ b/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/resources/META-INF/spring.factories
@@ -16,6 +16,4 @@
## ---------------------------------------------------------------------------
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.component.everit.jsonschema.springboot.JsonSchemaValidatorComponentAutoConfiguration,\
org.apache.camel.component.jsonvalidator.springboot.JsonValidatorComponentAutoConfiguration
-
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a9ea30/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
index 32a4d37..53c44ff 100644
--- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
+++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
@@ -1576,6 +1576,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-json-validator</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-json-validator-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-jsonpath</artifactId>
<version>${project.version}</version>
</dependency>