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/af3f54de Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/af3f54de Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/af3f54de Branch: refs/heads/master Commit: af3f54de35a90a5a49a4af4622e8bd1011bf5ecc Parents: 02270ab Author: Andrea Cosentino <[email protected]> Authored: Thu Dec 8 10:23:30 2016 +0100 Committer: Andrea Cosentino <[email protected]> Committed: Thu Dec 8 10:29:18 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/af3f54de/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/af3f54de/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/af3f54de/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/af3f54de/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/af3f54de/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/af3f54de/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/af3f54de/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/af3f54de/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
