camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/5] camel git commit: Component docs
Date Thu, 07 Jan 2016 10:00:59 GMT
Component docs


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

Branch: refs/heads/camel-2.16.x
Commit: 7f4dd3c0da43b3b8b60ab1a520363db95df4ef32
Parents: e559bcd
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Jan 7 10:36:52 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Jan 7 10:54:57 2016 +0100

----------------------------------------------------------------------
 .../component/google/drive/GoogleDriveComponent.java   |  4 +++-
 .../google/drive/GoogleDriveConfiguration.java         |  5 +++--
 .../component/google/drive/GoogleDriveEndpoint.java    | 13 ++++++++++---
 3 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7f4dd3c0/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
index 55fd4d2..bcb2b25 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
@@ -80,6 +80,8 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam
                                       GoogleDriveConfiguration endpointConfiguration) {
         endpointConfiguration.setApiName(apiName);
         endpointConfiguration.setMethodName(methodName);
-        return new GoogleDriveEndpoint(uri, this, apiName, methodName, endpointConfiguration);
+        GoogleDriveEndpoint endpoint = new GoogleDriveEndpoint(uri, this, apiName, methodName,
endpointConfiguration);
+        endpoint.setClientFactory(clientFactory);
+        return endpoint;
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7f4dd3c0/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
index 3f597af..a3c2218 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
@@ -34,10 +34,11 @@ public class GoogleDriveConfiguration {
     private static final List<String> DEFAULT_SCOPES = Arrays.asList(DriveScopes.DRIVE_FILE,
DriveScopes.DRIVE_APPS_READONLY, DriveScopes.DRIVE_METADATA_READONLY,
             DriveScopes.DRIVE);
 
-    @UriPath @Metadata(required = "true")
+    @UriPath(enums = "drive-about,drive-apps,drive-changes,drive-channels,drive-children,drive-comments,drive-files,drive-parents"
+            + ",drive-permissions,drive-properties,drive-realtime,drive-replies,drive-revisions")
@Metadata(required = "true")
     private GoogleDriveApiName apiName;
 
-    @UriPath(enums = "copy,delete,get,getIdForEmail,insert,list,patch,stop,touch,untrash,update,watch")
+    @UriPath(enums = "copy,delete,get,getIdForEmail,insert,list,patch,stop,touch,trash,untrash,update,watch")
     @Metadata(required = "true")
     private String methodName;
     

http://git-wip-us.apache.org/repos/asf/camel/blob/7f4dd3c0/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
index d6e509c..c18b0e5 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
@@ -33,7 +33,7 @@ import org.apache.camel.util.component.ApiMethod;
 import org.apache.camel.util.component.ApiMethodPropertiesHelper;
 
 /**
- * Represents a GoogleDrive endpoint.
+ * The google-drive component provides access to Google Drive file storage service.
  */
 @UriEndpoint(scheme = "google-drive", title = "Google Drive", syntax = "google:drive:apiName/methodName",
 consumerClass = GoogleDriveConsumer.class, consumerPrefix = "consumer", label = "api,cloud,file")
@@ -43,6 +43,9 @@ public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName,
     @UriParam
     private GoogleDriveConfiguration configuration;
 
+    @UriParam
+    private GoogleDriveClientFactory clientFactory;
+
     public GoogleDriveEndpoint(String uri, GoogleDriveComponent component,
                          GoogleDriveApiName apiName, String methodName, GoogleDriveConfiguration
endpointConfiguration) {
         super(uri, component, apiName, methodName, GoogleDriveApiCollection.getCollection().getHelper(apiName),
endpointConfiguration);
@@ -130,10 +133,14 @@ public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName,
     }
 
     public GoogleDriveClientFactory getClientFactory() {
-        return ((GoogleDriveComponent)getComponent()).getClientFactory();
+        return clientFactory;
     }
 
+    /**
+     * To use the GoogleCalendarClientFactory as factory for creating the client.
+     * Will by default use {@link BatchGoogleDriveClientFactory}
+     */
     public void setClientFactory(GoogleDriveClientFactory clientFactory) {
-        ((GoogleDriveComponent)getComponent()).setClientFactory(clientFactory);
+        this.clientFactory = clientFactory;
     }
 }


Mime
View raw message