camel git commit: [CAMEL-10786] Adding a missing doc resource

2017-02-27 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 82c57a965 -> 99084f4b1


[CAMEL-10786] Adding a missing doc resource


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/99084f4b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/99084f4b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/99084f4b

Branch: refs/heads/master
Commit: 99084f4b1c7c6fb2c6ff58678a8823baee29a4e1
Parents: 82c57a9
Author: Sergey Beryozkin 
Authored: Mon Feb 27 13:41:49 2017 +
Committer: Sergey Beryozkin 
Committed: Mon Feb 27 13:41:49 2017 +

--
 .../src/main/docs/azure-queue-component.adoc| 150 +++
 1 file changed, 150 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/99084f4b/components/camel-azure/src/main/docs/azure-queue-component.adoc
--
diff --git a/components/camel-azure/src/main/docs/azure-queue-component.adoc 
b/components/camel-azure/src/main/docs/azure-queue-component.adoc
new file mode 100644
index 000..c50f454
--- /dev/null
+++ b/components/camel-azure/src/main/docs/azure-queue-component.adoc
@@ -0,0 +1,150 @@
+## Azure Storage Queue Service Component
+
+*Available as of Camel version 2.19*
+
+The Azure Queue component supports storing and retrieving the messages to/from
+https://azure.microsoft.com/services/storage/queues/[Azure Storage Queue] 
service.
+
+Prerequisites
+
+You must have a valid Windows Azure Storage account. More information is 
available at
+https://docs.microsoft.com/azure/[Azure Documentation Portal].
+
+### URI Format
+
+[source,java]
+--
+azure-queue://accountName/queueName[?options]
+--
+
+The queue will be created if it does not already exist. +
+ You can append query options to the URI in the following format,
+?options=value&option2=value&...
+
+For example in order to get a message content from the queue `messageQueue` 
+in the `camelazure` storage account and, use the following snippet:
+
+[source,java]
+
+from("azure-queue:/camelazure/messageQueue").
+to("file://queuedirectory");
+
+
+### URI Options
+
+
+// component options: START
+The Azure Storage Queue Service component has no options.
+// component options: END
+
+
+
+
+
+
+
+
+
+
+
+// endpoint options: START
+The Azure Storage Queue Service component supports 11 endpoint options which 
are listed below:
+
+{% raw %}
+[width="100%",cols="2,1,1m,1m,5",options="header"]
+|===
+| Name | Group | Default | Java Type | Description
+| containerAndQueueUri | common |  | String | *Required* Container Queue 
compact Uri
+| azureQueueClient | common |  | CloudQueue | The queue service client
+| credentials | common |  | StorageCredentials | Set the storage credentials 
required in most cases
+| bridgeErrorHandler | consumer | false | boolean | Allows for bridging the 
consumer to the Camel routing Error Handler which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages or the likes will now 
be processed as a message and handled by the routing Error Handler. By default 
the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored.
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the 
consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler 
is enabled then this options is not in use. By default the consumer will deal 
with exceptions that will be logged at WARN or ERROR level and ignored.
+| exchangePattern | consumer (advanced) |  | ExchangePattern | Sets the 
exchange pattern when the consumer creates an exchange.
+| messageTimeToLive | producer |  | int | Message Time To Live in seconds
+| messageVisibilityDelay | producer |  | int | Message Visibility Delay in 
seconds
+| operation | producer | listQueues | QueueServiceOperations | Queue service 
operation hint to the producer
+| queuePrefix | producer |  | String | Set a prefix which can be used for 
listing the queues
+| synchronous | advanced | false | boolean | Sets whether synchronous 
processing should be strictly used or Camel is allowed to use asynchronous 
processing (if supported).
+|===
+{% endraw %}
+// endpoint options: END
+
+
+
+Required Azure Storage Queue Service component options
+
+You have to provide the containerAndQueue URI  and the credentials.
+
+### Usage
+
+ Message headers evaluated by the Azure Storage Queue Service 

camel git commit: [CAMEL-10786] Minor Azure Queue comp test and doc updates

2017-02-27 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 4d9ad42bf -> 82c57a965


[CAMEL-10786] Minor Azure Queue comp test and doc updates


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/82c57a96
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/82c57a96
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/82c57a96

Branch: refs/heads/master
Commit: 82c57a965fb9792c2cd825662130c81f2a191813
Parents: 4d9ad42
Author: Sergey Beryozkin 
Authored: Mon Feb 27 13:40:54 2017 +
Committer: Sergey Beryozkin 
Committed: Mon Feb 27 13:40:54 2017 +

--
 .../src/main/docs/azure-blob-component.adoc |  4 +--
 components/camel-azure/src/main/docs/azure.adoc |  1 +
 .../azure/queue/QueueServiceEndpoint.java   |  6 ++--
 .../QueueServiceComponentConfigurationTest.java | 37 
 4 files changed, 42 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/82c57a96/components/camel-azure/src/main/docs/azure-blob-component.adoc
--
diff --git a/components/camel-azure/src/main/docs/azure-blob-component.adoc 
b/components/camel-azure/src/main/docs/azure-blob-component.adoc
index 69e7629..765e25e 100644
--- a/components/camel-azure/src/main/docs/azure-blob-component.adoc
+++ b/components/camel-azure/src/main/docs/azure-blob-component.adoc
@@ -21,7 +21,7 @@ In most cases a blobName is required and the blob will be 
created if it does not
  You can append query options to the URI in the following format,
 ?options=value&option2=value&...
 
