This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit cdf57ecc87253a6c4dc3b5029ec8e2b0880b439f Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Jul 26 05:42:02 2019 +0200 CAMEL-13788: Deprecate OUT in favour of getMessage on Message API. --- .../apache/camel/processor/RestBindingAdvice.java | 4 ++++ .../modules/ROOT/pages/bean-language.adoc | 21 ++++++++++++++++++--- .../modules/ROOT/pages/log-component.adoc | 3 +-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/RestBindingAdvice.java b/core/camel-base/src/main/java/org/apache/camel/processor/RestBindingAdvice.java index 409d807..a62c13b 100644 --- a/core/camel-base/src/main/java/org/apache/camel/processor/RestBindingAdvice.java +++ b/core/camel-base/src/main/java/org/apache/camel/processor/RestBindingAdvice.java @@ -208,6 +208,8 @@ public class RestBindingAdvice implements CamelInternalProcessorAdvice<Map<Strin LOG.trace("Consuming content type does not match contentType header {}. Stopping routing.", contentType); // the content-type is not something we can process so its a HTTP_ERROR 415 exchange.getMessage().setHeader(Exchange.HTTP_RESPONSE_CODE, 415); + // set empty response body as http error code indicate the problem + exchange.getMessage().setBody(null); // stop routing and return exchange.setProperty(Exchange.ROUTE_STOP, true); return; @@ -218,6 +220,8 @@ public class RestBindingAdvice implements CamelInternalProcessorAdvice<Map<Strin LOG.trace("Produced content type does not match accept header {}. Stopping routing.", contentType); // the response type is not accepted by the client so its a HTTP_ERROR 406 exchange.getMessage().setHeader(Exchange.HTTP_RESPONSE_CODE, 406); + // set empty response body as http error code indicate the problem + exchange.getMessage().setBody(null); // stop routing and return exchange.setProperty(Exchange.ROUTE_STOP, true); return; diff --git a/docs/components/modules/ROOT/pages/bean-language.adoc b/docs/components/modules/ROOT/pages/bean-language.adoc index ce5a1c4..08023f6 100644 --- a/docs/components/modules/ROOT/pages/bean-language.adoc +++ b/docs/components/modules/ROOT/pages/bean-language.adoc @@ -3,9 +3,6 @@ == Bean Language *Available as of Camel version 1.3* - -*Available as of Camel version 1.3* - The purpose of the Bean Language is to be able to implement an xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] using a simple method on a bean. The bean name is resolved using a xref:manual::registry.adoc[Registry], such as the @@ -21,6 +18,24 @@ xref:manual::message.adoc[Message] Exchange to the method parameters; so you can annotate the bean to extract headers or other expressions such as xref:components::xpath-language.adoc[XPath] or xref:components::xquery-language.adoc[XQuery] from the message. +=== Bean Language options + +// language options: START +The Bean method language supports 4 options, which are listed below. + + + +[width="100%",cols="2,1m,1m,6",options="header"] +|=== +| Name | Default | Java Type | Description +| ref | | String | Reference to bean to lookup in the registry +| method | | String | Name of method to call +| beanType | | String | Class name of the bean to use +| trim | true | Boolean | Whether to trim the value to remove leading and trailing whitespaces and line breaks +|=== +// language options: END + + [[BeanLanguage-UsingBeanExpressionsinJava]] === Using Bean Expressions in Java diff --git a/docs/components/modules/ROOT/pages/log-component.adoc b/docs/components/modules/ROOT/pages/log-component.adoc index 37ca27d..f52a8d0 100644 --- a/docs/components/modules/ROOT/pages/log-component.adoc +++ b/docs/components/modules/ROOT/pages/log-component.adoc @@ -94,7 +94,7 @@ with the following path and query parameters: |=== -==== Query Parameters (28 parameters): +==== Query Parameters (27 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -122,7 +122,6 @@ with the following path and query parameters: | *showFiles* (formatting) | If enabled Camel will output files | false | boolean | *showFuture* (formatting) | If enabled Camel will on Future objects wait for it to complete to obtain the payload to be logged. | false | boolean | *showHeaders* (formatting) | Show the message headers. | false | boolean -| *showOut* (formatting) | If the exchange has an out message, show the out message. | false | boolean | *showProperties* (formatting) | Show the exchange properties. | false | boolean | *showStackTrace* (formatting) | Show the stack trace, if an exchange has an exception. Only effective if one of showAll, showException or showCaughtException are enabled. | false | boolean | *showStreams* (formatting) | Whether Camel should show stream bodies or not (eg such as java.io.InputStream). Beware if you enable this option then you may not be able later to access the message body as the stream have already been read by this logger. To remedy this you will have to use Stream Caching. | false | boolean