This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.21.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit a8ec1c9bb9cc1630cccb4d0ae651827d679160ab Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Apr 19 09:23:18 2018 +0200 CAMEL-12458: camel-twitter - Should support extended mode by default --- .../camel-twitter/src/main/docs/twitter-component.adoc | 3 ++- .../src/main/docs/twitter-directmessage-component.adoc | 3 ++- .../src/main/docs/twitter-search-component.adoc | 3 ++- .../src/main/docs/twitter-streaming-component.adoc | 3 ++- .../src/main/docs/twitter-timeline-component.adoc | 3 ++- .../camel/component/twitter/TwitterConfiguration.java | 15 ++++++--------- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/components/camel-twitter/src/main/docs/twitter-component.adoc b/components/camel-twitter/src/main/docs/twitter-component.adoc index 414bf5c..cd77832 100644 --- a/components/camel-twitter/src/main/docs/twitter-component.adoc +++ b/components/camel-twitter/src/main/docs/twitter-component.adoc @@ -160,7 +160,7 @@ with the following path and query parameters: |=== -==== Query Parameters (43 parameters): +==== Query Parameters (44 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -173,6 +173,7 @@ with the following path and query parameters: | *distanceMetric* (consumer) | Used by the non-stream geography search, to search by radius using the configured metrics. The unit can either be mi for miles, or km for kilometers. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | km | String | *exceptionHandler* (consumer) | 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. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern +| *extendedMode* (consumer) | Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters). | true | boolean | *latitude* (consumer) | Used by the non-stream geography search to search by latitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double | *locations* (consumer) | Bounding boxes, created by pairs of lat/lons. Can be used for streaming/filter. A pair is defined as lat,lon. And multiple paris can be separated by semi colon. | | String | *longitude* (consumer) | Used by the non-stream geography search to search by longitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double diff --git a/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc b/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc index 20e783f..51f75b0 100644 --- a/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc +++ b/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc @@ -49,7 +49,7 @@ with the following path and query parameters: |=== -==== Query Parameters (41 parameters): +==== Query Parameters (42 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -61,6 +61,7 @@ with the following path and query parameters: | *distanceMetric* (consumer) | Used by the non-stream geography search, to search by radius using the configured metrics. The unit can either be mi for miles, or km for kilometers. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | km | String | *exceptionHandler* (consumer) | 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. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern +| *extendedMode* (consumer) | Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters). | true | boolean | *latitude* (consumer) | Used by the non-stream geography search to search by latitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double | *locations* (consumer) | Bounding boxes, created by pairs of lat/lons. Can be used for streaming/filter. A pair is defined as lat,lon. And multiple paris can be separated by semi colon. | | String | *longitude* (consumer) | Used by the non-stream geography search to search by longitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double diff --git a/components/camel-twitter/src/main/docs/twitter-search-component.adoc b/components/camel-twitter/src/main/docs/twitter-search-component.adoc index 269b3f3..7beda61 100644 --- a/components/camel-twitter/src/main/docs/twitter-search-component.adoc +++ b/components/camel-twitter/src/main/docs/twitter-search-component.adoc @@ -49,7 +49,7 @@ with the following path and query parameters: |=== -==== Query Parameters (41 parameters): +==== Query Parameters (42 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -61,6 +61,7 @@ with the following path and query parameters: | *distanceMetric* (consumer) | Used by the non-stream geography search, to search by radius using the configured metrics. The unit can either be mi for miles, or km for kilometers. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | km | String | *exceptionHandler* (consumer) | 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. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern +| *extendedMode* (consumer) | Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters). | true | boolean | *latitude* (consumer) | Used by the non-stream geography search to search by latitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double | *locations* (consumer) | Bounding boxes, created by pairs of lat/lons. Can be used for streaming/filter. A pair is defined as lat,lon. And multiple paris can be separated by semi colon. | | String | *longitude* (consumer) | Used by the non-stream geography search to search by longitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double diff --git a/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc b/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc index 409dc86..a2bf82b 100644 --- a/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc +++ b/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc @@ -49,7 +49,7 @@ with the following path and query parameters: |=== -==== Query Parameters (42 parameters): +==== Query Parameters (43 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -61,6 +61,7 @@ with the following path and query parameters: | *distanceMetric* (consumer) | Used by the non-stream geography search, to search by radius using the configured metrics. The unit can either be mi for miles, or km for kilometers. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | km | String | *exceptionHandler* (consumer) | 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. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern +| *extendedMode* (consumer) | Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters). | true | boolean | *latitude* (consumer) | Used by the non-stream geography search to search by latitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double | *locations* (consumer) | Bounding boxes, created by pairs of lat/lons. Can be used for streaming/filter. A pair is defined as lat,lon. And multiple paris can be separated by semi colon. | | String | *longitude* (consumer) | Used by the non-stream geography search to search by longitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double diff --git a/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc b/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc index 9b34e33..84354ba 100644 --- a/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc +++ b/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc @@ -49,7 +49,7 @@ with the following path and query parameters: |=== -==== Query Parameters (42 parameters): +==== Query Parameters (43 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -62,6 +62,7 @@ with the following path and query parameters: | *distanceMetric* (consumer) | Used by the non-stream geography search, to search by radius using the configured metrics. The unit can either be mi for miles, or km for kilometers. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | km | String | *exceptionHandler* (consumer) | 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. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern +| *extendedMode* (consumer) | Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters). | true | boolean | *latitude* (consumer) | Used by the non-stream geography search to search by latitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double | *locations* (consumer) | Bounding boxes, created by pairs of lat/lons. Can be used for streaming/filter. A pair is defined as lat,lon. And multiple paris can be separated by semi colon. | | String | *longitude* (consumer) | Used by the non-stream geography search to search by longitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. | | Double diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java index 3c5266a..d7775d0 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java @@ -74,8 +74,8 @@ public class TwitterConfiguration { private Double radius; @UriParam(label = "consumer,advanced", defaultValue = "km", enums = "km,mi") private String distanceMetric; - @UriParam(label = "consumer,advanced") - private Boolean extendedMode; + @UriParam(label = "consumer,advanced", defaultValue = "true") + private boolean extendedMode = true; /** * Singleton, on demand instances of Twitter4J's Twitter & TwitterStream. @@ -111,7 +111,7 @@ public class TwitterConfiguration { confBuilder.setOAuthConsumerSecret(consumerSecret); confBuilder.setOAuthAccessToken(accessToken); confBuilder.setOAuthAccessTokenSecret(accessTokenSecret); - confBuilder.setTweetModeExtended(getExtendedMode()); + confBuilder.setTweetModeExtended(isExtendedMode()); if (getHttpProxyHost() != null) { confBuilder.setHttpProxyHost(getHttpProxyHost()); } @@ -400,17 +400,14 @@ public class TwitterConfiguration { } /** - * Used for enabling full text from twitter. - * <p/> + * Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters). */ public void setExtendedMode(Boolean extendedMode) { - this.radius = radius; + this.extendedMode = extendedMode; } - public Boolean getExtendedMode() { + public boolean isExtendedMode() { return extendedMode; } - - } -- To stop receiving notification emails like this one, please contact davscl...@apache.org.