You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/01/09 09:26:10 UTC
[camel] branch master updated: CAMEL-13039 - Deprecate/Remove
Camel-YQL
This is an automated email from the ASF dual-hosted git repository.
acosentino 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 2b0be41 CAMEL-13039 - Deprecate/Remove Camel-YQL
2b0be41 is described below
commit 2b0be4194ebc878641f7286b5381eb21511ca42f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 9 10:24:53 2019 +0100
CAMEL-13039 - Deprecate/Remove Camel-YQL
---
apache-camel/pom.xml | 9 -
apache-camel/src/main/descriptors/common-bin.xml | 2 -
bom/camel-bom/pom.xml | 10 -
components/camel-yql/pom.xml | 122 ----------
.../camel-yql/src/main/docs/yql-component.adoc | 257 ---------------------
.../apache/camel/component/yql/YqlComponent.java | 74 ------
.../apache/camel/component/yql/YqlEndpoint.java | 83 -------
.../apache/camel/component/yql/YqlProducer.java | 57 -----
.../camel/component/yql/client/YqlClient.java | 88 -------
.../camel/component/yql/client/YqlResponse.java | 74 ------
.../yql/configuration/YqlConfiguration.java | 176 --------------
.../configuration/YqlConfigurationValidator.java | 44 ----
.../component/yql/exception/YqlException.java | 24 --
.../component/yql/exception/YqlHttpException.java | 50 ----
.../camel-yql/src/main/resources/LICENSE.txt | 203 ----------------
.../services/org/apache/camel/component/yql | 18 --
components/camel-yql/src/main/resources/NOTICE.txt | 11 -
.../component/yql/YqlComponentIntegrationTest.java | 163 -------------
.../camel/component/yql/YqlComponentTest.java | 110 ---------
.../YqlConfigurationValidatorTest.java | 133 -----------
.../camel-yql/src/test/resources/log4j2.properties | 33 ---
components/pom.xml | 1 -
components/readme.adoc | 5 +-
docs/components/modules/ROOT/nav.adoc | 1 -
.../modules/ROOT/pages/aws-mq-component.adoc | 8 +
.../modules/ROOT/pages/yql-component.adoc | 257 ---------------------
parent/pom.xml | 10 -
.../karaf/features/src/main/resources/features.xml | 8 -
.../components-starter/camel-yql-starter/pom.xml | 61 -----
.../springboot/YqlComponentAutoConfiguration.java | 128 ----------
.../yql/springboot/YqlComponentConfiguration.java | 68 ------
.../src/main/resources/META-INF/LICENSE.txt | 203 ----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../src/main/resources/META-INF/spring.factories | 19 --
.../src/main/resources/META-INF/spring.provides | 17 --
platforms/spring-boot/components-starter/pom.xml | 1 -
.../camel-spring-boot-dependencies/pom.xml | 10 -
.../org/apache/camel/itest/karaf/CamelYqlTest.java | 34 ---
.../camel/itest/springboot/CamelYqlTest.java | 47 ----
39 files changed, 9 insertions(+), 2621 deletions(-)
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 4e64850..e3078af 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -1071,10 +1071,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-yql</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-zendesk</artifactId>
</dependency>
<dependency>
@@ -2276,11 +2272,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-yql-starter</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-zendesk-starter</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml
index 5bdd8e3..ec6ff3a 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -276,7 +276,6 @@
<include>org.apache.camel:camel-xmpp</include>
<include>org.apache.camel:camel-xstream</include>
<include>org.apache.camel:camel-yammer</include>
- <include>org.apache.camel:camel-yql</include>
<include>org.apache.camel:camel-zendesk</include>
<include>org.apache.camel:camel-zipfile</include>
<include>org.apache.camel:camel-zipkin</include>
@@ -556,7 +555,6 @@
<include>org.apache.camel:camel-xmpp-starter</include>
<include>org.apache.camel:camel-xstream-starter</include>
<include>org.apache.camel:camel-yammer-starter</include>
- <include>org.apache.camel:camel-yql-starter</include>
<include>org.apache.camel:camel-zendesk-starter</include>
<include>org.apache.camel:camel-zipfile-starter</include>
<include>org.apache.camel:camel-zipkin-starter</include>
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 4e5a080..523eea6 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -2891,16 +2891,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-yql</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-yql-starter</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-zendesk</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/components/camel-yql/pom.xml b/components/camel-yql/pom.xml
deleted file mode 100644
index 7900a0b..0000000
--- a/components/camel-yql/pom.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>components</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-yql</artifactId>
- <packaging>jar</packaging>
-
- <name>Camel :: Yql</name>
- <description>Camel Yahoo Query Language Component</description>
-
- <properties>
- <camel.osgi.export.pkg>org.apache.camel.component.yql.*</camel.osgi.export.pkg>
- <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=yql</camel.osgi.export.service>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>${commons-lang3-version}</version>
- </dependency>
-
- <!-- testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test</artifactId>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <artifactId>hamcrest-core</artifactId>
- <groupId>org.hamcrest</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>java-hamcrest</artifactId>
- <version>${hamcrest-version}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>integration</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
- <childDelegation>false</childDelegation>
- <useFile>true</useFile>
- <failIfNoTests>false</failIfNoTests>
- <runOrder>alphabetical</runOrder>
- <includes>
- <include>**/*IntegrationTest.java</include>
- </includes>
- <excludes>
- <exclude>**/*XXXTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/components/camel-yql/src/main/docs/yql-component.adoc b/components/camel-yql/src/main/docs/yql-component.adoc
deleted file mode 100644
index 5229e08..0000000
--- a/components/camel-yql/src/main/docs/yql-component.adoc
+++ /dev/null
@@ -1,257 +0,0 @@
-[[yql-component]]
-== Yahoo Query Language Component
-
-*Available as of Camel version 2.21*
-
-The *yql* component is used for accessing the https://developer.yahoo.com/yql/[Yahoo Query Language platform].
-
-The YQL (Yahoo! Query Language) platform enables you to query, filter, and combine data across the web through
-a single interface. It exposes a SQL-like syntax that is both familiar to developers and expressive enough for
-getting the right data.
-
-Maven users will need to add the following dependency to their `pom.xml`
-for this component:
-
-[source,xml]
-------------------------------------------------------------
-<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-yql</artifactId>
- <version>x.x.x</version>
- <!-- use the same version as your Camel core version -->
-</dependency>
-------------------------------------------------------------
-
-=== URI format
-
-----
-yql://query[?options]
-----
-
-Where *query* represents the YQL query.
-
-=== Options
-
-// component options: START
-The Yahoo Query Language component supports 2 options, which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *connectionManager* (producer) | To use a custom configured HttpClientConnectionManager. | | HttpClientConnection Manager
-| *resolveProperty Placeholders* (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean
-|===
-// component options: END
-
-// endpoint options: START
-The Yahoo Query Language endpoint is configured using URI syntax:
-
-----
-yql:query
-----
-
-with the following path and query parameters:
-
-==== Path Parameters (1 parameters):
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *query* | *Required* The YQL statement to execute. | | String
-|===
-
-
-==== Query Parameters (10 parameters):
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *callback* (producer) | The name of the JavaScript callback function for JSONP format. If callback is set and if format=json, then the response format is JSON. For more information on using XML instead of JSON, see JSONP-X. https://developer.yahoo.com/yql/guide/response.html | | String
-| *crossProduct* (producer) | When given the value optimized, the projected fields in SELECT statements that may be returned in separate item elements in the response are optimized to be in a single item element instead. The only allowed value is optimized. More information https://developer.yahoo.com/yql/guide/response.html#response-optimizing= | | String
-| *debug* (producer) | If true, and if diagnostic is set to true, debug data is returned with the response. More information: https://developer.yahoo.com/yql/guide/dev-external_tables.html#odt-enable-logging= | false | boolean
-| *diagnostics* (producer) | If true, diagnostic information is returned with the response. | false | boolean
-| *env* (producer) | Allows you to use multiple Open Data Tables through a YQL environment file. More information https://developer.yahoo.com/yql/guide/yql_storage.html#using-records-env-files= | | String
-| *format* (producer) | The expected format. Allowed values: xml or json. | json | String
-| *jsonCompat* (producer) | Enables lossless JSON processing. The only allowed value is new. More information https://developer.yahoo.com/yql/guide/response.html#json-to-json | | String
-| *throwExceptionOnFailure* (producer) | Option to disable throwing the YqlHttpException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code. | true | boolean
-| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
-| *https* (security) | Option to use HTTPS to communicate with YQL. | true | boolean
-|===
-// endpoint options: END
-// spring-boot-auto-configure options: START
-=== Spring Boot Auto-Configuration
-
-
-The component supports 3 options, which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *camel.component.yql.connection-manager* | To use a custom configured HttpClientConnectionManager. The option is a org.apache.http.conn.HttpClientConnectionManager type. | | String
-| *camel.component.yql.enabled* | Whether to enable auto configuration of the yql component. This is enabled by default. | | Boolean
-| *camel.component.yql.resolve-property-placeholders* | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | Boolean
-|===
-// spring-boot-auto-configure options: END
-
-
-=== Exchange data format
-
-Camel will deliver the body as a JSON or XML formatted java.lang.String (see
-the `format` option above).
-
-=== Message Headers
-
-[width="100%",cols="10%,90%",options="header",]
-|===
-|Header |Description
-|`CamelYqlHttpRequest` | Original HTTP request sent to YQL.
-|`CamelYqlHttpStatus` | Status code from the response.
-|===
-
-=== Samples
-
-==== Sample 1
-
-In this example we query YQL to obtain the current wind and atmosphere data in Chicago:
-
-[source,java]
-----
-from("direct:start")
- .to("yql://select wind, atmosphere from weather.forecast where woeid in (select woeid from geo.places(1) where text='chicago, il'");
-----
-
-Which will setup the body as:
-
-[source,json]
-----
-{
- "query":{
- "count":1,
- "created":"2017-11-01T19:37:26Z",
- "lang":"en-US",
- "results":{
- "channel":{
- "wind":{
- "chill":"32",
- "direction":"165",
- "speed":"22"
- },
- "atmosphere":{
- "humidity":"71",
- "pressure":"994.0",
- "rising":"0",
- "visibility":"16.1"
- }
- }
- }
- }
-}
-----
-
-and the headers:
-
-[width="100%",cols="30%,70%",options="header",]
-|===
-|Header |Value
-|`CamelYqlHttpRequest` |https://query.yahooapis.com/v1/public/yql?q=select+wind%2C+atmosphere+from+weather.forecast+where+woeid+in+%28select+woeid+from+geo.places%281%29+where+text%3D%22chicago%2C+il%22%29&format=json&callback=&diagnostics=false&debug=false
-|`CamelYqlHttpStatus` |200
-|===
-
-==== Sample 2
-
-In this example we query YQL to obtain the Google quote.
-
-[source,java]
-----
-from("direct:start")
- .to("yql://select symbol, Ask, Bid, AverageDailyVolume from yahoo.finance.quotes where symbol in ('GOOG')?env=store://datatables.org/alltableswithkeys&https=false&callback=yqlCallback");
-----
-
-Which will setup the body as:
-
-[source,json]
-----
-/**/yqlCallback({
- "query":{
- "count":1,
- "created":"2017-11-01T19:48:17Z",
- "lang":"en-US",
- "results":{
- "quote":{
- "symbol":"GOOG",
- "Bid":"1025.57",
- "Ask":"1025.92",
- "AverageDailyVolume":"1350640"AverageDailyVolume
- }
- }
- }
-});
-----
-
-and the headers:
-
-[width="100%",cols="30%,70%",options="header",]
-|===
-|Header |Value
-|`CamelYqlHttpRequest` |http://query.yahooapis.com/v1/public/yql?q=select+symbol%2C+Ask%2C+Bid%2C+AverageDailyVolume+from+yahoo.finance.quotes+where+symbol+in+%28%27GOOG%27%29&format=json&callback=yqlCallback&diagnostics=false&debug=false&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
-|`CamelYqlHttpStatus` |200
-|===
-
-==== Sample 3
-
-In this example we query YQL to obtain one book written by Barack Obama
-
-[source,java]
-----
-from("direct:start")
- .to("yql://select * from google.books where q='barack obama' and maxResults=1?format=xml&crossProduct=optimized&env=store://datatables.org/alltableswithkeys");
-----
-
-Which will setup the body as:
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2017-11-01T20:32:22Z" yahoo:lang="en-US">
- <results>
- <json>
- <kind>books#volumes</kind>
- <totalItems>1993</totalItems>
- <items>
- <kind>books#volume</kind>
- <id>HRCHJp-V0QUC</id>
- <etag>SeTJeSgFDzo</etag>
- <selfLink>https://www.googleapis.com/books/v1/volumes/HRCHJp-V0QUC</selfLink>
- <volumeInfo>
- <title>Dreams from My Father</title>
- <subtitle>A Story of Race and Inheritance</subtitle>
- <authors>Barack Obama</authors>
- <publisher>Broadway Books</publisher>
- <publishedDate>2007-01-09</publishedDate>
- ...
- </volumeInfo>
- </items>
- </json>
- </results>
-</query>
-<!-- total: 646 -->
-----
-
-and the headers:
-
-[width="100%",cols="30%,70%",options="header",]
-|===
-|Header |Value
-|`CamelYqlHttpRequest` |https://query.yahooapis.com/v1/public/yql?q=select+*+from+google.books+where+q%3D%27barack+obama%27+and+maxResults%3D1&format=xml&callback=&crossProduct=optimized&diagnostics=false&debug=false&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
-|`CamelYqlHttpStatus` |200
-|===
-
-=== See Also
-
-* https://developer.yahoo.com/yql/guide/[YQL Official Guide]
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlComponent.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlComponent.java
deleted file mode 100644
index 4477a84..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlComponent.java
+++ /dev/null
@@ -1,74 +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.yql;
-
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.component.yql.configuration.YqlConfiguration;
-import org.apache.camel.component.yql.configuration.YqlConfigurationValidator;
-import org.apache.camel.support.DefaultComponent;
-import org.apache.camel.spi.Metadata;
-import org.apache.http.conn.HttpClientConnectionManager;
-import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
-
-public class YqlComponent extends DefaultComponent {
-
- @Metadata(label = "advanced")
- private HttpClientConnectionManager localConnectionManager;
-
- @Override
- protected Endpoint createEndpoint(final String uri, final String remaining, final Map<String, Object> parameters) throws Exception {
- final YqlConfiguration configuration = new YqlConfiguration();
- configuration.setQuery(remaining);
- setProperties(configuration, parameters);
- YqlConfigurationValidator.validateProperties(configuration);
-
- final HttpClientConnectionManager connectionManager = createConnectionManager();
-
- return new YqlEndpoint(uri, this, configuration, connectionManager);
- }
-
- @Override
- protected void doStop() throws Exception {
- if (localConnectionManager != null) {
- localConnectionManager.shutdown();
- }
- }
-
- public HttpClientConnectionManager getLocalConnectionManager() {
- return localConnectionManager;
- }
-
- /**
- * To use a custom configured HttpClientConnectionManager.
- */
- public void setConnectionManager(final HttpClientConnectionManager connectionManager) {
- this.localConnectionManager = connectionManager;
- }
-
- private HttpClientConnectionManager createConnectionManager() {
- if (localConnectionManager != null) {
- return localConnectionManager;
- }
- final PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
- connectionManager.setMaxTotal(200);
- connectionManager.setDefaultMaxPerRoute(20);
- setConnectionManager(connectionManager);
- return connectionManager;
- }
-}
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlEndpoint.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlEndpoint.java
deleted file mode 100644
index 227ec54..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlEndpoint.java
+++ /dev/null
@@ -1,83 +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.yql;
-
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.component.yql.configuration.YqlConfiguration;
-import org.apache.camel.support.DefaultEndpoint;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.http.conn.HttpClientConnectionManager;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-
-/**
- * The YQL (Yahoo! Query Language) platform enables you to query, filter, and combine data across the web.
- */
-@UriEndpoint(firstVersion = "2.21.0", scheme = "yql", title = "Yahoo Query Language", syntax = "yql:query", producerOnly = true, label = "cloud")
-public class YqlEndpoint extends DefaultEndpoint {
-
- private final HttpClientConnectionManager connectionManager;
- private CloseableHttpClient httpClient;
-
- @UriParam
- private final YqlConfiguration configuration;
-
- public YqlEndpoint(String uri, YqlComponent component, YqlConfiguration configuration, HttpClientConnectionManager connectionManager) {
- super(uri, component);
- this.configuration = configuration;
- this.connectionManager = connectionManager;
- }
-
- @Override
- public Producer createProducer() throws Exception {
- return new YqlProducer(this);
- }
-
- @Override
- public Consumer createConsumer(final Processor processor) throws Exception {
- throw new UnsupportedOperationException("Consumer is not supported for YQL component");
- }
-
- @Override
- public boolean isSingleton() {
- return true;
- }
-
- @Override
- protected void doStop() throws Exception {
- if (httpClient != null) {
- httpClient.close();
- httpClient = null;
- }
- }
-
- synchronized CloseableHttpClient getHttpClient() {
- if (httpClient == null) {
- httpClient = HttpClients.custom()
- .setConnectionManager(connectionManager)
- .build();
- }
- return httpClient;
- }
-
- YqlConfiguration getConfiguration() {
- return configuration;
- }
-}
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlProducer.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlProducer.java
deleted file mode 100644
index b0ca4b9..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/YqlProducer.java
+++ /dev/null
@@ -1,57 +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.yql;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.yql.client.YqlClient;
-import org.apache.camel.component.yql.client.YqlResponse;
-import org.apache.camel.component.yql.configuration.YqlConfiguration;
-import org.apache.camel.component.yql.exception.YqlHttpException;
-import org.apache.camel.support.DefaultProducer;
-import org.apache.http.HttpStatus;
-
-/**
- * A Producer that send messages to YQL
- */
-public class YqlProducer extends DefaultProducer {
-
- public static final String CAMEL_YQL_HTTP_STATUS = "CamelYqlHttpStatus";
- public static final String CAMEL_YQL_HTTP_REQUEST = "CamelYqlHttpRequest";
-
- private final YqlEndpoint endpoint;
- private final YqlClient yqlClient;
-
- YqlProducer(final YqlEndpoint endpoint) {
- super(endpoint);
- this.endpoint = endpoint;
- this.yqlClient = new YqlClient(endpoint.getHttpClient());
- }
-
- @Override
- public void process(final Exchange exchange) throws Exception {
- final YqlConfiguration configuration = endpoint.getConfiguration();
- final YqlResponse yqlResponse = yqlClient.get(configuration);
-
- if (configuration.isThrowExceptionOnFailure() && yqlResponse.getStatus() != HttpStatus.SC_OK) {
- throw YqlHttpException.failedWith(yqlResponse.getStatus(), yqlResponse.getBody(), yqlResponse.getHttpRequest());
- }
-
- exchange.getIn().setHeader(CAMEL_YQL_HTTP_STATUS, yqlResponse.getStatus());
- exchange.getIn().setHeader(CAMEL_YQL_HTTP_REQUEST, yqlResponse.getHttpRequest());
- exchange.getIn().setBody(yqlResponse.getBody());
- }
-}
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/client/YqlClient.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/client/YqlClient.java
deleted file mode 100644
index 1f5a7c6..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/client/YqlClient.java
+++ /dev/null
@@ -1,88 +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.yql.client;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.camel.component.yql.configuration.YqlConfiguration;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class YqlClient {
-
- private static final Logger LOG = LoggerFactory.getLogger(YqlClient.class);
-
- private final CloseableHttpClient httpClient;
-
- public YqlClient(final CloseableHttpClient httpClient) {
- this.httpClient = httpClient;
- }
-
- public YqlResponse get(final YqlConfiguration yqlConfiguration) throws Exception {
-
- final URI uri = new URIBuilder()
- .setScheme(yqlConfiguration.isHttps() ? "https" : "http")
- .setHost("query.yahooapis.com")
- .setPath("/v1/public/yql")
- .setParameters(buildParameters(yqlConfiguration))
- .build();
-
- LOG.debug("YQL query: {}", uri);
-
- final HttpGet httpget = new HttpGet(uri);
- try (final CloseableHttpResponse response = httpClient.execute(httpget)) {
- final YqlResponse yqlResponse = YqlResponse.builder()
- .httpRequest(uri.toString())
- .status(response.getStatusLine().getStatusCode())
- .body(EntityUtils.toString(response.getEntity()))
- .build();
- LOG.debug("YQL response: {}", yqlResponse.getBody());
- return yqlResponse;
- }
- }
-
- private List<NameValuePair> buildParameters(final YqlConfiguration yqlConfiguration) {
- final List<NameValuePair> nameValuePairs = new ArrayList<>();
- nameValuePairs.add(new BasicNameValuePair("q", yqlConfiguration.getQuery()));
- nameValuePairs.add(new BasicNameValuePair("format", yqlConfiguration.getFormat()));
- String callback = yqlConfiguration.getCallback();
- if (callback == null) {
- callback = "";
- }
- nameValuePairs.add(new BasicNameValuePair("callback", callback));
- if (yqlConfiguration.getCrossProduct() != null) {
- nameValuePairs.add(new BasicNameValuePair("crossProduct", yqlConfiguration.getCrossProduct()));
- }
- nameValuePairs.add(new BasicNameValuePair("diagnostics", Boolean.toString(yqlConfiguration.isDiagnostics())));
- nameValuePairs.add(new BasicNameValuePair("debug", Boolean.toString(yqlConfiguration.isDebug())));
- if (yqlConfiguration.getEnv() != null) {
- nameValuePairs.add(new BasicNameValuePair("env", yqlConfiguration.getEnv()));
- }
- if (yqlConfiguration.getJsonCompat() != null) {
- nameValuePairs.add(new BasicNameValuePair("jsonCompat", yqlConfiguration.getJsonCompat()));
- }
- return nameValuePairs;
- }
-}
\ No newline at end of file
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/client/YqlResponse.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/client/YqlResponse.java
deleted file mode 100644
index 104ef53..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/client/YqlResponse.java
+++ /dev/null
@@ -1,74 +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.yql.client;
-
-public final class YqlResponse {
-
- private final int status;
- private final String body;
- private final String httpRequest;
-
- private YqlResponse(final Builder builder) {
- this.status = builder.status;
- this.body = builder.body;
- this.httpRequest = builder.httpRequest;
- }
-
- public int getStatus() {
- return status;
- }
-
- public String getBody() {
- return body;
- }
-
- public String getHttpRequest() {
- return httpRequest;
- }
-
- static YqlResponse.Builder builder() {
- return new YqlResponse.Builder();
- }
-
- static class Builder {
- private int status;
- private String body;
- private String httpRequest;
-
- Builder() {
- }
-
- Builder status(final int status) {
- this.status = status;
- return this;
- }
-
- Builder body(final String body) {
- this.body = body;
- return this;
- }
-
- Builder httpRequest(final String httpRequest) {
- this.httpRequest = httpRequest;
- return this;
- }
-
- YqlResponse build() {
- return new YqlResponse(this);
- }
- }
-}
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/configuration/YqlConfiguration.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/configuration/YqlConfiguration.java
deleted file mode 100644
index d459d30..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/configuration/YqlConfiguration.java
+++ /dev/null
@@ -1,176 +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.yql.configuration;
-
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriParams;
-import org.apache.camel.spi.UriPath;
-
-/**
- * YQL configuration that should reflect https://developer.yahoo.com/yql/guide/users-overview.html
- */
-@UriParams
-public class YqlConfiguration {
-
- @UriPath
- @Metadata(required = "true")
- private String query;
-
- @UriParam(enums = "json,xml", defaultValue = "json")
- private String format = "json";
-
- @UriParam
- private String callback;
-
- @UriParam
- private String crossProduct;
-
- @UriParam
- private boolean diagnostics;
-
- @UriParam
- private boolean debug;
-
- @UriParam
- private String env;
-
- @UriParam
- private String jsonCompat;
-
- @UriParam(defaultValue = "true")
- private boolean throwExceptionOnFailure = true;
-
- @UriParam(label = "security", defaultValue = "true")
- private boolean https = true;
-
- public String getQuery() {
- return query;
- }
-
- /**
- * The YQL statement to execute.
- */
- public void setQuery(final String query) {
- this.query = query;
- }
-
- public String getFormat() {
- return format;
- }
-
- /**
- * The expected format. Allowed values: xml or json.
- */
- public void setFormat(final String format) {
- this.format = format;
- }
-
- public String getCallback() {
- return callback;
- }
-
- /**
- * The name of the JavaScript callback function for JSONP format. If callback is set and if format=json, then the response format is JSON. For more
- * information on using XML instead of JSON, see JSONP-X. https://developer.yahoo.com/yql/guide/response.html
- */
- public void setCallback(final String callback) {
- this.callback = callback;
- }
-
- public String getCrossProduct() {
- return crossProduct;
- }
-
- /**
- * When given the value optimized, the projected fields in SELECT statements that may be returned in separate item elements in the response are optimized to be in a single item element instead.
- * The only allowed value is optimized. More information https://developer.yahoo.com/yql/guide/response.html#response-optimizing=
- */
- public void setCrossProduct(final String crossProduct) {
- this.crossProduct = crossProduct;
- }
-
- public boolean isDiagnostics() {
- return diagnostics;
- }
-
- /**
- * If true, diagnostic information is returned with the response.
- */
- public void setDiagnostics(final boolean diagnostics) {
- this.diagnostics = diagnostics;
- }
-
- public boolean isDebug() {
- return debug;
- }
-
- /**
- * If true, and if diagnostic is set to true, debug data is returned with the response.
- * More information: https://developer.yahoo.com/yql/guide/dev-external_tables.html#odt-enable-logging=
- */
- public void setDebug(final boolean debug) {
- this.debug = debug;
- }
-
- public String getEnv() {
- return env;
- }
-
- /**
- * Allows you to use multiple Open Data Tables through a YQL environment file.
- * More information https://developer.yahoo.com/yql/guide/yql_storage.html#using-records-env-files=
- */
- public void setEnv(final String env) {
- this.env = env;
- }
-
- public String getJsonCompat() {
- return jsonCompat;
- }
-
- /**
- * Enables lossless JSON processing. The only allowed value is new.
- * More information https://developer.yahoo.com/yql/guide/response.html#json-to-json
- */
- public void setJsonCompat(final String jsonCompat) {
- this.jsonCompat = jsonCompat;
- }
-
- public boolean isThrowExceptionOnFailure() {
- return throwExceptionOnFailure;
- }
-
- /**
- * Option to disable throwing the YqlHttpException in case of failed responses from the remote server.
- * This allows you to get all responses regardless of the HTTP status code.
- */
- public void setThrowExceptionOnFailure(final boolean throwExceptionOnFailure) {
- this.throwExceptionOnFailure = throwExceptionOnFailure;
- }
-
- public boolean isHttps() {
- return https;
- }
-
- /**
- * Option to use HTTPS to communicate with YQL.
- */
- public void setHttps(final boolean https) {
- this.https = https;
- }
-}
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/configuration/YqlConfigurationValidator.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/configuration/YqlConfigurationValidator.java
deleted file mode 100644
index 124d8f7..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/configuration/YqlConfigurationValidator.java
+++ /dev/null
@@ -1,44 +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.yql.configuration;
-
-import org.apache.camel.component.yql.exception.YqlException;
-import org.apache.commons.lang3.StringUtils;
-
-public final class YqlConfigurationValidator {
-
- private YqlConfigurationValidator() {
- }
-
- public static void validateProperties(final YqlConfiguration configuration) {
- if (StringUtils.isEmpty(configuration.getQuery())) {
- throw new YqlException("<query> is not present or not valid!");
- }
-
- if (!StringUtils.equalsAny(configuration.getFormat(), "json", "xml")) {
- throw new YqlException("<format> is not valid!");
- }
-
- if (configuration.getCrossProduct() != null && !configuration.getCrossProduct().equals("optimized")) {
- throw new YqlException("<crossProduct> is not valid!");
- }
-
- if (configuration.getJsonCompat() != null && !configuration.getJsonCompat().equals("new")) {
- throw new YqlException("<jsonCompat> is not valid!");
- }
- }
-}
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/exception/YqlException.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/exception/YqlException.java
deleted file mode 100644
index d422e5c..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/exception/YqlException.java
+++ /dev/null
@@ -1,24 +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.yql.exception;
-
-public class YqlException extends RuntimeException {
-
- public YqlException(final String message) {
- super(message);
- }
-}
diff --git a/components/camel-yql/src/main/java/org/apache/camel/component/yql/exception/YqlHttpException.java b/components/camel-yql/src/main/java/org/apache/camel/component/yql/exception/YqlHttpException.java
deleted file mode 100644
index 389bba7..0000000
--- a/components/camel-yql/src/main/java/org/apache/camel/component/yql/exception/YqlHttpException.java
+++ /dev/null
@@ -1,50 +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.yql.exception;
-
-/**
- * Signal a non 200 HTTP response
- */
-public final class YqlHttpException extends YqlException {
-
- private final int httpStatus;
- private final String body;
- private final String originalRequest;
-
- private YqlHttpException(final int httpStatus, final String body, final String originalRequest) {
- super("HTTP request to YQL failed");
- this.httpStatus = httpStatus;
- this.body = body;
- this.originalRequest = originalRequest;
- }
-
- public static YqlHttpException failedWith(final int httpStatus, final String body, final String originalRequest) {
- return new YqlHttpException(httpStatus, body, originalRequest);
- }
-
- public int getHttpStatus() {
- return httpStatus;
- }
-
- public String body() {
- return body;
- }
-
- public String getOriginalRequest() {
- return originalRequest;
- }
-}
diff --git a/components/camel-yql/src/main/resources/LICENSE.txt b/components/camel-yql/src/main/resources/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/components/camel-yql/src/main/resources/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/components/camel-yql/src/main/resources/META-INF/services/org/apache/camel/component/yql b/components/camel-yql/src/main/resources/META-INF/services/org/apache/camel/component/yql
deleted file mode 100644
index 748b461..0000000
--- a/components/camel-yql/src/main/resources/META-INF/services/org/apache/camel/component/yql
+++ /dev/null
@@ -1,18 +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.
-#
-
-class=org.apache.camel.component.yql.YqlComponent
diff --git a/components/camel-yql/src/main/resources/NOTICE.txt b/components/camel-yql/src/main/resources/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/components/camel-yql/src/main/resources/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/components/camel-yql/src/test/java/org/apache/camel/component/yql/YqlComponentIntegrationTest.java b/components/camel-yql/src/test/java/org/apache/camel/component/yql/YqlComponentIntegrationTest.java
deleted file mode 100644
index d0e86c7..0000000
--- a/components/camel-yql/src/test/java/org/apache/camel/component/yql/YqlComponentIntegrationTest.java
+++ /dev/null
@@ -1,163 +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.yql;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-import org.apache.camel.CamelExecutionException;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Exchange;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.http.HttpStatus;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import static org.apache.camel.component.yql.YqlProducer.CAMEL_YQL_HTTP_REQUEST;
-import static org.apache.camel.component.yql.YqlProducer.CAMEL_YQL_HTTP_STATUS;
-import static org.hamcrest.CoreMatchers.containsString;
-
-public class YqlComponentIntegrationTest extends CamelTestSupport {
-
- private static final String FINANCE_QUERY = "select symbol, Ask, Bid, from yahoo.finance.quotes where symbol in ('GOOG')";
- private static final String WEATHER_QUERY = "select wind, atmosphere from weather.forecast where woeid in (select woeid from geo.places(1) where text='chicago, il')";
- private static final String BOOK_QUERY = "select * from google.books where q='barack obama' and maxResults=1";
- private static final String CALLBACK = "yqlCallback";
- private static final String ENV = "store://datatables.org/alltableswithkeys";
-
- @Rule
- public final ExpectedException thrown = ExpectedException.none();
-
- @Produce(uri = "direct:startFinance")
- private ProducerTemplate templateFinance;
-
- @EndpointInject(uri = "mock:resultFinance")
- private MockEndpoint endFinance;
-
- @Produce(uri = "direct:startWeather")
- private ProducerTemplate templateWeather;
-
- @EndpointInject(uri = "mock:resultWeather")
- private MockEndpoint endWeather;
-
- @Produce(uri = "direct:startBook")
- private ProducerTemplate templateBook;
-
- @EndpointInject(uri = "mock:resultBook")
- private MockEndpoint endBook;
-
- @Produce(uri = "direct:startFail")
- private ProducerTemplate templateFail;
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- public void configure() {
- from("direct:startFinance")
- .to("yql://" + FINANCE_QUERY + "?format=json&callback=" + CALLBACK + "&https=false&env=" + ENV)
- .to("mock:resultFinance");
-
- from("direct:startWeather")
- .to("yql://" + WEATHER_QUERY)
- .to("mock:resultWeather");
-
- from("direct:startBook")
- .to("yql://" + BOOK_QUERY + "?format=xml&crossProduct=optimized&env=" + ENV)
- .to("mock:resultBook");
-
- from("direct:startFail")
- .to("yql://" + FINANCE_QUERY)
- .to("mock:resultBook");
- }
- };
- }
-
- @Test
- public void testFinanceQuote() throws UnsupportedEncodingException {
- // when
- templateFinance.sendBody("");
-
- // then
- final Exchange exchange = endFinance.getReceivedExchanges().get(0);
- final String body = exchange.getIn().getBody(String.class);
- final Integer status = exchange.getIn().getHeader(CAMEL_YQL_HTTP_STATUS, Integer.class);
- final String httpRequest = exchange.getIn().getHeader(CAMEL_YQL_HTTP_REQUEST, String.class);
- assertThat(httpRequest, containsString("http"));
- assertThat(httpRequest, containsString("q=" + URLEncoder.encode(FINANCE_QUERY, "UTF-8")));
- assertThat(httpRequest, containsString("format=json"));
- assertThat(httpRequest, containsString("callback=" + CALLBACK));
- assertThat(httpRequest, containsString("diagnostics=false"));
- assertThat(httpRequest, containsString("debug=false"));
- assertThat(httpRequest, containsString("env=" + URLEncoder.encode(ENV, "UTF-8")));
- assertNotNull(body);
- assertThat(body, containsString(CALLBACK + "("));
- assertEquals(HttpStatus.SC_OK, status.intValue());
- }
-
- @Test
- public void testWeather() throws UnsupportedEncodingException {
- // when
- templateWeather.sendBody("");
-
- // then
- final Exchange exchange = endWeather.getReceivedExchanges().get(0);
- final String body = exchange.getIn().getBody(String.class);
- final Integer status = exchange.getIn().getHeader(CAMEL_YQL_HTTP_STATUS, Integer.class);
- final String httpRequest = exchange.getIn().getHeader(CAMEL_YQL_HTTP_REQUEST, String.class);
- assertThat(httpRequest, containsString("https"));
- assertThat(httpRequest, containsString("q=" + URLEncoder.encode(WEATHER_QUERY, "UTF-8")));
- assertThat(httpRequest, containsString("format=json"));
- assertThat(httpRequest, containsString("diagnostics=false"));
- assertThat(httpRequest, containsString("debug=false"));
- assertNotNull(body);
- assertEquals(HttpStatus.SC_OK, status.intValue());
- }
-
- @Test
- public void testBook() throws UnsupportedEncodingException {
- // when
- templateBook.sendBody("");
-
- // then
- final Exchange exchange = endBook.getReceivedExchanges().get(0);
- final String body = exchange.getIn().getBody(String.class);
- final Integer status = exchange.getIn().getHeader(CAMEL_YQL_HTTP_STATUS, Integer.class);
- final String httpRequest = exchange.getIn().getHeader(CAMEL_YQL_HTTP_REQUEST, String.class);
- assertThat(httpRequest, containsString("https"));
- assertThat(httpRequest, containsString("q=" + URLEncoder.encode(BOOK_QUERY, "UTF-8")));
- assertThat(httpRequest, containsString("format=xml"));
- assertThat(httpRequest, containsString("diagnostics=false"));
- assertThat(httpRequest, containsString("debug=false"));
- assertThat(httpRequest, containsString("crossProduct=optimized"));
- assertNotNull(body);
- assertEquals(HttpStatus.SC_OK, status.intValue());
- }
-
- @Test
- public void testFail() throws UnsupportedEncodingException {
- // then
- thrown.expect(CamelExecutionException.class);
-
- // when
- templateFail.sendBody("");
- }
-}
diff --git a/components/camel-yql/src/test/java/org/apache/camel/component/yql/YqlComponentTest.java b/components/camel-yql/src/test/java/org/apache/camel/component/yql/YqlComponentTest.java
deleted file mode 100644
index 8328aff..0000000
--- a/components/camel-yql/src/test/java/org/apache/camel/component/yql/YqlComponentTest.java
+++ /dev/null
@@ -1,110 +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.yql;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Producer;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.yql.configuration.YqlConfiguration;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-public class YqlComponentTest extends CamelTestSupport {
-
- @Rule
- public final ExpectedException thrown = ExpectedException.none();
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- public void configure() {
- from("direct:start")
- .to("yql://query?format=json")
- .to("mock:result");
- }
- };
- }
-
- @Test
- public void testCreateProducer() throws Exception {
- // given
- final Endpoint yqlEndpoint = context.getEndpoint("yql://query?format=json");
-
- // when
- final Producer producer = yqlEndpoint.createProducer();
-
- // then
- assertNotNull(producer);
- assertTrue(producer instanceof YqlProducer);
- }
-
- @Test
- public void testConfigurationSetup() {
- // given
- final YqlEndpoint yqlEndpoint = (YqlEndpoint) context.getEndpoint("yql://query?format=xml&callback=yqlCallback&diagnostics=true"
- + "&debug=true&https=false&throwExceptionOnFailure=false&jsonCompat=new");
-
- // when
- final YqlConfiguration yqlConfiguration = yqlEndpoint.getConfiguration();
-
- // then
- assertNotNull(yqlConfiguration);
- assertEquals("query", yqlConfiguration.getQuery());
- assertEquals("xml", yqlConfiguration.getFormat());
- assertEquals("yqlCallback", yqlConfiguration.getCallback());
- assertTrue(yqlConfiguration.isDebug());
- assertTrue(yqlConfiguration.isDiagnostics());
- assertFalse(yqlConfiguration.isHttps());
- assertFalse(yqlConfiguration.isThrowExceptionOnFailure());
- }
-
- @Test
- public void testConfigurationSetupDefault() {
- // given
- final YqlEndpoint yqlEndpoint = (YqlEndpoint) context.getEndpoint("yql://query");
-
- // when
- final YqlConfiguration yqlConfiguration = yqlEndpoint.getConfiguration();
-
- // then
- assertNotNull(yqlConfiguration);
- assertEquals("query", yqlConfiguration.getQuery());
- assertEquals("json", yqlConfiguration.getFormat());
- assertNull(yqlConfiguration.getCallback());
- assertNull(yqlConfiguration.getCrossProduct());
- assertFalse(yqlConfiguration.isDiagnostics());
- assertFalse(yqlConfiguration.isDebug());
- assertNull(yqlConfiguration.getEnv());
- assertNull(yqlConfiguration.getJsonCompat());
- assertTrue(yqlConfiguration.isThrowExceptionOnFailure());
- assertTrue(yqlConfiguration.isHttps());
- }
-
- @Test
- public void testCreateConsumer() throws Exception {
- // then
- thrown.expect(UnsupportedOperationException.class);
-
- // given
- final Endpoint yqlEndpoint = context.getEndpoint("yql://query?format=json");
-
- // when
- yqlEndpoint.createConsumer(null);
- }
-}
diff --git a/components/camel-yql/src/test/java/org/apache/camel/component/yql/configuration/YqlConfigurationValidatorTest.java b/components/camel-yql/src/test/java/org/apache/camel/component/yql/configuration/YqlConfigurationValidatorTest.java
deleted file mode 100644
index af7fa58..0000000
--- a/components/camel-yql/src/test/java/org/apache/camel/component/yql/configuration/YqlConfigurationValidatorTest.java
+++ /dev/null
@@ -1,133 +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.yql.configuration;
-
-import org.apache.camel.component.yql.exception.YqlException;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-public class YqlConfigurationValidatorTest {
-
- @Rule
- public final ExpectedException thrown = ExpectedException.none();
-
- @Test
- public void testValidQuery() {
- // given
- final YqlConfiguration yqlConfiguration = new YqlConfiguration();
- yqlConfiguration.setQuery("select * from ...");
- yqlConfiguration.setFormat("json");
- yqlConfiguration.setCrossProduct("optimized");
- yqlConfiguration.setJsonCompat("new");
-
- // when
- YqlConfigurationValidator.validateProperties(yqlConfiguration);
-
- // then
- // no exception
- }
-
- @Test
- public void testMissingQuery() {
- // then
- thrown.expect(YqlException.class);
- thrown.expectMessage("<query> is not present or not valid!");
-
- // given
- final YqlConfiguration yqlConfiguration = new YqlConfiguration();
-
- // when
- YqlConfigurationValidator.validateProperties(yqlConfiguration);
- }
-
- @Test
- public void testJsonFormat() {
- // given
- final YqlConfiguration yqlConfiguration = new YqlConfiguration();
- yqlConfiguration.setQuery("query");
- yqlConfiguration.setFormat("json");
-
- // when
- YqlConfigurationValidator.validateProperties(yqlConfiguration);
-
- // then
- // no exception
- }
-
- @Test
- public void testXmlFormat() {
- // given
- final YqlConfiguration yqlConfiguration = new YqlConfiguration();
- yqlConfiguration.setQuery("query");
- yqlConfiguration.setFormat("xml");
-
- // when
- YqlConfigurationValidator.validateProperties(yqlConfiguration);
-
- // then
- // no exception
- }
-
- @Test
- public void testWrongFormat() {
- // then
- thrown.expect(YqlException.class);
- thrown.expectMessage("<format> is not valid!");
-
- // given
- final YqlConfiguration yqlConfiguration = new YqlConfiguration();
- yqlConfiguration.setQuery("query");
- yqlConfiguration.setFormat("format");
-
- // when
- YqlConfigurationValidator.validateProperties(yqlConfiguration);
- }
-
- @Test
- public void testWrongCrossProduct() {
- // then
- thrown.expect(YqlException.class);
- thrown.expectMessage("<crossProduct> is not valid!");
-
- // given
- final YqlConfiguration yqlConfiguration = new YqlConfiguration();
- yqlConfiguration.setQuery("query");
- yqlConfiguration.setFormat("xml");
- yqlConfiguration.setCrossProduct("optimizedddd");
-
- // when
- YqlConfigurationValidator.validateProperties(yqlConfiguration);
- }
-
- @Test
- public void testWrongJsonCompat() {
- // then
- thrown.expect(YqlException.class);
- thrown.expectMessage("<jsonCompat> is not valid!");
-
- // given
- final YqlConfiguration yqlConfiguration = new YqlConfiguration();
- yqlConfiguration.setQuery("query");
- yqlConfiguration.setFormat("xml");
- yqlConfiguration.setCrossProduct("optimized");
- yqlConfiguration.setJsonCompat("neww");
-
- // when
- YqlConfigurationValidator.validateProperties(yqlConfiguration);
- }
-}
diff --git a/components/camel-yql/src/test/resources/log4j2.properties b/components/camel-yql/src/test/resources/log4j2.properties
deleted file mode 100644
index 21c4b43..0000000
--- a/components/camel-yql/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,33 +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.
-## ---------------------------------------------------------------------------
-
-appender.file.type = File
-appender.file.name = file
-appender.file.fileName = target/camel-yql-component-test.log
-appender.file.layout.type = PatternLayout
-appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-# uncomment the following line to turn on Camel debugging
-#logger.camel.name = org.apache.camel
-#logger.camel.level =DEBUG
-
-rootLogger.level = INFO
-rootLogger.appenderRef.out.ref = file
diff --git a/components/pom.xml b/components/pom.xml
index 915ba08..e23fd7e 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -290,7 +290,6 @@
<module>camel-xmpp</module>
<module>camel-xstream</module>
<module>camel-yammer</module>
- <module>camel-yql</module>
<module>camel-zendesk</module>
<module>camel-zipfile</module>
<module>camel-zipkin</module>
diff --git a/components/readme.adoc b/components/readme.adoc
index 43caaa0..f12c82a 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,7 +2,7 @@ Components
^^^^^^^^^^
// components: START
-Number of Components: 291 in 193 JAR artifacts (1 deprecated)
+Number of Components: 290 in 192 JAR artifacts (1 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -866,9 +866,6 @@ Number of Components: 291 in 193 JAR artifacts (1 deprecated)
| link:../camel-core/src/main/docs/xslt-component.adoc[XSLT] (camel-core) +
`xslt:resourceUri` | 1.3 | Transforms the message using a XSLT template.
-| link:camel-yql/src/main/docs/yql-component.adoc[Yahoo Query Language] (camel-yql) +
-`yql:query` | 2.21 | The YQL (Yahoo! Query Language) platform enables you to query, filter, and combine data across the web.
-
| link:camel-yammer/src/main/docs/yammer-component.adoc[Yammer] (camel-yammer) +
`yammer:function` | 2.12 | The yammer component allows you to interact with the Yammer enterprise social network.
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index b4d4db7..f6031cb 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -337,7 +337,6 @@
* xref:json-xstream-dataformat.adoc[JSon XStream DataFormat]
* xref:xstream-dataformat.adoc[XStream DataFormat]
* xref:yammer-component.adoc[Yammer Component]
-* xref:yql-component.adoc[Yahoo Query Language Component]
* xref:zendesk-component.adoc[Zendesk Component]
* xref:zipfile-dataformat.adoc[Zip File DataFormat]
* xref:zipkin.adoc[Zipkin Component]
diff --git a/docs/components/modules/ROOT/pages/aws-mq-component.adoc b/docs/components/modules/ROOT/pages/aws-mq-component.adoc
index 90cc37a..d0560b6 100644
--- a/docs/components/modules/ROOT/pages/aws-mq-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws-mq-component.adoc
@@ -131,6 +131,14 @@ the https://aws.amazon.com/it/ec2/[Amazon EC2] service.
|`CamelAwsMQBrokerId` |`String` |The broker id
|`CamelAwsMQBrokerDeploymentMode` |`String` |The deployment mode for the broker in the createBroker operation
+
+|`CamelAwsMQBrokerInstanceType` |`String` |The instance type for the EC2 machine in the createBroker operation
+
+|`CamelAwsMQBrokerEngine` |`String` |The Broker Engine for MQ. Default is ACTIVEMQ
+
+|`CamelAwsMQBrokerEngineVersion` |`String` |The Broker Engine Version for MQ. Currently you can choose between 5.15.6 and 5.15.0 of ACTIVEMQ
+
+|`CamelAwsMQBrokerUsers` |`List<User>` |The list of users for MQ
|=======================================================================
Dependencies
diff --git a/docs/components/modules/ROOT/pages/yql-component.adoc b/docs/components/modules/ROOT/pages/yql-component.adoc
deleted file mode 100644
index 5229e08..0000000
--- a/docs/components/modules/ROOT/pages/yql-component.adoc
+++ /dev/null
@@ -1,257 +0,0 @@
-[[yql-component]]
-== Yahoo Query Language Component
-
-*Available as of Camel version 2.21*
-
-The *yql* component is used for accessing the https://developer.yahoo.com/yql/[Yahoo Query Language platform].
-
-The YQL (Yahoo! Query Language) platform enables you to query, filter, and combine data across the web through
-a single interface. It exposes a SQL-like syntax that is both familiar to developers and expressive enough for
-getting the right data.
-
-Maven users will need to add the following dependency to their `pom.xml`
-for this component:
-
-[source,xml]
-------------------------------------------------------------
-<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-yql</artifactId>
- <version>x.x.x</version>
- <!-- use the same version as your Camel core version -->
-</dependency>
-------------------------------------------------------------
-
-=== URI format
-
-----
-yql://query[?options]
-----
-
-Where *query* represents the YQL query.
-
-=== Options
-
-// component options: START
-The Yahoo Query Language component supports 2 options, which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *connectionManager* (producer) | To use a custom configured HttpClientConnectionManager. | | HttpClientConnection Manager
-| *resolveProperty Placeholders* (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean
-|===
-// component options: END
-
-// endpoint options: START
-The Yahoo Query Language endpoint is configured using URI syntax:
-
-----
-yql:query
-----
-
-with the following path and query parameters:
-
-==== Path Parameters (1 parameters):
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *query* | *Required* The YQL statement to execute. | | String
-|===
-
-
-==== Query Parameters (10 parameters):
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *callback* (producer) | The name of the JavaScript callback function for JSONP format. If callback is set and if format=json, then the response format is JSON. For more information on using XML instead of JSON, see JSONP-X. https://developer.yahoo.com/yql/guide/response.html | | String
-| *crossProduct* (producer) | When given the value optimized, the projected fields in SELECT statements that may be returned in separate item elements in the response are optimized to be in a single item element instead. The only allowed value is optimized. More information https://developer.yahoo.com/yql/guide/response.html#response-optimizing= | | String
-| *debug* (producer) | If true, and if diagnostic is set to true, debug data is returned with the response. More information: https://developer.yahoo.com/yql/guide/dev-external_tables.html#odt-enable-logging= | false | boolean
-| *diagnostics* (producer) | If true, diagnostic information is returned with the response. | false | boolean
-| *env* (producer) | Allows you to use multiple Open Data Tables through a YQL environment file. More information https://developer.yahoo.com/yql/guide/yql_storage.html#using-records-env-files= | | String
-| *format* (producer) | The expected format. Allowed values: xml or json. | json | String
-| *jsonCompat* (producer) | Enables lossless JSON processing. The only allowed value is new. More information https://developer.yahoo.com/yql/guide/response.html#json-to-json | | String
-| *throwExceptionOnFailure* (producer) | Option to disable throwing the YqlHttpException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code. | true | boolean
-| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
-| *https* (security) | Option to use HTTPS to communicate with YQL. | true | boolean
-|===
-// endpoint options: END
-// spring-boot-auto-configure options: START
-=== Spring Boot Auto-Configuration
-
-
-The component supports 3 options, which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *camel.component.yql.connection-manager* | To use a custom configured HttpClientConnectionManager. The option is a org.apache.http.conn.HttpClientConnectionManager type. | | String
-| *camel.component.yql.enabled* | Whether to enable auto configuration of the yql component. This is enabled by default. | | Boolean
-| *camel.component.yql.resolve-property-placeholders* | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | Boolean
-|===
-// spring-boot-auto-configure options: END
-
-
-=== Exchange data format
-
-Camel will deliver the body as a JSON or XML formatted java.lang.String (see
-the `format` option above).
-
-=== Message Headers
-
-[width="100%",cols="10%,90%",options="header",]
-|===
-|Header |Description
-|`CamelYqlHttpRequest` | Original HTTP request sent to YQL.
-|`CamelYqlHttpStatus` | Status code from the response.
-|===
-
-=== Samples
-
-==== Sample 1
-
-In this example we query YQL to obtain the current wind and atmosphere data in Chicago:
-
-[source,java]
-----
-from("direct:start")
- .to("yql://select wind, atmosphere from weather.forecast where woeid in (select woeid from geo.places(1) where text='chicago, il'");
-----
-
-Which will setup the body as:
-
-[source,json]
-----
-{
- "query":{
- "count":1,
- "created":"2017-11-01T19:37:26Z",
- "lang":"en-US",
- "results":{
- "channel":{
- "wind":{
- "chill":"32",
- "direction":"165",
- "speed":"22"
- },
- "atmosphere":{
- "humidity":"71",
- "pressure":"994.0",
- "rising":"0",
- "visibility":"16.1"
- }
- }
- }
- }
-}
-----
-
-and the headers:
-
-[width="100%",cols="30%,70%",options="header",]
-|===
-|Header |Value
-|`CamelYqlHttpRequest` |https://query.yahooapis.com/v1/public/yql?q=select+wind%2C+atmosphere+from+weather.forecast+where+woeid+in+%28select+woeid+from+geo.places%281%29+where+text%3D%22chicago%2C+il%22%29&format=json&callback=&diagnostics=false&debug=false
-|`CamelYqlHttpStatus` |200
-|===
-
-==== Sample 2
-
-In this example we query YQL to obtain the Google quote.
-
-[source,java]
-----
-from("direct:start")
- .to("yql://select symbol, Ask, Bid, AverageDailyVolume from yahoo.finance.quotes where symbol in ('GOOG')?env=store://datatables.org/alltableswithkeys&https=false&callback=yqlCallback");
-----
-
-Which will setup the body as:
-
-[source,json]
-----
-/**/yqlCallback({
- "query":{
- "count":1,
- "created":"2017-11-01T19:48:17Z",
- "lang":"en-US",
- "results":{
- "quote":{
- "symbol":"GOOG",
- "Bid":"1025.57",
- "Ask":"1025.92",
- "AverageDailyVolume":"1350640"AverageDailyVolume
- }
- }
- }
-});
-----
-
-and the headers:
-
-[width="100%",cols="30%,70%",options="header",]
-|===
-|Header |Value
-|`CamelYqlHttpRequest` |http://query.yahooapis.com/v1/public/yql?q=select+symbol%2C+Ask%2C+Bid%2C+AverageDailyVolume+from+yahoo.finance.quotes+where+symbol+in+%28%27GOOG%27%29&format=json&callback=yqlCallback&diagnostics=false&debug=false&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
-|`CamelYqlHttpStatus` |200
-|===
-
-==== Sample 3
-
-In this example we query YQL to obtain one book written by Barack Obama
-
-[source,java]
-----
-from("direct:start")
- .to("yql://select * from google.books where q='barack obama' and maxResults=1?format=xml&crossProduct=optimized&env=store://datatables.org/alltableswithkeys");
-----
-
-Which will setup the body as:
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2017-11-01T20:32:22Z" yahoo:lang="en-US">
- <results>
- <json>
- <kind>books#volumes</kind>
- <totalItems>1993</totalItems>
- <items>
- <kind>books#volume</kind>
- <id>HRCHJp-V0QUC</id>
- <etag>SeTJeSgFDzo</etag>
- <selfLink>https://www.googleapis.com/books/v1/volumes/HRCHJp-V0QUC</selfLink>
- <volumeInfo>
- <title>Dreams from My Father</title>
- <subtitle>A Story of Race and Inheritance</subtitle>
- <authors>Barack Obama</authors>
- <publisher>Broadway Books</publisher>
- <publishedDate>2007-01-09</publishedDate>
- ...
- </volumeInfo>
- </items>
- </json>
- </results>
-</query>
-<!-- total: 646 -->
-----
-
-and the headers:
-
-[width="100%",cols="30%,70%",options="header",]
-|===
-|Header |Value
-|`CamelYqlHttpRequest` |https://query.yahooapis.com/v1/public/yql?q=select+*+from+google.books+where+q%3D%27barack+obama%27+and+maxResults%3D1&format=xml&callback=&crossProduct=optimized&diagnostics=false&debug=false&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
-|`CamelYqlHttpStatus` |200
-|===
-
-=== See Also
-
-* https://developer.yahoo.com/yql/guide/[YQL Official Guide]
diff --git a/parent/pom.xml b/parent/pom.xml
index b108310..691f63a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -2318,11 +2318,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-yql</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-zendesk</artifactId>
<version>${project.version}</version>
</dependency>
@@ -3737,11 +3732,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-yql-starter</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-zendesk-starter</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml
index 83dbf22..051c6c6 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -2570,14 +2570,6 @@
<bundle dependency='true'>mvn:commons-codec/commons-codec/${commons-codec-version}</bundle>
<bundle>mvn:org.apache.camel/camel-yammer/${project.version}</bundle>
</feature>
- <feature name='camel-yql' version='${project.version}' resolver='(obr)' start-level='50'>
- <feature version='${project.version}'>camel-core</feature>
- <bundle dependency='true'>mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore4-version}</bundle>
- <bundle dependency='true'>mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient4-version}</bundle>
- <bundle dependency='true'>mvn:commons-codec/commons-codec/${commons-codec-version}</bundle>
- <bundle dependency='true'>mvn:org.apache.commons/commons-lang3/${commons-lang3-version}</bundle>
- <bundle>mvn:org.apache.camel/camel-yql/${project.version}</bundle>
- </feature>
<feature name='camel-zendesk' version='${project.version}' resolver='(obr)' start-level='50'>
<feature version='${project.version}'>camel-core</feature>
<bundle dependency='true'>wrap:mvn:com.cloudbees.thirdparty/zendesk-java-client/${zendesk-client-version}</bundle>
diff --git a/platforms/spring-boot/components-starter/camel-yql-starter/pom.xml b/platforms/spring-boot/components-starter/camel-yql-starter/pom.xml
deleted file mode 100644
index ba16a3e..0000000
--- a/platforms/spring-boot/components-starter/camel-yql-starter/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>components-starter</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
- <artifactId>camel-yql-starter</artifactId>
- <packaging>jar</packaging>
- <name>Spring-Boot Starter :: Camel :: Yql</name>
- <description>Spring-Boot Starter for Camel Yahoo Query Language Component</description>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- <version>${spring-boot-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-yql</artifactId>
- <version>${project.version}</version>
- <!--START OF GENERATED CODE-->
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- <!--END OF GENERATED CODE-->
- </dependency>
- <!--START OF GENERATED CODE-->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-boot-starter</artifactId>
- </dependency>
- <!--END OF GENERATED CODE-->
- </dependencies>
-</project>
diff --git a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/java/org/apache/camel/component/yql/springboot/YqlComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-yql-starter/src/main/java/org/apache/camel/component/yql/springboot/YqlComponentAutoConfiguration.java
deleted file mode 100644
index 1417f0b..0000000
--- a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/java/org/apache/camel/component/yql/springboot/YqlComponentAutoConfiguration.java
+++ /dev/null
@@ -1,128 +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.yql.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.yql.YqlComponent;
-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.support.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,
- YqlComponentAutoConfiguration.GroupConditions.class})
-@AutoConfigureAfter(CamelAutoConfiguration.class)
-@EnableConfigurationProperties({ComponentConfigurationProperties.class,
- YqlComponentConfiguration.class})
-public class YqlComponentAutoConfiguration {
-
- private static final Logger LOGGER = LoggerFactory
- .getLogger(YqlComponentAutoConfiguration.class);
- @Autowired
- private ApplicationContext applicationContext;
- @Autowired
- private CamelContext camelContext;
- @Autowired
- private YqlComponentConfiguration configuration;
- @Autowired(required = false)
- private List<ComponentCustomizer<YqlComponent>> customizers;
-
- static class GroupConditions extends GroupCondition {
- public GroupConditions() {
- super("camel.component", "camel.component.yql");
- }
- }
-
- @Lazy
- @Bean(name = "yql-component")
- @ConditionalOnMissingBean(YqlComponent.class)
- public YqlComponent configureYqlComponent() throws Exception {
- YqlComponent component = new YqlComponent();
- 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<YqlComponent> customizer : customizers) {
- boolean useCustomizer = (customizer instanceof HasId)
- ? HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.component.customizer",
- "camel.component.yql.customizer",
- ((HasId) customizer).getId())
- : HierarchicalPropertiesEvaluator.evaluate(
- applicationContext.getEnvironment(),
- "camel.component.customizer",
- "camel.component.yql.customizer");
- if (useCustomizer) {
- LOGGER.debug("Configure component {}, with customizer {}",
- component, customizer);
- customizer.customize(component);
- }
- }
- }
- return component;
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/java/org/apache/camel/component/yql/springboot/YqlComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-yql-starter/src/main/java/org/apache/camel/component/yql/springboot/YqlComponentConfiguration.java
deleted file mode 100644
index b25863c..0000000
--- a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/java/org/apache/camel/component/yql/springboot/YqlComponentConfiguration.java
+++ /dev/null
@@ -1,68 +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.yql.springboot;
-
-import javax.annotation.Generated;
-import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * The YQL (Yahoo! Query Language) platform enables you to query, filter, and
- * combine data across the web.
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
-@ConfigurationProperties(prefix = "camel.component.yql")
-public class YqlComponentConfiguration
- extends
- ComponentConfigurationPropertiesCommon {
-
- /**
- * Whether to enable auto configuration of the yql component. This is
- * enabled by default.
- */
- private Boolean enabled;
- /**
- * To use a custom configured HttpClientConnectionManager. The option is a
- * org.apache.http.conn.HttpClientConnectionManager type.
- */
- private String connectionManager;
- /**
- * 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 String getConnectionManager() {
- return connectionManager;
- }
-
- public void setConnectionManager(String connectionManager) {
- this.connectionManager = connectionManager;
- }
-
- public Boolean getResolvePropertyPlaceholders() {
- return resolvePropertyPlaceholders;
- }
-
- public void setResolvePropertyPlaceholders(
- Boolean resolvePropertyPlaceholders) {
- this.resolvePropertyPlaceholders = resolvePropertyPlaceholders;
- }
-}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/LICENSE.txt b/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/NOTICE.txt b/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/spring.factories b/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 6418b38..0000000
--- a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,19 +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.
-## ---------------------------------------------------------------------------
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.component.yql.springboot.YqlComponentAutoConfiguration
diff --git a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/spring.provides b/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/spring.provides
deleted file mode 100644
index edc4c9d..0000000
--- a/platforms/spring-boot/components-starter/camel-yql-starter/src/main/resources/META-INF/spring.provides
+++ /dev/null
@@ -1,17 +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.
-## ---------------------------------------------------------------------------
-provides: camel-yql
diff --git a/platforms/spring-boot/components-starter/pom.xml b/platforms/spring-boot/components-starter/pom.xml
index 3f30e5b..48c6567 100644
--- a/platforms/spring-boot/components-starter/pom.xml
+++ b/platforms/spring-boot/components-starter/pom.xml
@@ -338,7 +338,6 @@
<module>camel-xmpp-starter</module>
<module>camel-xstream-starter</module>
<module>camel-yammer-starter</module>
- <module>camel-yql-starter</module>
<module>camel-zendesk-starter</module>
<module>camel-zipfile-starter</module>
<module>camel-zipkin-starter</module>
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 664b2c8..5b03a3d 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
@@ -3116,16 +3116,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-yql</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-yql-starter</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-zendesk</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelYqlTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelYqlTest.java
deleted file mode 100644
index f3944c3..0000000
--- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelYqlTest.java
+++ /dev/null
@@ -1,34 +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.itest.karaf;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.junit.PaxExam;
-
-@RunWith(PaxExam.class)
-public class CamelYqlTest extends BaseKarafTest {
-
- public static final String COMPONENT = extractName(CamelYqlTest.class);
-
- @Test
- public void test() throws Exception {
- testComponent(COMPONENT);
- }
-
-
-}
\ No newline at end of file
diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelYqlTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelYqlTest.java
deleted file mode 100644
index c553d41..0000000
--- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelYqlTest.java
+++ /dev/null
@@ -1,47 +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.itest.springboot;
-
-import org.apache.camel.itest.springboot.util.ArquillianPackager;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.Archive;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-
-@RunWith(Arquillian.class)
-public class CamelYqlTest extends AbstractSpringBootTestSupport {
-
- @Deployment
- public static Archive<?> createSpringBootPackage() throws Exception {
- return ArquillianPackager.springBootPackage(createTestConfig());
- }
-
- public static ITestConfig createTestConfig() {
- return new ITestConfigBuilder()
- .module(inferModuleName(CamelYqlTest.class))
- .build();
- }
-
- @Test
- public void componentTests() throws Exception {
- this.runComponentTest(config);
- this.runModuleUnitTestsIfEnabled(config);
- }
-
-}