This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch sandbox/camel-3.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5d93782b30f0bbde3dd409c3dbe58bca22800a17 Author: Christoph Deppisch <[email protected]> AuthorDate: Thu Nov 22 09:14:12 2018 +0100 Remove unused oauth scopes in google mail component --- .../main/docs/google-mail-stream-component.adoc | 7 +++---- .../mail/stream/GoogleMailStreamConfiguration.java | 23 ---------------------- .../GoogleMailStreamComponentConfiguration.java | 17 +--------------- 3 files changed, 4 insertions(+), 43 deletions(-) diff --git a/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc b/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc index ed2086b..f6160da 100644 --- a/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc +++ b/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc @@ -27,7 +27,7 @@ for this component: <artifactId>camel-google-mail</artifactId> <version>2.22-SNAPSHOT</version> </dependency> - + ------------------------------------------------------ ### URI Format @@ -36,7 +36,7 @@ The GoogleMail Component uses the following URI format: -------------------------------------------------------- google-mail-stream://index?[options] - + -------------------------------------------------------- ### GoogleMailStreamComponent @@ -78,7 +78,7 @@ with the following path and query parameters: |=== -==== Query Parameters (29 parameters): +==== Query Parameters (28 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -94,7 +94,6 @@ with the following path and query parameters: | *maxResults* (consumer) | Max results to be returned | 10 | long | *query* (consumer) | The query to execute on gmail box | is:unread | String | *refreshToken* (consumer) | 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. | | String -| *scopes* (consumer) | Specifies the level of permissions you want a mail application to have to a user account. See https://developers.google.com/gmail/api/auth/scopes for more info. | | List | *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. | false | boolean | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/stream/GoogleMailStreamConfiguration.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/stream/GoogleMailStreamConfiguration.java index a69f719..d816478 100644 --- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/stream/GoogleMailStreamConfiguration.java +++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/stream/GoogleMailStreamConfiguration.java @@ -16,11 +16,6 @@ */ package org.apache.camel.component.google.mail.stream; -import java.util.Arrays; -import java.util.List; - -import com.google.api.services.gmail.GmailScopes; - import org.apache.camel.RuntimeCamelException; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriParams; @@ -31,15 +26,10 @@ import org.apache.camel.spi.UriPath; */ @UriParams public class GoogleMailStreamConfiguration implements Cloneable { - private static final List<String> DEFAULT_SCOPES = Arrays.asList(GmailScopes.GMAIL_COMPOSE, GmailScopes.GMAIL_MODIFY, GmailScopes.MAIL_GOOGLE_COM); - @UriPath private String index; @UriParam - private List<String> scopes = DEFAULT_SCOPES; - - @UriParam private String clientId; @UriParam @@ -124,19 +114,6 @@ public class GoogleMailStreamConfiguration implements Cloneable { this.applicationName = applicationName; } - public List<String> getScopes() { - return scopes; - } - - /** - * Specifies the level of permissions you want a mail application to have to - * a user account. See https://developers.google.com/gmail/api/auth/scopes - * for more info. - */ - public void setScopes(List<String> scopes) { - this.scopes = scopes; - } - public String getIndex() { return index; } diff --git a/platforms/spring-boot/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/stream/springboot/GoogleMailStreamComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/stream/springboot/GoogleMailStreamComponentConfiguration.java index 0a5d1e4..c790e30 100644 --- a/platforms/spring-boot/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/stream/springboot/GoogleMailStreamComponentConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-google-mail-starter/src/main/java/org/apache/camel/component/google/mail/stream/springboot/GoogleMailStreamComponentConfiguration.java @@ -16,14 +16,13 @@ */ package org.apache.camel.component.google.mail.stream.springboot; -import java.util.List; import javax.annotation.Generated; import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; import org.springframework.boot.context.properties.ConfigurationProperties; /** * The google-mail component provides access to Google Mail. - * + * * Generated by camel-package-maven-plugin - do not edit this file! */ @Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo") @@ -105,12 +104,6 @@ public class GoogleMailStreamComponentConfiguration */ private String applicationName; /** - * Specifies the level of permissions you want a mail application to - * have to a user account. See - * https://developers.google.com/gmail/api/auth/scopes for more info. - */ - private List scopes; - /** * Specifies an index for the endpoint */ private String index; @@ -171,14 +164,6 @@ public class GoogleMailStreamComponentConfiguration this.applicationName = applicationName; } - public List getScopes() { - return scopes; - } - - public void setScopes(List scopes) { - this.scopes = scopes; - } - public String getIndex() { return index; }
