Repository: camel Updated Branches: refs/heads/master 6cc35dbb4 -> d7b7d369e
Component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c7483749 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c7483749 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c7483749 Branch: refs/heads/master Commit: c7483749a2069e8ae4c8435baa04ba06e76e5432 Parents: 6cc35db Author: Claus Ibsen <[email protected]> Authored: Fri May 8 16:51:24 2015 +0200 Committer: Claus Ibsen <[email protected]> Committed: Fri May 8 16:51:24 2015 +0200 ---------------------------------------------------------------------- .../calendar/GoogleCalendarConfiguration.java | 2 +- .../google/drive/GoogleDriveComponent.java | 12 ++++++++ .../google/drive/GoogleDriveConfiguration.java | 30 ++++++++++++++++++-- 3 files changed, 41 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/c7483749/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarConfiguration.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarConfiguration.java index 0a2ce91..8ebf320 100644 --- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarConfiguration.java +++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarConfiguration.java @@ -36,7 +36,7 @@ public class GoogleCalendarConfiguration { @UriPath @Metadata(required = "true") private GoogleCalendarApiName apiName; - @UriPath(enums = "calendarId,calendarImport,clear,content,contentChannel,delete,destination,eventId,get,insert,instances,list,move,patch,query,quickAdd,ruleId,setting,stop,text,update,watch") + @UriPath(enums = "calendarImport,clear,delete,get,insert,instances,list,move,patch,query,quickAdd,stop,update,watch") @Metadata(required = "true") private String methodName; http://git-wip-us.apache.org/repos/asf/camel/blob/c7483749/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 20bbd91..55fd4d2 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 @@ -59,6 +59,18 @@ public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiNam return clientFactory; } + /** + * To use the shared configuration + */ + @Override + public void setConfiguration(GoogleDriveConfiguration configuration) { + super.setConfiguration(configuration); + } + + /** + * To use the GoogleCalendarClientFactory as factory for creating the client. + * Will by default use {@link BatchGoogleDriveClientFactory} + */ public void setClientFactory(GoogleDriveClientFactory clientFactory) { this.clientFactory = clientFactory; } http://git-wip-us.apache.org/repos/asf/camel/blob/c7483749/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 23b4227..3f597af 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 @@ -21,6 +21,7 @@ import java.util.List; import com.google.api.services.drive.DriveScopes; import org.apache.camel.component.google.drive.internal.GoogleDriveApiName; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriParams; import org.apache.camel.spi.UriPath; @@ -33,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 + @UriPath @Metadata(required = "true") private GoogleDriveApiName apiName; - @UriPath + @UriPath(enums = "copy,delete,get,getIdForEmail,insert,list,patch,stop,touch,untrash,update,watch") + @Metadata(required = "true") private String methodName; @UriParam @@ -61,6 +63,9 @@ public class GoogleDriveConfiguration { return apiName; } + /** + * What kind of operation to perform + */ public void setApiName(GoogleDriveApiName apiName) { this.apiName = apiName; } @@ -69,6 +74,9 @@ public class GoogleDriveConfiguration { return methodName; } + /** + * What sub operation to use for the selected operation + */ public void setMethodName(String methodName) { this.methodName = methodName; } @@ -77,6 +85,9 @@ public class GoogleDriveConfiguration { return clientId; } + /** + * Client ID of the drive application + */ public void setClientId(String clientId) { this.clientId = clientId; } @@ -85,6 +96,9 @@ public class GoogleDriveConfiguration { return clientSecret; } + /** + * Client secret of the drive application + */ public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } @@ -93,6 +107,9 @@ public class GoogleDriveConfiguration { return accessToken; } + /** + * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage. + */ public void setAccessToken(String accessToken) { this.accessToken = accessToken; } @@ -101,6 +118,9 @@ public class GoogleDriveConfiguration { return refreshToken; } + /** + * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived. + */ public void setRefreshToken(String refreshToken) { this.refreshToken = refreshToken; } @@ -109,6 +129,9 @@ public class GoogleDriveConfiguration { return applicationName; } + /** + * Google drive application name. Example would be "camel-google-drive/1.0" + */ public void setApplicationName(String applicationName) { this.applicationName = applicationName; } @@ -117,6 +140,9 @@ public class GoogleDriveConfiguration { return scopes; } + /** + * Specifies the level of permissions you want a drive application to have to a user account. See https://developers.google.com/drive/web/scopes for more info. + */ public void setScopes(List<String> scopes) { this.scopes = scopes; }
