This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new d1413dfe390d CAMEL-22903 - Add OCSF (Open Cybersecurity Schema
Framework) DataFormat component - Remove Jackson specific enable and disable
features (#21066)
d1413dfe390d is described below
commit d1413dfe390d48132cee9443823f39e820cc86a7
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Jan 26 18:05:20 2026 +0100
CAMEL-22903 - Add OCSF (Open Cybersecurity Schema Framework) DataFormat
component - Remove Jackson specific enable and disable features (#21066)
Signed-off-by: Andrea Cosentino <[email protected]>
---
.../org/apache/camel/catalog/dataformats/ocsf.json | 4 +-
.../org/apache/camel/catalog/models/ocsf.json | 4 +-
.../apache/camel/catalog/schemas/camel-spring.xsd | 24 ----
.../apache/camel/catalog/schemas/camel-xml-io.xsd | 24 ----
.../dataformat/ocsf/OcsfDataFormatConfigurer.java | 14 ---
.../org/apache/camel/dataformat/ocsf/ocsf.json | 4 +-
.../camel/dataformat/ocsf/OcsfDataFormat.java | 131 ---------------------
.../org/apache/camel/model/dataformat/ocsf.json | 4 +-
.../camel/model/dataformat/OcsfDataFormat.java | 76 ------------
.../reifier/dataformat/OcsfDataFormatReifier.java | 4 +-
.../java/org/apache/camel/xml/in/ModelParser.java | 2 -
.../java/org/apache/camel/xml/out/ModelWriter.java | 2 -
.../org/apache/camel/yaml/out/ModelWriter.java | 2 -
.../dsl/yaml/deserializers/ModelDeserializers.java | 12 --
.../generated/resources/schema/camelYamlDsl.json | 10 --
15 files changed, 6 insertions(+), 311 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/ocsf.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/ocsf.json
index 7c6f91004514..d92089a649f0 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/ocsf.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/ocsf.json
@@ -23,8 +23,6 @@
"collectionType": { "index": 4, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows to use different collection types than java.util.Collection
based as default." },
"useList": { "index": 5, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of OCSF events."
},
"allowUnmarshallType": { "index": 6, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
the unmarshal type can be specified via the CamelOcsfUnmarshalType header. This
should only be enabled when desired to be used." },
- "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." },
- "enableFeatures": { "index": 8, "kind": "attribute", "displayName":
"Enable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializatio [...]
- "disableFeatures": { "index": 9, "kind": "attribute", "displayName":
"Disable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializa [...]
+ "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." }
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/ocsf.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/ocsf.json
index 51e0dcdc6397..47f07027abbf 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/ocsf.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/ocsf.json
@@ -20,8 +20,6 @@
"collectionType": { "index": 4, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows to use different collection types than java.util.Collection
based as default." },
"useList": { "index": 5, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of OCSF events."
},
"allowUnmarshallType": { "index": 6, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
the unmarshal type can be specified via the CamelOcsfUnmarshalType header. This
should only be enabled when desired to be used." },
- "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." },
- "enableFeatures": { "index": 8, "kind": "attribute", "displayName":
"Enable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializatio [...]
- "disableFeatures": { "index": 9, "kind": "attribute", "displayName":
"Disable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializa [...]
+ "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." }
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 128ded86d9c8..188477b24caf 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -9911,30 +9911,6 @@ when desired to be used. Default value: false
<xs:documentation xml:lang="en">
<![CDATA[
To enable pretty printing output nicely formatted. Is by default false.
Default value: false
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="enableFeatures" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-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.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="disableFeatures" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-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.
]]>
</xs:documentation>
</xs:annotation>
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
index f5a6b1572d04..639caa699229 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
@@ -8584,30 +8584,6 @@ when desired to be used. Default value: false
<xs:documentation xml:lang="en">
<![CDATA[
To enable pretty printing output nicely formatted. Is by default false.
Default value: false
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="enableFeatures" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-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.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="disableFeatures" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-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.
]]>
</xs:documentation>
</xs:annotation>
diff --git
a/components/camel-ocsf/src/generated/java/org/apache/camel/dataformat/ocsf/OcsfDataFormatConfigurer.java
b/components/camel-ocsf/src/generated/java/org/apache/camel/dataformat/ocsf/OcsfDataFormatConfigurer.java
index 1d3cb9bc7baa..5a730491999e 100644
---
a/components/camel-ocsf/src/generated/java/org/apache/camel/dataformat/ocsf/OcsfDataFormatConfigurer.java
+++
b/components/camel-ocsf/src/generated/java/org/apache/camel/dataformat/ocsf/OcsfDataFormatConfigurer.java
@@ -24,8 +24,6 @@ public class OcsfDataFormatConfigurer extends
org.apache.camel.support.component
Map<String, Object> map = new CaseInsensitiveMap();
map.put("AllowUnmarshallType", boolean.class);
map.put("CollectionType", java.lang.Class.class);
- map.put("DisableFeatures", java.lang.String.class);
- map.put("EnableFeatures", java.lang.String.class);
map.put("ObjectMapper",
com.fasterxml.jackson.databind.ObjectMapper.class);
map.put("PrettyPrint", boolean.class);
map.put("UnmarshalType", java.lang.Class.class);
@@ -42,10 +40,6 @@ public class OcsfDataFormatConfigurer extends
org.apache.camel.support.component
case "allowUnmarshallType":
target.setAllowUnmarshallType(property(camelContext, boolean.class, value));
return true;
case "collectiontype":
case "collectionType": target.setCollectionType(property(camelContext,
java.lang.Class.class, value)); return true;
- case "disablefeatures":
- case "disableFeatures":
target.setDisableFeatures(property(camelContext, java.lang.String.class,
value)); return true;
- case "enablefeatures":
- case "enableFeatures": target.setEnableFeatures(property(camelContext,
java.lang.String.class, value)); return true;
case "objectmapper":
case "objectMapper": target.setObjectMapper(property(camelContext,
com.fasterxml.jackson.databind.ObjectMapper.class, value)); return true;
case "prettyprint":
@@ -72,10 +66,6 @@ public class OcsfDataFormatConfigurer extends
org.apache.camel.support.component
case "allowUnmarshallType": return boolean.class;
case "collectiontype":
case "collectionType": return java.lang.Class.class;
- case "disablefeatures":
- case "disableFeatures": return java.lang.String.class;
- case "enablefeatures":
- case "enableFeatures": return java.lang.String.class;
case "objectmapper":
case "objectMapper": return
com.fasterxml.jackson.databind.ObjectMapper.class;
case "prettyprint":
@@ -98,10 +88,6 @@ public class OcsfDataFormatConfigurer extends
org.apache.camel.support.component
case "allowUnmarshallType": return target.isAllowUnmarshallType();
case "collectiontype":
case "collectionType": return target.getCollectionType();
- case "disablefeatures":
- case "disableFeatures": return target.getDisableFeatures();
- case "enablefeatures":
- case "enableFeatures": return target.getEnableFeatures();
case "objectmapper":
case "objectMapper": return target.getObjectMapper();
case "prettyprint":
diff --git
a/components/camel-ocsf/src/generated/resources/META-INF/org/apache/camel/dataformat/ocsf/ocsf.json
b/components/camel-ocsf/src/generated/resources/META-INF/org/apache/camel/dataformat/ocsf/ocsf.json
index 7c6f91004514..d92089a649f0 100644
---
a/components/camel-ocsf/src/generated/resources/META-INF/org/apache/camel/dataformat/ocsf/ocsf.json
+++
b/components/camel-ocsf/src/generated/resources/META-INF/org/apache/camel/dataformat/ocsf/ocsf.json
@@ -23,8 +23,6 @@
"collectionType": { "index": 4, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows to use different collection types than java.util.Collection
based as default." },
"useList": { "index": 5, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of OCSF events."
},
"allowUnmarshallType": { "index": 6, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
the unmarshal type can be specified via the CamelOcsfUnmarshalType header. This
should only be enabled when desired to be used." },
- "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." },
- "enableFeatures": { "index": 8, "kind": "attribute", "displayName":
"Enable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializatio [...]
- "disableFeatures": { "index": 9, "kind": "attribute", "displayName":
"Disable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializa [...]
+ "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." }
}
}
diff --git
a/components/camel-ocsf/src/main/java/org/apache/camel/dataformat/ocsf/OcsfDataFormat.java
b/components/camel-ocsf/src/main/java/org/apache/camel/dataformat/ocsf/OcsfDataFormat.java
index edb9aab6d5f8..0fb99d39c5c6 100644
---
a/components/camel-ocsf/src/main/java/org/apache/camel/dataformat/ocsf/OcsfDataFormat.java
+++
b/components/camel-ocsf/src/main/java/org/apache/camel/dataformat/ocsf/OcsfDataFormat.java
@@ -22,12 +22,10 @@ import java.io.OutputStream;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import java.util.Set;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.SerializationFeature;
@@ -42,7 +40,6 @@ import org.apache.camel.spi.DataFormat;
import org.apache.camel.spi.DataFormatName;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.annotations.Dataformat;
-import org.apache.camel.support.ObjectHelper;
import org.apache.camel.support.service.ServiceSupport;
import org.apache.camel.util.CastUtils;
import org.slf4j.Logger;
@@ -72,8 +69,6 @@ public class OcsfDataFormat extends ServiceSupport implements
DataFormat, DataFo
private Class<? extends Collection> collectionType;
private boolean useList;
private boolean prettyPrint;
- private String enableFeatures;
- private String disableFeatures;
/**
* Use the default Jackson {@link ObjectMapper} and {@link OcsfEvent} as
unmarshal type.
@@ -278,78 +273,6 @@ public class OcsfDataFormat extends ServiceSupport
implements DataFormat, DataFo
this.prettyPrint = prettyPrint;
}
- public String getEnableFeatures() {
- return enableFeatures;
- }
-
- /**
- * Set of features to enable on the Jackson {@link ObjectMapper}. The
features should be a name that matches a enum
- * from {@link SerializationFeature}, {@link DeserializationFeature}, or
{@link MapperFeature}.
- */
- public void setEnableFeatures(String enableFeatures) {
- this.enableFeatures = enableFeatures;
- }
-
- public String getDisableFeatures() {
- return disableFeatures;
- }
-
- /**
- * Set of features to disable on the Jackson {@link ObjectMapper}. The
features should be a name that matches a enum
- * from {@link SerializationFeature}, {@link DeserializationFeature}, or
{@link MapperFeature}.
- */
- public void setDisableFeatures(String disableFeatures) {
- this.disableFeatures = disableFeatures;
- }
-
- public void enableFeature(SerializationFeature feature) {
- if (enableFeatures == null) {
- enableFeatures = feature.name();
- } else {
- enableFeatures += "," + feature.name();
- }
- }
-
- public void enableFeature(DeserializationFeature feature) {
- if (enableFeatures == null) {
- enableFeatures = feature.name();
- } else {
- enableFeatures += "," + feature.name();
- }
- }
-
- public void enableFeature(MapperFeature feature) {
- if (enableFeatures == null) {
- enableFeatures = feature.name();
- } else {
- enableFeatures += "," + feature.name();
- }
- }
-
- public void disableFeature(SerializationFeature feature) {
- if (disableFeatures == null) {
- disableFeatures = feature.name();
- } else {
- disableFeatures += "," + feature.name();
- }
- }
-
- public void disableFeature(DeserializationFeature feature) {
- if (disableFeatures == null) {
- disableFeatures = feature.name();
- } else {
- disableFeatures += "," + feature.name();
- }
- }
-
- public void disableFeature(MapperFeature feature) {
- if (disableFeatures == null) {
- disableFeatures = feature.name();
- } else {
- disableFeatures += "," + feature.name();
- }
- }
-
@Override
protected void doInit() throws Exception {
super.doInit();
@@ -393,60 +316,6 @@ public class OcsfDataFormat extends ServiceSupport
implements DataFormat, DataFo
if (prettyPrint) {
objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
}
-
- if (enableFeatures != null) {
- Iterator<?> it = ObjectHelper.createIterator(enableFeatures);
- while (it.hasNext()) {
- String enable = it.next().toString();
- // it can be different kind
- SerializationFeature sf =
getCamelContext().getTypeConverter().tryConvertTo(SerializationFeature.class,
enable);
- if (sf != null) {
- objectMapper.enable(sf);
- continue;
- }
- DeserializationFeature df
- =
getCamelContext().getTypeConverter().tryConvertTo(DeserializationFeature.class,
enable);
- if (df != null) {
- objectMapper.enable(df);
- continue;
- }
- MapperFeature mf =
getCamelContext().getTypeConverter().tryConvertTo(MapperFeature.class, enable);
- if (mf != null) {
- objectMapper.enable(mf);
- continue;
- }
- throw new IllegalArgumentException(
- "Enable feature: " + enable
- + " cannot be converted to
an accepted enum of types
[SerializationFeature,DeserializationFeature,MapperFeature]");
- }
- }
- if (disableFeatures != null) {
- Iterator<?> it = ObjectHelper.createIterator(disableFeatures);
- while (it.hasNext()) {
- String disable = it.next().toString();
- // it can be different kind
- SerializationFeature sf
- =
getCamelContext().getTypeConverter().tryConvertTo(SerializationFeature.class,
disable);
- if (sf != null) {
- objectMapper.disable(sf);
- continue;
- }
- DeserializationFeature df
- =
getCamelContext().getTypeConverter().tryConvertTo(DeserializationFeature.class,
disable);
- if (df != null) {
- objectMapper.disable(df);
- continue;
- }
- MapperFeature mf =
getCamelContext().getTypeConverter().tryConvertTo(MapperFeature.class, disable);
- if (mf != null) {
- objectMapper.disable(mf);
- continue;
- }
- throw new IllegalArgumentException(
- "Disable feature: " + disable
- + " cannot be converted to
an accepted enum of types
[SerializationFeature,DeserializationFeature,MapperFeature]");
- }
- }
}
@Override
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/ocsf.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/ocsf.json
index 51e0dcdc6397..47f07027abbf 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/ocsf.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/ocsf.json
@@ -20,8 +20,6 @@
"collectionType": { "index": 4, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows to use different collection types than java.util.Collection
based as default." },
"useList": { "index": 5, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of OCSF events."
},
"allowUnmarshallType": { "index": 6, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
the unmarshal type can be specified via the CamelOcsfUnmarshalType header. This
should only be enabled when desired to be used." },
- "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." },
- "enableFeatures": { "index": 8, "kind": "attribute", "displayName":
"Enable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializatio [...]
- "disableFeatures": { "index": 9, "kind": "attribute", "displayName":
"Disable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "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.Deserializa [...]
+ "prettyPrint": { "index": 7, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." }
}
}
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/OcsfDataFormat.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/OcsfDataFormat.java
index 9d0fb1591a77..ca9556978c49 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/OcsfDataFormat.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/OcsfDataFormat.java
@@ -59,10 +59,6 @@ public class OcsfDataFormat extends DataFormatDefinition {
@XmlAttribute
@Metadata(defaultValue = "false", javaType = "java.lang.Boolean")
private String prettyPrint;
- @XmlAttribute
- private String enableFeatures;
- @XmlAttribute
- private String disableFeatures;
public OcsfDataFormat() {
super("ocsf");
@@ -79,8 +75,6 @@ public class OcsfDataFormat extends DataFormatDefinition {
this.useList = source.useList;
this.allowUnmarshallType = source.allowUnmarshallType;
this.prettyPrint = source.prettyPrint;
- this.enableFeatures = source.enableFeatures;
- this.disableFeatures = source.disableFeatures;
}
public OcsfDataFormat(Class<?> unmarshalType) {
@@ -102,8 +96,6 @@ public class OcsfDataFormat extends DataFormatDefinition {
this.useList = builder.useList;
this.allowUnmarshallType = builder.allowUnmarshallType;
this.prettyPrint = builder.prettyPrint;
- this.enableFeatures = builder.enableFeatures;
- this.disableFeatures = builder.disableFeatures;
}
@Override
@@ -212,42 +204,6 @@ public class OcsfDataFormat extends DataFormatDefinition {
this.allowUnmarshallType = allowUnmarshallType;
}
- public String getEnableFeatures() {
- return enableFeatures;
- }
-
- /**
- * Set of features to enable on the Jackson
<tt>com.fasterxml.jackson.databind.ObjectMapper</tt>.
- * <p/>
- * The features should be a name that matches a enum from
- * <tt>com.fasterxml.jackson.databind.SerializationFeature</tt>,
- * <tt>com.fasterxml.jackson.databind.DeserializationFeature</tt>, or
- * <tt>com.fasterxml.jackson.databind.MapperFeature</tt>
- * <p/>
- * Multiple features can be separated by comma
- */
- public void setEnableFeatures(String enableFeatures) {
- this.enableFeatures = enableFeatures;
- }
-
- public String getDisableFeatures() {
- return disableFeatures;
- }
-
- /**
- * Set of features to disable on the Jackson
<tt>com.fasterxml.jackson.databind.ObjectMapper</tt>.
- * <p/>
- * The features should be a name that matches a enum from
- * <tt>com.fasterxml.jackson.databind.SerializationFeature</tt>,
- * <tt>com.fasterxml.jackson.databind.DeserializationFeature</tt>, or
- * <tt>com.fasterxml.jackson.databind.MapperFeature</tt>
- * <p/>
- * Multiple features can be separated by comma
- */
- public void setDisableFeatures(String disableFeatures) {
- this.disableFeatures = disableFeatures;
- }
-
/**
* {@code Builder} is a specific builder for {@link OcsfDataFormat}.
*/
@@ -263,8 +219,6 @@ public class OcsfDataFormat extends DataFormatDefinition {
private String useList;
private String allowUnmarshallType;
private String prettyPrint;
- private String enableFeatures;
- private String disableFeatures;
/**
* Lookup and use the existing ObjectMapper with the given id when
using Jackson.
@@ -376,36 +330,6 @@ public class OcsfDataFormat extends DataFormatDefinition {
return this;
}
- /**
- * Set of features to enable on the Jackson
<tt>com.fasterxml.jackson.databind.ObjectMapper</tt>.
- * <p/>
- * The features should be a name that matches a enum from
- * <tt>com.fasterxml.jackson.databind.SerializationFeature</tt>,
- * <tt>com.fasterxml.jackson.databind.DeserializationFeature</tt>, or
- * <tt>com.fasterxml.jackson.databind.MapperFeature</tt>
- * <p/>
- * Multiple features can be separated by comma
- */
- public Builder enableFeatures(String enableFeatures) {
- this.enableFeatures = enableFeatures;
- return this;
- }
-
- /**
- * Set of features to disable on the Jackson
<tt>com.fasterxml.jackson.databind.ObjectMapper</tt>.
- * <p/>
- * The features should be a name that matches a enum from
- * <tt>com.fasterxml.jackson.databind.SerializationFeature</tt>,
- * <tt>com.fasterxml.jackson.databind.DeserializationFeature</tt>, or
- * <tt>com.fasterxml.jackson.databind.MapperFeature</tt>
- * <p/>
- * Multiple features can be separated by comma
- */
- public Builder disableFeatures(String disableFeatures) {
- this.disableFeatures = disableFeatures;
- return this;
- }
-
@Override
public OcsfDataFormat end() {
return new OcsfDataFormat(this);
diff --git
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/OcsfDataFormatReifier.java
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/OcsfDataFormatReifier.java
index d7aed5dd2446..923c5b0f08c6 100644
---
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/OcsfDataFormatReifier.java
+++
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/OcsfDataFormatReifier.java
@@ -32,12 +32,12 @@ public class OcsfDataFormatReifier extends
DataFormatReifier<OcsfDataFormat> {
protected void prepareDataFormatConfig(Map<String, Object> properties) {
// must be a reference value
properties.put("objectMapper", asRef(definition.getObjectMapper()));
+ properties.put("useDefaultObjectMapper",
definition.getUseDefaultObjectMapper());
properties.put("unmarshalType", or(definition.getUnmarshalType(),
definition.getUnmarshalTypeName()));
properties.put("collectionType", or(definition.getCollectionType(),
definition.getCollectionTypeName()));
properties.put("useList", definition.getUseList());
+ properties.put("allowUnmarshallType",
definition.getAllowUnmarshallType());
properties.put("prettyPrint", definition.getPrettyPrint());
- properties.put("enableFeatures", definition.getEnableFeatures());
- properties.put("disableFeatures", definition.getDisableFeatures());
}
}
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 0167723fa1de..e9f7b1cbf8f7 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -2090,8 +2090,6 @@ public class ModelParser extends BaseParser {
return doParse(new OcsfDataFormat(), (def, key, val) -> switch (key) {
case "allowUnmarshallType": def.setAllowUnmarshallType(val);
yield true;
case "collectionType": def.setCollectionTypeName(val); yield
true;
- case "disableFeatures": def.setDisableFeatures(val); yield
true;
- case "enableFeatures": def.setEnableFeatures(val); yield true;
case "objectMapper": def.setObjectMapper(val); yield true;
case "prettyPrint": def.setPrettyPrint(val); yield true;
case "unmarshalType": def.setUnmarshalTypeName(val); yield
true;
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
index 267bbf4ae475..69fc9d2e5750 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
@@ -2812,9 +2812,7 @@ public class ModelWriter extends BaseWriter {
doWriteAttribute("objectMapper", def.getObjectMapper(), null);
doWriteAttribute("unmarshalType", def.getUnmarshalTypeName(), null);
doWriteAttribute("collectionType", def.getCollectionTypeName(), null);
- doWriteAttribute("enableFeatures", def.getEnableFeatures(), null);
doWriteAttribute("useList", def.getUseList(), "false");
- doWriteAttribute("disableFeatures", def.getDisableFeatures(), null);
endElement(name);
}
protected void doWritePGPDataFormat(String name, PGPDataFormat def) throws
IOException {
diff --git
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
index 2b3a847ae2c1..fa9a4c21d316 100644
---
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
+++
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
@@ -2812,9 +2812,7 @@ public class ModelWriter extends BaseWriter {
doWriteAttribute("objectMapper", def.getObjectMapper(), null);
doWriteAttribute("unmarshalType", def.getUnmarshalTypeName(), null);
doWriteAttribute("collectionType", def.getCollectionTypeName(), null);
- doWriteAttribute("enableFeatures", def.getEnableFeatures(), null);
doWriteAttribute("useList", def.getUseList(), "false");
- doWriteAttribute("disableFeatures", def.getDisableFeatures(), null);
endElement(name);
}
protected void doWritePGPDataFormat(String name, PGPDataFormat def) throws
IOException {
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index 1ddd2a268f30..7da575e914eb 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -10842,8 +10842,6 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
properties = {
@YamlProperty(name = "allowUnmarshallType", type =
"boolean", defaultValue = "false", description = "If enabled then the unmarshal
type can be specified via the CamelOcsfUnmarshalType header. This should only
be enabled when desired to be used.", displayName = "Allow Unmarshall Type"),
@YamlProperty(name = "collectionType", type = "string",
description = "Refers to a custom collection type to lookup in the registry to
use. This option should rarely be used, but allows to use different collection
types than java.util.Collection based as default.", displayName = "Collection
Type"),
- @YamlProperty(name = "disableFeatures", type = "string",
description = "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", displayName = "Disable Features"),
- @YamlProperty(name = "enableFeatures", type = "string",
description = "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", displayName = "Enable Features"),
@YamlProperty(name = "id", type = "string", description =
"The id of this node", displayName = "Id"),
@YamlProperty(name = "objectMapper", type = "string",
description = "Lookup and use the existing ObjectMapper with the given id when
using Jackson.", displayName = "Object Mapper"),
@YamlProperty(name = "prettyPrint", type = "boolean",
defaultValue = "false", description = "To enable pretty printing output nicely
formatted. Is by default false.", displayName = "Pretty Print"),
@@ -10877,16 +10875,6 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setCollectionTypeName(val);
break;
}
- case "disableFeatures": {
- String val = asText(node);
- target.setDisableFeatures(val);
- break;
- }
- case "enableFeatures": {
- String val = asText(node);
- target.setEnableFeatures(val);
- break;
- }
case "id": {
String val = asText(node);
target.setId(val);
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index 82c8232c4fb7..e71bf146b348 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -12425,16 +12425,6 @@
"title" : "Collection Type",
"description" : "Refers to a custom collection type to lookup in
the registry to use. This option should rarely be used, but allows to use
different collection types than java.util.Collection based as default."
},
- "disableFeatures" : {
- "type" : "string",
- "title" : "Disable Features",
- "description" : "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"
- },
- "enableFeatures" : {
- "type" : "string",
- "title" : "Enable Features",
- "description" : "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"
- },
"id" : {
"type" : "string",
"title" : "Id",