public class MapToBean extends AbstractTransformer implements DiscoverableTransformer
AbstractTransformer.getReturnClass()
and populates values of a
Map
as bean properties on the object.
The bean class name can also be passed in as a property on the Map (which gets removed once read).
The CLASS_PROPERTY
should be set as a fully qualified class name string.Modifier and Type | Field and Description |
---|---|
static String |
CLASS_PROPERTY
"className"
|
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
DEFAULT_PRIORITY_WEIGHTING, MAX_PRIORITY_WEIGHTING, MIN_PRIORITY_WEIGHTING
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
MapToBean() |
Modifier and Type | Method and Description |
---|---|
protected Object |
doTransform(Object src,
String encoding) |
int |
getPriorityWeighting()
If two or more discoverable transformers are equal, this value can be
used to select the correct one
|
void |
initialise()
Template method where deriving classes can do any initialisation after the
properties have been set on this transformer
|
void |
setPriorityWeighting(int weighting)
If 2 or more discoverable transformers are equal, this value can be used
to select the correct one
|
dispose, generateTransformerName, getAnnotation, getAnnotations, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setAnnotations, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform, transform
process
dispose
setName
getName
setMuleContext
setEndpoint
public static final String CLASS_PROPERTY
public void initialise() throws InitialisationException
AbstractTransformer
initialise
in interface Initialisable
initialise
in class AbstractTransformer
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered fromprotected Object doTransform(Object src, String encoding) throws TransformerException
doTransform
in class AbstractTransformer
TransformerException
public int getPriorityWeighting()
Converter
getPriorityWeighting
in interface Converter
Converter.MIN_PRIORITY_WEIGHTING
and Converter.MAX_PRIORITY_WEIGHTING
.public void setPriorityWeighting(int weighting)
Converter
setPriorityWeighting
in interface Converter
weighting
- the priority weighting for this transformer. This is a value between
Converter.MIN_PRIORITY_WEIGHTING
and Converter.MAX_PRIORITY_WEIGHTING
.Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.