@Metadata(firstVersion="2.17.0", label="dataformat,transformation,yaml", title="YAML") public class YAMLDataFormat extends DataFormatDefinition
Constructor and Description |
---|
YAMLDataFormat() |
YAMLDataFormat(YAMLLibrary library) |
YAMLDataFormat(YAMLLibrary library,
Class<?> unmarshalType) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureDataFormat(DataFormat dataFormat,
CamelContext camelContext)
Allows derived classes to customize the data format
|
protected void |
configureSnakeDataFormat(DataFormat dataFormat,
CamelContext camelContext) |
protected DataFormat |
createDataFormat(RouteContext routeContext)
Factory method to create the data format instance
|
ClassLoader |
getClassLoader() |
String |
getConstructor() |
String |
getDumperOptions() |
YAMLLibrary |
getLibrary() |
String |
getRepresenter() |
String |
getResolver() |
List<YAMLTypeFilterDefinition> |
getTypeFilters() |
Class<?> |
getUnmarshalType() |
String |
getUnmarshalTypeName() |
boolean |
isAllowAnyType() |
boolean |
isPrettyFlow() |
boolean |
isUseApplicationContextClassLoader() |
void |
setAllowAnyType(boolean allowAnyType)
Allow any class to be un-marshaled
|
void |
setClassLoader(ClassLoader classLoader)
Set a custom classloader
|
void |
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 |
setPrettyFlow(boolean prettyFlow)
Force the emitter to produce a pretty YAML document when using the flow
style.
|
protected void |
setProperty(DataFormat dataFormat,
CamelContext camelContext,
String propertyName,
Object propertyValue) |
protected void |
setPropertyRef(DataFormat dataFormat,
CamelContext camelContext,
String propertyName,
String propertyValue) |
void |
setRepresenter(String representer)
Representer to emit outgoing objects.
|
void |
setResolver(String resolver)
Resolver to detect implicit type
|
void |
setTypeFilters(List<YAMLTypeFilterDefinition> typeFilters)
Set the types SnakeYAML is allowed to un-marshall
|
void |
setUnmarshalType(Class<?> type)
Class of the object to be created
|
void |
setUnmarshalTypeName(String unmarshalTypeName)
Class name of the java type to use when unarmshalling
|
void |
setUseApplicationContextClassLoader(boolean useApplicationContextClassLoader)
Use ApplicationContextClassLoader as custom ClassLoader
|
configureDataFormat, getContentTypeHeader, getDataFormat, getDataFormat, getDataFormat, getDataFormatName, getOtherAttributes, getShortName, setContentTypeHeader, setDataFormat, setDataFormatName, setOtherAttributes, setProperty, setProperty
getId, setId
public YAMLDataFormat()
public YAMLDataFormat(YAMLLibrary library)
public YAMLDataFormat(YAMLLibrary library, Class<?> unmarshalType)
public YAMLLibrary getLibrary()
public void setLibrary(YAMLLibrary library)
public Class<?> getUnmarshalType()
public void setUnmarshalType(Class<?> type)
public String getUnmarshalTypeName()
public void setUnmarshalTypeName(String unmarshalTypeName)
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public String getConstructor()
public void setConstructor(String constructor)
public String getRepresenter()
public void setRepresenter(String representer)
public String getDumperOptions()
public void setDumperOptions(String dumperOptions)
public String getResolver()
public void setResolver(String resolver)
public boolean isUseApplicationContextClassLoader()
public void setUseApplicationContextClassLoader(boolean useApplicationContextClassLoader)
public boolean isPrettyFlow()
public void setPrettyFlow(boolean prettyFlow)
public boolean isAllowAnyType()
public void setAllowAnyType(boolean allowAnyType)
public List<YAMLTypeFilterDefinition> getTypeFilters()
public void setTypeFilters(List<YAMLTypeFilterDefinition> typeFilters)
protected DataFormat createDataFormat(RouteContext routeContext)
DataFormatDefinition
createDataFormat
in class DataFormatDefinition
protected void configureDataFormat(DataFormat dataFormat, CamelContext camelContext)
DataFormatDefinition
configureDataFormat
in class DataFormatDefinition
protected void configureSnakeDataFormat(DataFormat dataFormat, CamelContext camelContext)
protected void setProperty(DataFormat dataFormat, CamelContext camelContext, String propertyName, Object propertyValue)
protected void setPropertyRef(DataFormat dataFormat, CamelContext camelContext, String propertyName, String propertyValue)
Apache Camel