Class JacksonXMLDataFormat.Builder
- java.lang.Object
-
- org.apache.camel.model.dataformat.JacksonXMLDataFormat.Builder
-
- All Implemented Interfaces:
DataFormatBuilder<JacksonXMLDataFormat>
- Enclosing class:
- JacksonXMLDataFormat
public static class JacksonXMLDataFormat.Builder extends Object implements DataFormatBuilder<JacksonXMLDataFormat>
Builder
is a specific builder forJacksonXMLDataFormat
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JacksonXMLDataFormat.Builder
allowJmsType(boolean allowJmsType)
Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.JacksonXMLDataFormat.Builder
allowJmsType(String allowJmsType)
Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.JacksonXMLDataFormat.Builder
allowUnmarshallType(boolean allowUnmarshallType)
If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.JacksonXMLDataFormat.Builder
allowUnmarshallType(String allowUnmarshallType)
If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.JacksonXMLDataFormat.Builder
collectionType(Class<?> collectionType)
JacksonXMLDataFormat.Builder
collectionTypeName(String collectionTypeName)
Refers to a custom collection type to lookup in the registry to use.JacksonXMLDataFormat.Builder
contentTypeHeader(boolean contentTypeHeader)
JacksonXMLDataFormat.Builder
contentTypeHeader(String contentTypeHeader)
JacksonXMLDataFormat.Builder
disableFeatures(String disableFeatures)
Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.JacksonXMLDataFormat.Builder
enableFeatures(String enableFeatures)
Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.JacksonXMLDataFormat.Builder
enableJaxbAnnotationModule(boolean enableJaxbAnnotationModule)
Whether to enable the JAXB annotations module when using jackson.JacksonXMLDataFormat.Builder
enableJaxbAnnotationModule(String enableJaxbAnnotationModule)
Whether to enable the JAXB annotations module when using jackson.JacksonXMLDataFormat
end()
Ends the build of the data format.JacksonXMLDataFormat.Builder
include(String include)
If you want to marshal a pojo to JSON, and the pojo has some fields with null values.JacksonXMLDataFormat.Builder
jsonView(Class<?> jsonView)
When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output.JacksonXMLDataFormat.Builder
jsonViewTypeName(String jsonViewTypeName)
When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output.JacksonXMLDataFormat.Builder
moduleClassNames(String moduleClassNames)
To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names.JacksonXMLDataFormat.Builder
moduleRefs(String moduleRefs)
To use custom Jackson modules referred from the Camel registry.JacksonXMLDataFormat.Builder
prettyPrint(boolean prettyPrint)
To enable pretty printing output nicely formatted.JacksonXMLDataFormat.Builder
prettyPrint(String prettyPrint)
To enable pretty printing output nicely formatted.JacksonXMLDataFormat.Builder
timezone(String timezone)
If set then Jackson will use the Timezone when marshalling/unmarshalling.JacksonXMLDataFormat.Builder
unmarshalType(Class<?> unmarshalType)
Class of the java type to use when unmarshallingJacksonXMLDataFormat.Builder
unmarshalTypeName(String unmarshalTypeName)
Class name of the java type to use when unmarshallingJacksonXMLDataFormat.Builder
useList(boolean useList)
To unmarshal to a List of Map or a List of Pojo.JacksonXMLDataFormat.Builder
useList(String useList)
To unmarshal to a List of Map or a List of Pojo.JacksonXMLDataFormat.Builder
xmlMapper(String xmlMapper)
Lookup and use the existing XmlMapper with the given id.
-
-
-
Method Detail
-
xmlMapper
public JacksonXMLDataFormat.Builder xmlMapper(String xmlMapper)
Lookup and use the existing XmlMapper with the given id.
-
prettyPrint
public JacksonXMLDataFormat.Builder prettyPrint(String prettyPrint)
To enable pretty printing output nicely formatted. Is by default false.
-
prettyPrint
public JacksonXMLDataFormat.Builder prettyPrint(boolean prettyPrint)
To enable pretty printing output nicely formatted. Is by default false.
-
unmarshalTypeName
public JacksonXMLDataFormat.Builder unmarshalTypeName(String unmarshalTypeName)
Class name of the java type to use when unmarshalling
-
unmarshalType
public JacksonXMLDataFormat.Builder unmarshalType(Class<?> unmarshalType)
Class of the java type to use when unmarshalling
-
jsonViewTypeName
public JacksonXMLDataFormat.Builder jsonViewTypeName(String jsonViewTypeName)
When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has @JsonView annotations
-
jsonView
public JacksonXMLDataFormat.Builder jsonView(Class<?> jsonView)
When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has @JsonView annotations
-
include
public JacksonXMLDataFormat.Builder include(String include)
If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
-
allowJmsType
public JacksonXMLDataFormat.Builder allowJmsType(String allowJmsType)
Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.
-
allowJmsType
public JacksonXMLDataFormat.Builder allowJmsType(boolean allowJmsType)
Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.
-
collectionTypeName
public JacksonXMLDataFormat.Builder collectionTypeName(String collectionTypeName)
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.
-
collectionType
public JacksonXMLDataFormat.Builder collectionType(Class<?> collectionType)
-
useList
public JacksonXMLDataFormat.Builder useList(String useList)
To unmarshal to a List of Map or a List of Pojo.
-
useList
public JacksonXMLDataFormat.Builder useList(boolean useList)
To unmarshal to a List of Map or a List of Pojo.
-
enableJaxbAnnotationModule
public JacksonXMLDataFormat.Builder enableJaxbAnnotationModule(String enableJaxbAnnotationModule)
Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson.
-
enableJaxbAnnotationModule
public JacksonXMLDataFormat.Builder enableJaxbAnnotationModule(boolean enableJaxbAnnotationModule)
Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson.
-
moduleClassNames
public JacksonXMLDataFormat.Builder moduleClassNames(String moduleClassNames)
To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma.
-
moduleRefs
public JacksonXMLDataFormat.Builder moduleRefs(String moduleRefs)
To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma.
-
enableFeatures
public JacksonXMLDataFormat.Builder enableFeatures(String enableFeatures)
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
public JacksonXMLDataFormat.Builder disableFeatures(String disableFeatures)
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
-
allowUnmarshallType
public JacksonXMLDataFormat.Builder allowUnmarshallType(String allowUnmarshallType)
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.
-
allowUnmarshallType
public JacksonXMLDataFormat.Builder allowUnmarshallType(boolean allowUnmarshallType)
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.
-
contentTypeHeader
public JacksonXMLDataFormat.Builder contentTypeHeader(String contentTypeHeader)
-
contentTypeHeader
public JacksonXMLDataFormat.Builder contentTypeHeader(boolean contentTypeHeader)
-
timezone
public JacksonXMLDataFormat.Builder timezone(String timezone)
If set then Jackson will use the Timezone when marshalling/unmarshalling.
-
end
public JacksonXMLDataFormat end()
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Specified by:
end
in interfaceDataFormatBuilder<JacksonXMLDataFormat>
- Returns:
- the data format fully built.
-
-