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

[GitHub] [camel] oscerd commented on a change in pull request #5085: CAMEL-15964: created camel-google-storage component

oscerd commented on a change in pull request #5085:
URL: https://github.com/apache/camel/pull/5085#discussion_r576150975



##########
File path: components/camel-google-storage/src/main/java/org/apache/camel/component/google/storage/GoogleCloudStorageComponentConfiguration.java
##########
@@ -0,0 +1,239 @@
+/*
+ * 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.google.storage;
+
+import com.google.cloud.storage.Storage;
+import com.google.cloud.storage.StorageClass;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+
+@UriParams
+public class GoogleCloudStorageComponentConfiguration implements Cloneable {
+
+    @UriPath(label = "common", description = "Bucket name or ARN")
+    @Metadata(required = true)
+    private String bucketName;
+
+    @UriParam(label = "common", description = "Service account key to authenticate an application as a service account")
+    private String serviceAccountKey;
+
+    @UriParam(label = "producer",
+              enums = "copyObject,listObjects,deleteObject,deleteBucket,listBuckets,getObject,createDownloadLink")
+    private GoogleCloudStorageComponentOperations operation;
+
+    @UriParam(label = "producer", description = "The Object name inside the bucket")
+    private String objectName;
+
+    @UriParam(label = "common", defaultValue = "US-EAST1",
+              description = "The Cloud Storage location to use when creating the new buckets")
+    private String storageLocation = "US-EAST1";
+
+    @UriParam(label = "common", defaultValue = "STANDARD",
+              description = "The Cloud Storage class to use when creating the new buckets")
+    private StorageClass storageClass = StorageClass.STANDARD;
+
+    @UriParam(label = "common", defaultValue = "true")
+    private boolean autoCreateBucket = true;
+
+    @UriParam(label = "consumer")
+    private boolean moveAfterRead;
+
+    @UriParam(label = "consumer")
+    private String destinationBucket;
+
+    @UriParam(label = "consumer", defaultValue = "true")
+    private boolean deleteAfterRead = true;
+
+    @UriParam(label = "consumer", defaultValue = "true")
+    private boolean includeBody = true;
+
+    @UriParam(label = "consumer", defaultValue = "true")
+    private boolean includeFolders = true;
+
+    @UriParam
+    private Storage storageClient;

Review comment:
       This should be autowired (one of the possible metadata of uriparam), in this way if we have a storage client instance in the registry it will be used ootb.

##########
File path: components/camel-google-storage/src/generated/resources/google-storage.json
##########
@@ -0,0 +1,14 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "google-storage",
+    "title": "Google Storage",
+    "description": "Camel Component for Google Cloud Platform Storage",
+    "deprecated": false,
+    "firstVersion": "3.8.0",

Review comment:
       This will be re-generated again once firstVersion will be 3.9.0

##########
File path: components/camel-google-storage/pom.xml
##########
@@ -0,0 +1,126 @@
+<?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.9.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-google-storage</artifactId>
+  <packaging>jar</packaging>
+  <name>Camel :: Google Storage</name>
+  <description>Camel Component for Google Cloud Platform Storage</description>
+
+  <properties>
+    <firstVersion>3.8.0</firstVersion>

Review comment:
       This should be 3.9.0




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

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