-For example in order to download a blob content to/from the public block blob 
`blockBlob` 
+For example in order to download a blob content from the public block blob 
`blockBlob` 
 located on the `container1` in the `camelazure` storage account, use the 
following snippet:
 
 [source,java]
@@ -92,8 +92,6 @@ You have to provide the containerOrBlob name and the 
credentials if the private
 |===
 |Header |Type |Description
 
-|`CamelAwsS3BucketName` |`String` |The bucket Name which this object will be 
stored or which will be used for the current operation
-
 |===
 
  Message headers set by the Azure Storage Blob Service producer

http://git-wip-us.apache.org/repos/asf/camel/blob/82c57a96/components/camel-azure/src/main/docs/azure.adoc
--
diff --git a/components/camel-azure/src/main/docs/azure.adoc 
b/components/camel-azure/src/main/docs/azure.adoc
index 2054555..ea11038 100644
--- a/components/camel-azure/src/main/docs/azure.adoc
+++ b/components/camel-azure/src/main/docs/azure.adoc
@@ -11,4 +11,5 @@ provide connectivity to Azure services from Camel.
 |Azure Service |Camel Component |Camel Version | Component Description
 
 |https://azure.microsoft.com/services/storage/blobs[Storage Blob Service] 
|link:azure-blob.html[Azure-Blob] |2.9.0 |Supports storing and retrieving of 
blobs
+|https://azure.microsoft.com/services/storage/queues[Storage Queue Service] 
|link:azure-queue.html[Azure-Queue] |2.9.0 |Supports storing and retrieving of 
messages in the queues
 |===

