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, sourceTypesDEFAULT_PRIORITY_WEIGHTING, MAX_PRIORITY_WEIGHTING, MIN_PRIORITY_WEIGHTINGPHASE_NAMEPHASE_NAMEPROPERTY_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, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceTypegetAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform, transformprocessdisposesetNamegetNamesetMuleContextsetEndpointpublic static final String CLASS_PROPERTY
public void initialise()
throws InitialisationException
AbstractTransformerinitialise in interface Initialisableinitialise in class AbstractTransformerInitialisationException - 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 AbstractTransformerTransformerExceptionpublic int getPriorityWeighting()
ConvertergetPriorityWeighting in interface ConverterConverter.MIN_PRIORITY_WEIGHTING and Converter.MAX_PRIORITY_WEIGHTING.public void setPriorityWeighting(int weighting)
ConvertersetPriorityWeighting in interface Converterweighting - 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.