Class YAMLDataFormat
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.DataFormatDefinition
org.apache.camel.model.dataformat.YAMLDataFormat
@Metadata(firstVersion="2.17.0",
label="dataformat,transformation,yaml",
title="YAML")
public class YAMLDataFormat
extends DataFormatDefinition
Marshal and unmarshal Java objects to and from YAML.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionYAMLDataFormat
(YAMLLibrary library) YAMLDataFormat
(YAMLLibrary library, Class<?> unmarshalType) -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> void
setAllowAnyType
(String allowAnyType) Allow any class to be un-marshaledvoid
setAllowRecursiveKeys
(String allowRecursiveKeys) Set whether recursive keys are allowed.void
setClassLoader
(ClassLoader classLoader) Set a custom classloadervoid
setConstructor
(String constructor) BaseConstructor to construct incoming documents.void
setDumperOptions
(String dumperOptions) DumperOptions to configure outgoing objects.void
setLibrary
(YAMLLibrary library) Which yaml library to use.void
setMaxAliasesForCollections
(String maxAliasesForCollections) Set the maximum amount of aliases allowed for collections.void
setPrettyFlow
(String prettyFlow) Force the emitter to produce a pretty YAML document when using the flow style.void
setRepresenter
(String representer) Representer to emit outgoing objects.void
setResolver
(String resolver) Resolver to detect implicit typevoid
setTypeFilters
(List<YAMLTypeFilterDefinition> typeFilters) Set the types SnakeYAML is allowed to un-marshallvoid
setUnmarshalType
(Class<?> type) Class of the object to be createdvoid
setUnmarshalTypeName
(String unmarshalTypeName) Class name of the java type to use when unmarshallingvoid
setUseApplicationContextClassLoader
(String useApplicationContextClassLoader) Use ApplicationContextClassLoader as custom ClassLoaderMethods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getShortName, setDataFormat, setDataFormatName
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
YAMLDataFormat
public YAMLDataFormat() -
YAMLDataFormat
-
YAMLDataFormat
-
-
Method Details
-
getDataFormatName
- Overrides:
getDataFormatName
in classDataFormatDefinition
-
getLibrary
-
setLibrary
Which yaml library to use. By default it is SnakeYAML -
getUnmarshalType
-
setUnmarshalType
Class of the object to be created -
getUnmarshalTypeName
-
setUnmarshalTypeName
Class name of the java type to use when unmarshalling -
getClassLoader
-
setClassLoader
Set a custom classloader -
getConstructor
-
setConstructor
BaseConstructor to construct incoming documents. -
getRepresenter
-
setRepresenter
Representer to emit outgoing objects. -
getDumperOptions
-
setDumperOptions
DumperOptions to configure outgoing objects. -
getResolver
-
setResolver
Resolver to detect implicit type -
getUseApplicationContextClassLoader
-
setUseApplicationContextClassLoader
Use ApplicationContextClassLoader as custom ClassLoader -
getPrettyFlow
-
setPrettyFlow
Force the emitter to produce a pretty YAML document when using the flow style. -
getAllowAnyType
-
setAllowAnyType
Allow any class to be un-marshaled -
getTypeFilters
-
setTypeFilters
Set the types SnakeYAML is allowed to un-marshall -
getMaxAliasesForCollections
-
setMaxAliasesForCollections
Set the maximum amount of aliases allowed for collections. -
getAllowRecursiveKeys
-
setAllowRecursiveKeys
Set whether recursive keys are allowed.
-