You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/12/09 10:32:50 UTC
[1/4] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to
allow the UnmarshallType header use
Repository: camel
Updated Branches:
refs/heads/camel-2.18.x 6ca087065 -> 6c2db21d1
CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/abb45b2c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/abb45b2c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/abb45b2c
Branch: refs/heads/camel-2.18.x
Commit: abb45b2c2ada2bbb34138230540b37d259c1e98d
Parents: 6ca0870
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Dec 7 18:18:45 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Fri Dec 9 11:11:10 2016 +0100
----------------------------------------------------------------------
.../component/jackson/JacksonDataFormat.java | 19 ++++++-
...arshalUnmarshalTypeHeaderNotAllowedTest.java | 54 ++++++++++++++++++++
.../JacksonMarshalUnmarshalTypeHeaderTest.java | 1 +
3 files changed, 73 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/abb45b2c/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
index 154c387..4772619 100644
--- a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
+++ b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
@@ -68,6 +68,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
private String enableFeatures;
private String disableFeatures;
private boolean enableJacksonTypeConverter;
+ private boolean allowJacksonUnmarshallType;
/**
* Use the default Jackson {@link ObjectMapper} and {@link Object}
@@ -158,7 +159,10 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
// is there a header with the unmarshal type?
Class<?> clazz = unmarshalType;
- String type = exchange.getIn().getHeader(JacksonConstants.UNMARSHAL_TYPE, String.class);
+ String type = null;
+ if (allowJacksonUnmarshallType) {
+ type = exchange.getIn().getHeader(JacksonConstants.UNMARSHAL_TYPE, String.class);
+ }
if (type == null && isAllowJmsType()) {
type = exchange.getIn().getHeader("JMSType", String.class);
}
@@ -326,6 +330,19 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
public void setEnableJacksonTypeConverter(boolean enableJacksonTypeConverter) {
this.enableJacksonTypeConverter = enableJacksonTypeConverter;
}
+
+ public boolean isAllowJacksonUnmarshallType() {
+ return allowJacksonUnmarshallType;
+ }
+
+ /**
+ * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.
+ * <p/>
+ * This should only be enabled when desired to be used.
+ */
+ public void setAllowJacksonUnmarshallType(boolean allowJacksonUnmarshallType) {
+ this.allowJacksonUnmarshallType = allowJacksonUnmarshallType;
+ }
public String getEnableFeatures() {
return enableFeatures;
http://git-wip-us.apache.org/repos/asf/camel/blob/abb45b2c/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderNotAllowedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderNotAllowedTest.java b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderNotAllowedTest.java
new file mode 100644
index 0000000..ffabeeb
--- /dev/null
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderNotAllowedTest.java
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jackson;
+
+import java.util.LinkedHashMap;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class JacksonMarshalUnmarshalTypeHeaderNotAllowedTest extends CamelTestSupport {
+
+ @Test
+ public void testUnmarshalPojo() throws Exception {
+ MockEndpoint mock = getMockEndpoint("mock:reversePojo");
+ mock.expectedMessageCount(1);
+ mock.message(0).body().isInstanceOf(LinkedHashMap.class);
+
+ String json = "{\"name\":\"Camel\"}";
+ template.sendBodyAndHeader("direct:backPojo", json, JacksonConstants.UNMARSHAL_TYPE, TestPojo.class.getName());
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() throws Exception {
+ JacksonDataFormat format = new JacksonDataFormat();
+
+ from("direct:backPojo").unmarshal(format).to("mock:reversePojo");
+
+ }
+ };
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/abb45b2c/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
index 9cb5b59..623b32e 100644
--- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
@@ -46,6 +46,7 @@ public class JacksonMarshalUnmarshalTypeHeaderTest extends CamelTestSupport {
@Override
public void configure() throws Exception {
JacksonDataFormat format = new JacksonDataFormat();
+ format.setAllowJacksonUnmarshallType(true);
from("direct:backPojo").unmarshal(format).to("mock:reversePojo");
[2/4] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to
allow the UnmarshallType header use
Posted by ac...@apache.org.
CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/83fef710
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/83fef710
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/83fef710
Branch: refs/heads/camel-2.18.x
Commit: 83fef7108456eeac1506853d194cd1360851c4fe
Parents: abb45b2
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Dec 8 09:51:19 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Fri Dec 9 11:11:11 2016 +0100
----------------------------------------------------------------------
.../camel/component/jackson/JacksonDataFormat.java | 12 ++++++------
.../jackson/JacksonMarshalUnmarshalTypeHeaderTest.java | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/83fef710/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
index 4772619..ec7073f 100644
--- a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
+++ b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
@@ -68,7 +68,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
private String enableFeatures;
private String disableFeatures;
private boolean enableJacksonTypeConverter;
- private boolean allowJacksonUnmarshallType;
+ private boolean allowUnmarshallType;
/**
* Use the default Jackson {@link ObjectMapper} and {@link Object}
@@ -160,7 +160,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
// is there a header with the unmarshal type?
Class<?> clazz = unmarshalType;
String type = null;
- if (allowJacksonUnmarshallType) {
+ if (allowUnmarshallType) {
type = exchange.getIn().getHeader(JacksonConstants.UNMARSHAL_TYPE, String.class);
}
if (type == null && isAllowJmsType()) {
@@ -331,8 +331,8 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
this.enableJacksonTypeConverter = enableJacksonTypeConverter;
}
- public boolean isAllowJacksonUnmarshallType() {
- return allowJacksonUnmarshallType;
+ public boolean isAllowUnmarshallType() {
+ return allowUnmarshallType;
}
/**
@@ -340,8 +340,8 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
* <p/>
* This should only be enabled when desired to be used.
*/
- public void setAllowJacksonUnmarshallType(boolean allowJacksonUnmarshallType) {
- this.allowJacksonUnmarshallType = allowJacksonUnmarshallType;
+ public void setAllowUnmarshallType(boolean allowJacksonUnmarshallType) {
+ this.allowUnmarshallType = allowJacksonUnmarshallType;
}
public String getEnableFeatures() {
http://git-wip-us.apache.org/repos/asf/camel/blob/83fef710/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
index 623b32e..775e7ea 100644
--- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
@@ -46,7 +46,7 @@ public class JacksonMarshalUnmarshalTypeHeaderTest extends CamelTestSupport {
@Override
public void configure() throws Exception {
JacksonDataFormat format = new JacksonDataFormat();
- format.setAllowJacksonUnmarshallType(true);
+ format.setAllowUnmarshallType(true);
from("direct:backPojo").unmarshal(format).to("mock:reversePojo");
[4/4] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to
allow the UnmarshallType header use
Posted by ac...@apache.org.
CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/97e3928d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/97e3928d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/97e3928d
Branch: refs/heads/camel-2.18.x
Commit: 97e3928de57c45235cade4b185e4cf2d59f87c28
Parents: 83fef71
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Dec 8 09:59:44 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Fri Dec 9 11:11:11 2016 +0100
----------------------------------------------------------------------
.../camel/model/dataformat/JsonDataFormat.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/97e3928d/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
index 4ee2413..c275b2a 100644
--- a/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
+++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
@@ -73,6 +73,8 @@ public class JsonDataFormat extends DataFormatDefinition {
private String disableFeatures;
@XmlAttribute
private String permissions;
+ @XmlAttribute
+ private Boolean allowUnmarshallType;
public JsonDataFormat() {
super("json");
@@ -303,6 +305,19 @@ public class JsonDataFormat extends DataFormatDefinition {
setPermissions(csb.toString());
}
+ public Boolean getAllowUnmarshallType() {
+ return allowUnmarshallType;
+ }
+
+ /**
+ * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.
+ * <p/>
+ * This should only be enabled when desired to be used.
+ */
+ public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+ this.allowUnmarshallType = allowUnmarshallType;
+ }
+
@Override
public String getDataFormatName() {
// json data format is special as the name can be from different bundles
@@ -385,6 +400,9 @@ public class JsonDataFormat extends DataFormatDefinition {
if (permissions != null) {
setProperty(camelContext, dataFormat, "permissions", permissions);
}
+ if (allowUnmarshallType != null) {
+ setProperty(camelContext, dataFormat, "allowUnmarshallType", allowUnmarshallType);
+ }
// if we have the unmarshal type, but no permission set, then use it to be allowed
if (permissions == null && unmarshalType != null) {
String allow = "+" + unmarshalType.getName();
[3/4] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to
allow the UnmarshallType header use. Regenerated code
Posted by ac...@apache.org.
CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use. Regenerated code
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6c2db21d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6c2db21d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6c2db21d
Branch: refs/heads/camel-2.18.x
Commit: 6c2db21d128cde8e3cdb8617b2b81c9f07baa11b
Parents: 97e3928
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Dec 8 10:23:30 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Fri Dec 9 11:11:11 2016 +0100
----------------------------------------------------------------------
.../gson/springboot/GsonDataFormatConfiguration.java | 14 ++++++++++++++
.../springboot/JacksonDataFormatConfiguration.java | 14 ++++++++++++++
.../springboot/JohnzonDataFormatConfiguration.java | 14 ++++++++++++++
.../springboot/JsonDataFormatConfiguration.java | 14 ++++++++++++++
.../src/main/docs/json-gson-dataformat.adoc | 3 ++-
.../src/main/docs/json-jackson-dataformat.adoc | 3 ++-
.../src/main/docs/json-johnzon-dataformat.adoc | 3 ++-
.../src/main/docs/json-xstream-dataformat.adoc | 3 ++-
8 files changed, 64 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
index c4324a6..4e89e3f 100644
--- a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
+++ b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class GsonDataFormatConfiguration {
* org.apache.camel.xstream.permissions.
*/
private String permissions;
+ /**
+ * If enabled then Jackson is allowed to attempt to use the
+ * CamelJacksonUnmarshalType header during the unmarshalling. This should
+ * only be enabled when desired to be used.
+ */
+ private Boolean allowUnmarshallType = false;
public String getObjectMapper() {
return objectMapper;
@@ -242,4 +248,12 @@ public class GsonDataFormatConfiguration {
public void setPermissions(String permissions) {
this.permissions = permissions;
}
+
+ public Boolean getAllowUnmarshallType() {
+ return allowUnmarshallType;
+ }
+
+ public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+ this.allowUnmarshallType = allowUnmarshallType;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
index 57d06c4..e00a318 100644
--- a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
+++ b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class JacksonDataFormatConfiguration {
* org.apache.camel.xstream.permissions.
*/
private String permissions;
+ /**
+ * If enabled then Jackson is allowed to attempt to use the
+ * CamelJacksonUnmarshalType header during the unmarshalling. This should
+ * only be enabled when desired to be used.
+ */
+ private Boolean allowUnmarshallType = false;
public String getObjectMapper() {
return objectMapper;
@@ -242,4 +248,12 @@ public class JacksonDataFormatConfiguration {
public void setPermissions(String permissions) {
this.permissions = permissions;
}
+
+ public Boolean getAllowUnmarshallType() {
+ return allowUnmarshallType;
+ }
+
+ public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+ this.allowUnmarshallType = allowUnmarshallType;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
index e3719c9..d6c73df 100644
--- a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
+++ b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class JohnzonDataFormatConfiguration {
* org.apache.camel.xstream.permissions.
*/
private String permissions;
+ /**
+ * If enabled then Jackson is allowed to attempt to use the
+ * CamelJacksonUnmarshalType header during the unmarshalling. This should
+ * only be enabled when desired to be used.
+ */
+ private Boolean allowUnmarshallType = false;
public String getObjectMapper() {
return objectMapper;
@@ -242,4 +248,12 @@ public class JohnzonDataFormatConfiguration {
public void setPermissions(String permissions) {
this.permissions = permissions;
}
+
+ public Boolean getAllowUnmarshallType() {
+ return allowUnmarshallType;
+ }
+
+ public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+ this.allowUnmarshallType = allowUnmarshallType;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
index 153dbc5..5711cd8 100644
--- a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
+++ b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class JsonDataFormatConfiguration {
* org.apache.camel.xstream.permissions.
*/
private String permissions;
+ /**
+ * If enabled then Jackson is allowed to attempt to use the
+ * CamelJacksonUnmarshalType header during the unmarshalling. This should
+ * only be enabled when desired to be used.
+ */
+ private Boolean allowUnmarshallType = false;
public String getObjectMapper() {
return objectMapper;
@@ -242,4 +248,12 @@ public class JsonDataFormatConfiguration {
public void setPermissions(String permissions) {
this.permissions = permissions;
}
+
+ public Boolean getAllowUnmarshallType() {
+ return allowUnmarshallType;
+ }
+
+ public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+ this.allowUnmarshallType = allowUnmarshallType;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
----------------------------------------------------------------------
diff --git a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
index 8331364..cb83a73 100644
--- a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
+++ b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
@@ -20,7 +20,7 @@ Gson Options
// dataformat options: START
-The JSon GSon dataformat supports 15 options which are listed below.
+The JSon GSon dataformat supports 16 options which are listed below.
@@ -43,6 +43,7 @@ The JSon GSon dataformat supports 15 options which are listed below.
| enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| permissions | | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
|=======================================================================
{% endraw %}
// dataformat options: END
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
index d6fe055..f8c2106 100644
--- a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
+++ b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
@@ -21,7 +21,7 @@ Jackson Options
// dataformat options: START
-The JSon Jackson dataformat supports 15 options which are listed below.
+The JSon Jackson dataformat supports 16 options which are listed below.
@@ -44,6 +44,7 @@ The JSon Jackson dataformat supports 15 options which are listed below.
| enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| permissions | | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
|=======================================================================
{% endraw %}
// dataformat options: END
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
----------------------------------------------------------------------
diff --git a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
index 043c721..416cbf7 100644
--- a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
+++ b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
@@ -21,7 +21,7 @@ Johnzon Options
// dataformat options: START
-The JSon Johnzon dataformat supports 15 options which are listed below.
+The JSon Johnzon dataformat supports 16 options which are listed below.
@@ -44,6 +44,7 @@ The JSon Johnzon dataformat supports 15 options which are listed below.
| enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| permissions | | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
|=======================================================================
{% endraw %}
// dataformat options: END
http://git-wip-us.apache.org/repos/asf/camel/blob/6c2db21d/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
----------------------------------------------------------------------
diff --git a/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc b/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
index f310620..6faf974 100644
--- a/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
+++ b/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
@@ -27,7 +27,7 @@ Options
^^^^^^^
// dataformat options: START
-The JSon XStream dataformat supports 15 options which are listed below.
+The JSon XStream dataformat supports 16 options which are listed below.
@@ -50,6 +50,7 @@ The JSon XStream dataformat supports 15 options which are listed below.
| enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
| permissions | | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
|=======================================================================
{% endraw %}
// dataformat options: END