http://git-wip-us.apache.org/repos/asf/camel/blob/82c57a96/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
index b111cd3..5173ada 100644
--- 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
@@ -34,16 +34,16 @@ import org.slf4j.LoggerFactory;
 @UriEndpoint(firstVersion = "2.19.0",
  scheme = "azure-queue",
  title = "Azure Storage Queue Service", 
- syntax = "azure-blob:queueOrMessageUri", 
+ syntax = "azure-blob:containerAndQueueUri", 
  consumerClass = QueueServiceConsumer.class,
  label = "cloud,queue,azure")
 public class QueueServiceEndpoint extends DefaultEndpoint {
 
 private static final Logger LOG = 
LoggerFactory.getLogger(QueueServiceEndpoint.class);
 
-@UriPath(description = "Queue or Message compact Uri")
+@UriPath(description = "Container Queue compact Uri")
 @Metadata(required = "true")
-private String queueOrMessageUri

camel git commit: [CAMEL-10786] Prototyping QueueService producer/consumer, with no test tries so far due to the account unavailability

2017-02-22 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 46f83c924 -> 9a5357e66


[CAMEL-10786] Prototyping QueueService producer/consumer, with no test tries so 
far due to the account unavailability


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9a5357e6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9a5357e6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9a5357e6

Branch: refs/heads/master
Commit: 9a5357e669a0fd466fd9c6c2463ccdc651daee03
Parents: 46f83c9
Author: Sergey Beryozkin 
Authored: Wed Feb 22 16:41:06 2017 +
Committer: Sergey Beryozkin 
Committed: Wed Feb 22 16:41:06 2017 +

--
 .../azure/blob/BlobServiceConstants.java|   1 +
 .../azure/blob/BlobServiceProducer.java |  12 +-
 .../azure/blob/BlobServiceRequestOptions.java   |  14 +-
 .../component/azure/blob/BlobServiceUtil.java   |   3 +-
 .../common/AbstractServiceRequestOptions.java   |  31 
 .../azure/queue/QueueServiceConfiguration.java  |  46 +-
 .../azure/queue/QueueServiceConstants.java  |  11 +-
 .../azure/queue/QueueServiceConsumer.java   |  12 +-
 .../azure/queue/QueueServiceOperations.java |  11 +-
 .../azure/queue/QueueServiceProducer.java   | 145 +--
 .../azure/queue/QueueServiceRequestOptions.java |  33 +
 .../component/azure/queue/QueueServiceUtil.java |  30 
 12 files changed, 312 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/9a5357e6/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceConstants.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceConstants.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceConstants.java
index f8f644a..2fd1a99 100644
--- 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceConstants.java
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceConstants.java
@@ -22,6 +22,7 @@ public interface BlobServiceConstants {
 String BLOB_CLIENT = "AzureBlobClient";
 
 String SERVICE_URI_SEGMENT = ".blob.core.windows.net";
+String BLOB_SERVICE_REQUEST_OPTIONS = "BlobServiceRequestOptions";
 String ACCESS_CONDITION = "BlobAccessCondition";
 String BLOB_REQUEST_OPTIONS = "BlobRequestOptions";
 String OPERATION_CONTEXT = "BlobOperationContext";

http://git-wip-us.apache.org/repos/asf/camel/blob/9a5357e6/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
index 0f01588..360b4aa 100644
--- 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
@@ -120,9 +120,15 @@ public class BlobServiceProducer extends DefaultProducer {
 LOG.trace("Getting the blob list from the container [{}] from exchange 
[{}]...", 
   getConfiguration().getContainerName(), exchange);
 BlobServiceConfiguration cfg = getConfiguration();
-@SuppressWarnings("unchecked")
-EnumSet details = 
-
(EnumSet)exchange.getIn().getHeader(BlobServiceConstants.BLOB_LISTING_DETAILS);
 
+EnumSet details = null;
+Object detailsObject = 
exchange.getIn().getHeader(BlobServiceConstants.BLOB_LISTING_DETAILS);
+if (detailsObject instanceof EnumSet) {
+@SuppressWarnings("unchecked")
+EnumSet theDetails = 
(EnumSet)detailsObject;
+details = theDetails;
+} else if (detailsObject instanceof BlobListingDetails) {
+details = EnumSet.of((BlobListingDetails)detailsObject);
+}
 Iterable items = 
 client.listBlobs(cfg.getBlobPrefix(), cfg.isUseFlatListing(), 
  details, opts.getRequestOpts(), 
opts.getOpContext());

http://git-wip-us.apache.org/repos/asf/camel/blob/9a5357e6/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceRequestOptions.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceRequestOptions.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceRequestOptions.j

camel git commit: [CAMEL-10786] Removing redundant imports

2017-02-22 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 130bec905 -> 47fa4edd4


[CAMEL-10786] Removing redundant imports


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/47fa4edd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/47fa4edd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/47fa4edd

Branch: refs/heads/master
Commit: 47fa4edd4e569c6d69878b34c57862666578edbd
Parents: 130bec9
Author: Sergey Beryozkin 
Authored: Wed Feb 22 11:53:20 2017 +
Committer: Sergey Beryozkin 
Committed: Wed Feb 22 11:53:20 2017 +

--
 .../apache/camel/component/azure/queue/QueueServiceEndpoint.java | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/47fa4edd/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
index 3f70804..b111cd3 100644
--- 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceEndpoint.java
@@ -20,10 +20,6 @@ import org.apache.camel.Component;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.component.azure.blob.BlobServiceConfiguration;
-import org.apache.camel.component.azure.blob.BlobServiceConsumer;
-import org.apache.camel.component.azure.blob.BlobServiceOperations;
-import org.apache.camel.component.azure.blob.BlobServiceProducer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;



camel git commit: [CAMEL-10786] Adding a test

2017-02-21 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 770e6cabf -> 5af6726de


[CAMEL-10786] Adding a test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5af6726d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5af6726d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5af6726d

Branch: refs/heads/master
Commit: 5af6726dee764dcd75a181c7af4d3de3187786de
Parents: 770e6ca
Author: Sergey Beryozkin 
Authored: Tue Feb 21 13:40:38 2017 +
Committer: Sergey Beryozkin 
Committed: Tue Feb 21 13:40:38 2017 +

--
 .../azure/blob/BlobServiceComponentConfigurationTest.java   | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5af6726d/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceComponentConfigurationTest.java
--
diff --git 
a/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceComponentConfigurationTest.java
 
b/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceComponentConfigurationTest.java
index b9195e3..710611d 100644
--- 
a/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceComponentConfigurationTest.java
+++ 
b/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceComponentConfigurationTest.java
@@ -237,6 +237,15 @@ public class BlobServiceComponentConfigurationTest extends 
CamelTestSupport {
 }
 }
 
+@Test
+public void testHierarchicalBlobName() throws Exception {
+registerCredentials();
+BlobServiceComponent component = new BlobServiceComponent(context);
+BlobServiceEndpoint endpoint = 
+
(BlobServiceEndpoint)component.createEndpoint("azure-blob://camelazure/component1/blob/sub?credentials=#creds");
+assertEquals("blob/sub", endpoint.getConfiguration().getBlobName());
+}
+
 private static void createConsumer(Endpoint endpoint) throws Exception {
 endpoint.createConsumer(new Processor() {
 @Override



[2/2] camel git commit: [CAMEL-10786] Adding the missing resources

2017-02-21 Thread sergeyb
[CAMEL-10786] Adding the missing resources


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/507e8b5f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/507e8b5f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/507e8b5f

Branch: refs/heads/master
Commit: 507e8b5f849e85f78548cba2acfd9341e5975b07
Parents: 1b40de6
Author: Sergey Beryozkin 
Authored: Tue Feb 21 12:43:51 2017 +
Committer: Sergey Beryozkin 
Committed: Tue Feb 21 12:43:51 2017 +

--
 .../azure/queue/QueueServiceComponent.java  |  70 ++
 .../azure/queue/QueueServiceConfiguration.java  |  66 ++
 .../azure/queue/QueueServiceConstants.java  |  28 
 .../azure/queue/QueueServiceConsumer.java   |  68 ++
 .../azure/queue/QueueServiceEndpoint.java   |  83 
 .../azure/queue/QueueServiceOperations.java |  22 
 .../azure/queue/QueueServiceProducer.java   |  93 ++
 .../component/azure/queue/QueueServiceUtil.java |  67 ++
 .../org/apache/camel/component/azure-queue  |  18 +++
 .../QueueServiceComponentConfigurationTest.java | 128 +++
 .../azure/queue/QueueServiceUtilTest.java   |  88 +
 .../QueueServiceComponentAutoConfiguration.java |  80 
 12 files changed, 811 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/507e8b5f/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceComponent.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceComponent.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceComponent.java
new file mode 100644
index 000..42bd47d
--- /dev/null
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/queue/QueueServiceComponent.java
@@ -0,0 +1,70 @@
+/**
+ * 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.azure.queue;
+
+import java.util.Map;
+
+import com.microsoft.azure.storage.StorageCredentials;
+import com.microsoft.azure.storage.queue.CloudQueue;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.impl.UriEndpointComponent;
+
+public class QueueServiceComponent extends UriEndpointComponent {
+
+public QueueServiceComponent() {
+super(QueueServiceEndpoint.class);
+}
+
+public QueueServiceComponent(CamelContext context) {
+super(context, QueueServiceEndpoint.class);
+}
+
+protected Endpoint createEndpoint(String uri, String remaining, 
Map parameters) throws Exception {
+QueueServiceConfiguration configuration = new 
QueueServiceConfiguration();
+setProperties(configuration, parameters);
+
+String[] parts = null;
+if (remaining != null) {
+parts = remaining.split("/"); 
+}
+if (parts == null || parts.length < 2) {
+throw new IllegalArgumentException("The account and queue names 
must be specified.");
+}
+if (parts.length > 2) {
+throw new IllegalArgumentException("Only the account and queue 
names must be specified.");
+}
+
+configuration.setAccountName(parts[0]);
+configuration.setQueueName(parts[1]);
+
+checkCredentials(configuration);
+
+QueueServiceEndpoint endpoint = new QueueServiceEndpoint(uri, this, 
configuration);
+setProperties(endpoint, parameters);
+return endpoint;
+}
+
+private void checkCredentials(QueueServiceConfiguration cfg) {
+CloudQueue client = cfg.getAzureQueueClient();
+StorageCredentials creds = client == null ? cfg.getCredentials() 
+: client.getServiceClient().getCredentials(); 
+if (creds == null) {
+throw new IllegalArgumentException("Credentials must be 
specified.");
+}
+}
+}

http://git-wip

[1/2] camel git commit: [CAMEL-10786] Adding initial Azure Queue component code

2017-02-21 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master dbeb42c42 -> 507e8b5f8


[CAMEL-10786] Adding initial Azure Queue component code


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1b40de61
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1b40de61
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1b40de61

Branch: refs/heads/master
Commit: 1b40de614c99824efcaf2e438acc3df2a5b9b8c0
Parents: dbeb42c
Author: Sergey Beryozkin 
Authored: Tue Feb 21 12:39:40 2017 +
Committer: Sergey Beryozkin 
Committed: Tue Feb 21 12:39:40 2017 +

--
 .../src/main/docs/azure-blob-component.adoc |  6 ++--
 .../azure/blob/BlobServiceComponent.java|  2 +-
 .../azure/blob/BlobServiceConfiguration.java| 32 ++--
 .../azure/common/AbstractConfiguration.java |  1 -
 .../BlobServiceComponentConfigurationTest.java  | 11 +++
 ...dditional-spring-configuration-metadata.json |  6 
 .../main/resources/META-INF/spring.factories|  4 ++-
 7 files changed, 40 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1b40de61/components/camel-azure/src/main/docs/azure-blob-component.adoc
--
diff --git a/components/camel-azure/src/main/docs/azure-blob-component.adoc 
b/components/camel-azure/src/main/docs/azure-blob-component.adoc
index de323e7..69e7629 100644
--- a/components/camel-azure/src/main/docs/azure-blob-component.adoc
+++ b/components/camel-azure/src/main/docs/azure-blob-component.adoc
@@ -62,7 +62,7 @@ The Azure Storage Blob Service component supports 20 endpoint 
options which are
 | credentials | common |  | StorageCredentials | Set the storage credentials 
required in most cases
 | dataLength | common |  | Long | Set the data length for the download or page 
blob upload operations
 | fileDir | common |  | String | Set the file directory where the downloaded 
blobs will be saved to
-| publicForRead | common | false | boolean | Blobs can be public for reading 
their content if this property is enabled then the credentials do not have to 
be set
+| publicForRead | common | false | boolean | Storage resources can be public 
for reading their content if this property is enabled then the credentials do 
not have to be set
 | streamReadSize | common |  | int | Set the minimum read size in bytes when 
reading the blob content
 | bridgeErrorHandler | consumer | false | boolean | Allows for bridging the 
consumer to the Camel routing Error Handler which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages or the likes will now 
be processed as a message and handled by the routing Error Handler. By default 
the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored.
 | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the 
consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler 
is enabled then this options is not in use. By default the consumer will deal 
with exceptions that will be logged at WARN or ERROR level and ignored.
@@ -70,7 +70,7 @@ The Azure Storage Blob Service component supports 20 endpoint 
options which are
 | blobMetadata | producer |  | Map | Set the blob meta-data
 | blobPrefix | producer |  | String | Set a prefix which can be used for 
listing the blobs
 | closeStreamAfterWrite | producer | true | boolean | Close the stream after 
write or keep it open default is true
-| operation | producer | listBlobs | BlobServiceOperations | Required blob 
service operation hint to the producer
+| operation | producer | listBlobs | BlobServiceOperations | Blob service 
operation hint to the producer
 | streamWriteSize | producer |  | int | Set the size of the buffer for writing 
block and page blocks
 | useFlatListing | producer | true | boolean | Specify if the flat or 
hierarchical blob listing should be used
 | synchronous | advanced | false | boolean | Sets whether synchronous 
processing should be strictly used or Camel is allowed to use asynchronous 
processing (if supported).
@@ -162,4 +162,4 @@ where `${camel-version`} must be replaced by the actual 
version of Camel
 * link:endpoint.html[Endpoint]
 * link:getting-started.html[Getting Started]
 
-* link:azure.html[Azure Component]
\ No newline at end of file
+* link:azure.html[Azure Component]

http://git-wip-us.apache.org/repos/asf/camel/blob/1b40de61/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceComponent.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceComponent.java
 
b/components

camel git commit: [CAMEL-10823] Starting with the camel-azure docs

2017-02-17 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master af4902b36 -> 6978bc785


[CAMEL-10823] Starting with the camel-azure docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6978bc78
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6978bc78
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6978bc78

Branch: refs/heads/master
Commit: 6978bc78595cc3232e524b60049fa0549c06b95c
Parents: af4902b
Author: Sergey Beryozkin 
Authored: Fri Feb 17 17:21:35 2017 +
Committer: Sergey Beryozkin 
Committed: Fri Feb 17 17:21:35 2017 +

--
 .../src/main/docs/azure-blob-component.adoc | 165 +++
 components/camel-azure/src/main/docs/azure.adoc |  14 ++
 2 files changed, 179 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/6978bc78/components/camel-azure/src/main/docs/azure-blob-component.adoc
--
diff --git a/components/camel-azure/src/main/docs/azure-blob-component.adoc 
b/components/camel-azure/src/main/docs/azure-blob-component.adoc
new file mode 100644
index 000..bee884f
--- /dev/null
+++ b/components/camel-azure/src/main/docs/azure-blob-component.adoc
@@ -0,0 +1,165 @@
+## Azure Storage Blob Service Component
+
+*Available as of Camel version *
+
+The Azure Blob component supports storing and retrieving the blobs to/from
+https://azure.microsoft.com/services/storage/blobs/[Azure Storage Blob] 
service.
+
+Prerequisites
+
+You must have a valid Windows Azure Storage account. More information is 
available at
+https://docs.microsoft.com/azure/[Azure Documentation Portal].
+
+### URI Format
+
+[source,java]
+--
+azure-blob://accountName/containerName[/blobName][?options]
+--
+
+In most cases a blobName is required and the blob will be created if it does 
not already exist. +
+ You can append query options to the URI in the following format,
+?options=value&option2=value&...
+
+For example in order to download a blob content to/from the public block blob 
`blockBlob` 
+located on the `container1` in the `camelazure` storage account, use the 
following snippet:
+
+[source,java]
+
+from("azure-blob:/camelazure/container1/blockBlob").
+to("file://blobdirectory");
+
+
+### URI Options
+
+
+// component options: START
+The Azure Storage Blob Service component has no options.
+// component options: END
+
+
+
+
+
+
+
+
+
+
+
+// endpoint options: START
+The Azure Storage Blob Service component supports 20 endpoint options which 
are listed below:
+
+{% raw %}
+[width="100%",cols="2,1,1m,1m,5",options="header"]
+|===
+| Name | Group | Default | Java Type | Description
+| containerOrBlobUri | common |  | String | *Required* Container or Blob 
compact Uri
+| azureBlobClient | common |  | CloudBlob | The blob service client
+| blobOffset | common | 0 | Long | Set the blob offset for the upload or 
download operations default is 0
+| blobType | common | blockblob | BlobType | Set a blob type 'blockblob' is 
default
+| closeStreamAfterRead | common | true | boolean | Close the stream after read 
or keep it open default is true
+| credentials | common |  | StorageCredentials | Set the storage credentials 
required in most cases
+| dataLength | common |  | Long | Set the data length for the download or page 
blob upload operations
+| fileDir | common |  | String | Set the file directory where the downloaded 
blobs will be saved to
+| publicForRead | common | false | boolean | Blobs can be public for reading 
their content if this property is enabled then the credentials do not have to 
be set
+| streamReadSize | common |  | int | Set the minimum read size in bytes when 
reading the blob content
+| bridgeErrorHandler | consumer | false | boolean | Allows for bridging the 
consumer to the Camel routing Error Handler which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages or the likes will now 
be processed as a message and handled by the routing Error Handler. By default 
the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored.
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the 
consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler 
is enabled then this options is not in use. By default the consumer will deal 
with exceptions that will be logged at WARN or ERROR level and ignored.
+| exchangePattern | consumer (advanced) |  | ExchangePattern | Sets the

[1/2] camel git commit: [CAMEL-10876] BlobInputStrean should be available to the producers like File

2017-02-17 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master cd11f2d06 -> af4902b36


[CAMEL-10876] BlobInputStrean should be available to the producers like File


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c6e58c83
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c6e58c83
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c6e58c83

Branch: refs/heads/master
Commit: c6e58c830cb57d22e38d75fc9036433f5eef4818
Parents: 451887e
Author: Sergey Beryozkin 
Authored: Fri Feb 17 17:02:45 2017 +
Committer: Sergey Beryozkin 
Committed: Fri Feb 17 17:02:45 2017 +

--
 .../component/azure/blob/BlobServiceUtil.java   | 45 +++-
 .../blob/BlobServiceBlockConsumerTest.java  |  5 ++-
 2 files changed, 30 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c6e58c83/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceUtil.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceUtil.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceUtil.java
index d00dd4d..c4a4363 100644
--- 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceUtil.java
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceUtil.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.azure.blob;
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URI;
 
@@ -81,38 +82,44 @@ public final class BlobServiceUtil {
 BlobServiceUtil.configureCloudBlobForRead(client, cfg);
 BlobServiceRequestOptions opts = getRequestOptions(exchange);
 LOG.trace("Getting a blob [{}] from exchange [{}]...", 
cfg.getBlobName(), exchange);
-Long blobOffset = cfg.getBlobOffset();
-Long blobDataLength = cfg.getDataLength();
-if (client instanceof CloudPageBlob) {
-PageRange range = 
exchange.getIn().getHeader(BlobServiceConstants.PAGE_BLOB_RANGE, 
PageRange.class);
-if (range != null) {
-blobOffset = range.getStartOffset();
-blobDataLength = range.getEndOffset() - range.getStartOffset();
-}
-}
 OutputStream os = exchange.getIn().getBody(OutputStream.class);
 if (os == null) {
 String fileDir = cfg.getFileDir();
 if (fileDir != null) {
-// Should the range if it is set be reflected in the file name 
?
-String name = cfg.getBlobName();
-File file = new File(fileDir, name + ".blob");
+File file = new File(fileDir, getBlobFileName(cfg));
 ExchangeUtil.getMessageForResponse(exchange).setBody(file);
-os = new FileOutputStream(file);
+os = new FileOutputStream(file);  
 }
 }
-if (os == null) {
-throw new IllegalArgumentException("OutputStream is not 
available");
-}
 try {
-client.downloadRange(blobOffset, blobDataLength, os,
-opts.getAccessCond(), opts.getRequestOpts(), 
opts.getOpContext());
+if (os == null) {
+// Let the producers like file: deal with it
+InputStream blobStream = client.openInputStream(
+opts.getAccessCond(), opts.getRequestOpts(), 
opts.getOpContext());
+exchange.getIn().setBody(blobStream);
+exchange.getIn().setHeader(Exchange.FILE_NAME, 
getBlobFileName(cfg));
+} else {
+Long blobOffset = cfg.getBlobOffset();
+Long blobDataLength = cfg.getDataLength();
+if (client instanceof CloudPageBlob) {
+PageRange range = 
exchange.getIn().getHeader(BlobServiceConstants.PAGE_BLOB_RANGE, 
PageRange.class);
+if (range != null) {
+blobOffset = range.getStartOffset();
+blobDataLength = range.getEndOffset() - 
range.getStartOffset();
+}
+}
+client.downloadRange(blobOffset, blobDataLength, os,
+ opts.getAccessCond(), 
opts.getRequestOpts(), opts.getOpContext());
+}
 } finally {
-if (cfg.isCloseStreamAfterRead()) {
+if (os != null && cfg.isCloseStreamAfterRead()) {
 os.close();
 }
 }
 }
+private static String getBlobFileName(BlobServiceConfiguration cfg) {
+return cfg.getBlobName()  + ".blob";

[2/2] camel git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/camel

2017-02-17 Thread sergeyb
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/camel


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/af4902b3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/af4902b3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/af4902b3

Branch: refs/heads/master
Commit: af4902b36dbc99a84d01cb15de1be8137d5c3d07
Parents: c6e58c8 cd11f2d
Author: Sergey Beryozkin 
Authored: Fri Feb 17 17:03:06 2017 +
Committer: Sergey Beryozkin 
Committed: Fri Feb 17 17:03:06 2017 +

--
 .../src/main/docs/eips/aggregate-eip.adoc   |   53 +-
 .../maven/packaging/PrepareExampleMojo.java |9 +-
 .../maven/packaging/PrepareReadmeMojo.java  |   10 +-
 .../maven/packaging/ReadmeComponentMojo.java|  908 ---
 .../camel/maven/packaging/UpdateReadmeMojo.java | 1091 ++
 .../maven/packaging/model/EipOptionModel.java   |   33 +
 .../src/main/resources/eip-options.mvel |9 +
 7 files changed, 1182 insertions(+), 931 deletions(-)
--




camel git commit: [CAMEL-10786] Having camel-azure added to the kit

2017-02-14 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 533d67fd3 -> bb25ff806


[CAMEL-10786] Having camel-azure added to the kit


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bb25ff80
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bb25ff80
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bb25ff80

Branch: refs/heads/master
Commit: bb25ff806d26842c3594f36cc10cdeb4c029
Parents: 533d67f
Author: Sergey Beryozkin 
Authored: Tue Feb 14 15:52:31 2017 +
Committer: Sergey Beryozkin 
Committed: Tue Feb 14 15:52:31 2017 +

--
 apache-camel/pom.xml | 4 
 apache-camel/src/main/descriptors/common-bin.xml | 1 +
 parent/pom.xml   | 5 +
 3 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bb25ff80/apache-camel/pom.xml
--
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index da049ba..7a221ca 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -91,6 +91,10 @@
 
 
   org.apache.camel
+  camel-azure
+
+
+  org.apache.camel
   camel-avro
 
 

http://git-wip-us.apache.org/repos/asf/camel/blob/bb25ff80/apache-camel/src/main/descriptors/common-bin.xml
--
diff --git a/apache-camel/src/main/descriptors/common-bin.xml 
b/apache-camel/src/main/descriptors/common-bin.xml
index 9e0857b..6ea317a 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -32,6 +32,7 @@
 org.apache.camel:camel-atmosphere-websocket
 org.apache.camel:camel-atom
 org.apache.camel:camel-aws
+org.apache.camel:camel-azure
 org.apache.camel:camel-avro
 org.apache.camel:camel-bam
 org.apache.camel:camel-barcode

http://git-wip-us.apache.org/repos/asf/camel/blob/bb25ff80/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index b18971b..3dec9d3 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -800,6 +800,11 @@
   
   
 org.apache.camel
+camel-azure
+${project.version}
+  
+  
+org.apache.camel
 camel-bam
 ${project.version}
   



camel git commit: [CAMEL-10786] Adding more tests, simplifying the utils code

2017-02-14 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 8c9184b6f -> 533d67fd3


[CAMEL-10786] Adding more tests, simplifying the utils code


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/533d67fd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/533d67fd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/533d67fd

Branch: refs/heads/master
Commit: 533d67fd305dbf9f9819e7e622eb8b9727fa0ef8
Parents: 8c9184b
Author: Sergey Beryozkin 
Authored: Tue Feb 14 13:47:25 2017 +
Committer: Sergey Beryozkin 
Committed: Tue Feb 14 13:47:25 2017 +

--
 .../azure/blob/BlobServiceComponent.java| 13 +++--
 .../azure/blob/BlobServiceProducer.java | 28 +-
 .../component/azure/blob/BlobServiceUtil.java   | 49 +++--
 .../BlobServiceComponentConfigurationTest.java  | 54 +--
 .../azure/blob/BlobServiceUtilTest.java | 57 +++-
 5 files changed, 149 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/533d67fd/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceComponent.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceComponent.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceComponent.java
index 33539a7..68925aa 100644
--- 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceComponent.java
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceComponent.java
@@ -18,6 +18,9 @@ package org.apache.camel.component.azure.blob;
 
 import java.util.Map;
 
+import com.microsoft.azure.storage.StorageCredentials;
+import com.microsoft.azure.storage.StorageCredentialsAnonymous;
+import com.microsoft.azure.storage.blob.CloudBlob;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.UriEndpointComponent;
@@ -66,10 +69,12 @@ public class BlobServiceComponent extends 
UriEndpointComponent {
 return endpoint;
 }
 
-private void checkCredentials(BlobServiceConfiguration configuration) {
-if (configuration.getAzureBlobClient() == null
-&& configuration.getCredentials() == null
-&& !configuration.isPublicForRead()) {
+private void checkCredentials(BlobServiceConfiguration cfg) {
+CloudBlob client = cfg.getAzureBlobClient();
+StorageCredentials creds = client == null ? cfg.getCredentials() 
+: client.getServiceClient().getCredentials(); 
+if ((creds == null || creds instanceof StorageCredentialsAnonymous)
+&& !cfg.isPublicForRead()) {
 throw new IllegalArgumentException("Credentials must be 
specified.");
 }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/533d67fd/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
index b2faaf5..0f01588 100644
--- 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobServiceProducer.java
@@ -130,7 +130,7 @@ public class BlobServiceProducer extends DefaultProducer {
 }
 
 private void updateBlockBlob(Exchange exchange) throws Exception {
-CloudBlockBlob client = 
BlobServiceUtil.createBlockBlobClient(getConfiguration(), true);
+CloudBlockBlob client = 
BlobServiceUtil.createBlockBlobClient(getConfiguration());
 configureCloudBlobForWrite(client);
 BlobServiceRequestOptions opts = 
BlobServiceUtil.getRequestOptions(exchange);
 
@@ -158,7 +158,7 @@ public class BlobServiceProducer extends DefaultProducer {
 throw new IllegalArgumentException("Illegal storageBlocks 
payload");
 }
 
-CloudBlockBlob client = 
BlobServiceUtil.createBlockBlobClient(getConfiguration(), true);
+CloudBlockBlob client = 
BlobServiceUtil.createBlockBlobClient(getConfiguration());
 configureCloudBlobForWrite(client);
 BlobServiceRequestOptions opts = 
BlobServiceUtil.getRequestOptions(exchange);
 
@@ -190,7 +190,7 @@ public class BlobServiceProducer extends DefaultProducer {
 throw new IllegalArgumentException("Illegal commit block list 
payload");
 }
  

[2/2] camel git commit: [CAMEL-10786] Initial implementation of Camel Azure Component starting from Blob Service

2017-02-13 Thread sergeyb
[CAMEL-10786] Initial implementation of Camel Azure Component starting from 
Blob Service


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a3b9b0f3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a3b9b0f3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a3b9b0f3

Branch: refs/heads/master
Commit: a3b9b0f38397b8245f3774a20cc60782b2d94dd8
Parents: 0548f87
Author: Sergey Beryozkin 
Authored: Mon Feb 13 21:40:52 2017 +
Committer: Sergey Beryozkin 
Committed: Mon Feb 13 21:40:52 2017 +

--
 components/camel-azure/pom.xml  |  69 +++
 .../camel/component/azure/blob/BlobBlock.java   |  51 ++
 .../azure/blob/BlobServiceComponent.java|  76 +++
 .../azure/blob/BlobServiceConfiguration.java| 252 ++
 .../azure/blob/BlobServiceConstants.java|  36 ++
 .../azure/blob/BlobServiceConsumer.java |  69 +++
 .../azure/blob/BlobServiceEndpoint.java |  95 
 .../azure/blob/BlobServiceOperations.java   |  83 
 .../azure/blob/BlobServiceProducer.java | 481 +++
 .../azure/blob/BlobServiceRequestOptions.java   |  45 ++
 .../component/azure/blob/BlobServiceUtil.java   | 231 +
 .../camel/component/azure/blob/BlobType.java|  30 ++
 .../azure/common/AbstractConfiguration.java |  52 ++
 .../component/azure/common/ExchangeUtil.java|  35 ++
 .../src/main/resources/META-INF/LICENSE.txt | 203 
 .../src/main/resources/META-INF/NOTICE.txt  |  11 +
 .../services/org/apache/camel/TypeConverter |  17 +
 .../org/apache/camel/component/azure-blob   |  18 +
 .../blob/BlobServiceAppendConsumerTest.java |  93 
 .../blob/BlobServiceBlockConsumerTest.java  |  91 
 .../BlobServiceComponentConfigurationTest.java  | 203 
 .../blob/BlobServiceProducerSpringTest.java | 136 ++
 .../azure/blob/BlobServiceUtilTest.java |  48 ++
 .../src/test/resources/log4j2.properties|  28 ++
 .../BlobServiceProducerSpringTest-context.xml   |  56 +++
 components/pom.xml  |   1 +
 .../camel-azure-starter/pom.xml |  51 ++
 .../BlobServiceComponentAutoConfiguration.java  |  80 +++
 .../src/main/resources/META-INF/LICENSE.txt | 203 
 .../src/main/resources/META-INF/NOTICE.txt  |  11 +
 ...dditional-spring-configuration-metadata.json |  10 +
 .../main/resources/META-INF/spring.factories|  19 +
 .../src/main/resources/META-INF/spring.provides |  18 +
 .../spring-boot/components-starter/pom.xml  |   1 +
 34 files changed, 2903 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a3b9b0f3/components/camel-azure/pom.xml
--
diff --git a/components/camel-azure/pom.xml b/components/camel-azure/pom.xml
new file mode 100644
index 000..f36c875
--- /dev/null
+++ b/components/camel-azure/pom.xml
@@ -0,0 +1,69 @@
+
+
+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";>
+4.0.0
+
+
+org.apache.camel
+components
+2.19.0-SNAPSHOT
+
+
+camel-azure
+jar
+
+Camel :: Azure
+Camel Microsoft Azure Components
+
+
+5.0.0
+1.6.6
+
org.apache.camel.component.azure.*
+
+
+
+
+
+
+org.apache.camel
+camel-core
+
+
+com.microsoft.azure
+azure-storage
+${azure-storage-java-sdk-version}
+
+
+
+
+junit
+junit
+test
+
+
+org.apache.camel
+camel-test-spring
+test
+
+
+org.easymock
+easymock
+test
+
+ 
+

http://git-wip-us.apache.org/repos/asf/camel/blob/a3b9b0f3/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobBlock.java
--
diff --git 
a/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobBlock.java
 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobBlock.java
new file mode 100644
index 000..87946ae
--- /dev/null
+++ 
b/components/camel-azure/src/main/java/org/apache/camel/component/azure/blob/BlobBlock.java
@@ -0,0 +1,51 @@
+/**
+ * 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 Apach

[1/2] camel git commit: [CAMEL-10786] Initial implementation of Camel Azure Component starting from Blob Service

2017-02-13 Thread sergeyb
Repository: camel
Updated Branches:
  refs/heads/master 0548f87de -> a3b9b0f38


http://git-wip-us.apache.org/repos/asf/camel/blob/a3b9b0f3/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
--
diff --git 
a/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
 
b/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
new file mode 100644
index 000..ded98e1
--- /dev/null
+++ 
b/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
@@ -0,0 +1,17 @@
+## ---
+## 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.
+## ---
+

http://git-wip-us.apache.org/repos/asf/camel/blob/a3b9b0f3/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/component/azure-blob
--
diff --git 
a/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/component/azure-blob
 
b/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/component/azure-blob
new file mode 100644
index 000..285f97d
--- /dev/null
+++ 
b/components/camel-azure/src/main/resources/META-INF/services/org/apache/camel/component/azure-blob
@@ -0,0 +1,18 @@
+## ---
+## 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.azure.blob.BlobServiceComponent

http://git-wip-us.apache.org/repos/asf/camel/blob/a3b9b0f3/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceAppendConsumerTest.java
--
diff --git 
a/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceAppendConsumerTest.java
 
b/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceAppendConsumerTest.java
new file mode 100644
index 000..34fef1c
--- /dev/null
+++ 
b/components/camel-azure/src/test/java/org/apache/camel/component/azure/blob/BlobServiceAppendConsumerTest.java
@@ -0,0 +1,93 @@
+/**
+ * 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.azure.blob;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+
+import com.microsoft.azure.storage.StorageCredentialsAccountAnd