public class MediaTypeUtils extends Object
| Constructor and Description |
|---|
MediaTypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.mule.runtime.api.metadata.MediaType |
getDefaultMediaType(org.mule.runtime.api.meta.model.ComponentModel componentModel)
This method returns a default
MediaType given a ComponentModel. |
public static org.mule.runtime.api.metadata.MediaType getDefaultMediaType(org.mule.runtime.api.meta.model.ComponentModel componentModel)
MediaType given a ComponentModel.
The first that applies will happen:
- If the component has a MediaTypeModelProperty, and this property has a MediaType, this one will be returned.
- If the compenent has an Output, a MediaType acording to this output will be returned.
- Otherwise, the ANY MediaType will be returned.componentModel - ComponentModel that we want to get the defaultMediaType from.MediaType according to the componentModel.Copyright © 2003–2024 MuleSoft, Inc.. All rights reserved.