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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionYAMLDataFormat(YAMLLibrary library) YAMLDataFormat(YAMLLibrary library, Class<?> unmarshalType) -
Method Summary
Modifier and TypeMethodDescriptionClass<?> voidsetAllowAnyType(String allowAnyType) Allow any class to be un-marshaledvoidsetAllowRecursiveKeys(String allowRecursiveKeys) Set whether recursive keys are allowed.voidsetClassLoader(ClassLoader classLoader) Set a custom classloadervoidsetConstructor(String constructor) BaseConstructor to construct incoming documents.voidsetDumperOptions(String dumperOptions) DumperOptions to configure outgoing objects.voidsetLibrary(YAMLLibrary library) Which yaml library to use.voidsetMaxAliasesForCollections(String maxAliasesForCollections) Set the maximum amount of aliases allowed for collections.voidsetPrettyFlow(String prettyFlow) Force the emitter to produce a pretty YAML document when using the flow style.voidsetRepresenter(String representer) Representer to emit outgoing objects.voidsetResolver(String resolver) Resolver to detect implicit typevoidsetTypeFilters(List<YAMLTypeFilterDefinition> typeFilters) Set the types SnakeYAML is allowed to un-marshallvoidsetUnmarshalType(Class<?> type) Class of the object to be createdvoidsetUnmarshalTypeName(String unmarshalTypeName) Class name of the java type to use when unmarshallingvoidsetUseApplicationContextClassLoader(String useApplicationContextClassLoader) Use ApplicationContextClassLoader as custom ClassLoaderMethods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getShortName, setDataFormat, setDataFormatNameMethods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
YAMLDataFormat
public YAMLDataFormat() -
YAMLDataFormat
-
YAMLDataFormat
-
-
Method Details
-
getDataFormatName
- Overrides:
getDataFormatNamein 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.
-