org.mule.transformer.simple
Class MapToBean
java.lang.Object
org.mule.transformer.AbstractTransformer
org.mule.transformer.simple.MapToBean
- All Implemented Interfaces:
- MuleContextAware, MuleContextNotificationListener<MuleContextNotification>, ServerNotificationListener<MuleContextNotification>, Disposable, Initialisable, NamedObject, MessageProcessor, DiscoverableTransformer, Transformer, EndpointAware
public class MapToBean
- extends AbstractTransformer
- implements DiscoverableTransformer
Creates and object of type 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.
Method Summary |
protected java.lang.Object |
doTransform(java.lang.Object src,
java.lang.String encoding)
|
int |
getPriorityWeighting()
If 2 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 |
Methods inherited from class org.mule.transformer.AbstractTransformer |
checkReturnClass, dispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, onNotification, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CLASS_PROPERTY
public static final java.lang.String CLASS_PROPERTY
- "className"
- See Also:
- Constant Field Values
MapToBean
public MapToBean()
initialise
public void initialise()
throws InitialisationException
- Description copied from class:
AbstractTransformer
- Template method where deriving classes can do any initialisation after the
properties have been set on this transformer
- Specified by:
initialise
in interface Initialisable
- Overrides:
initialise
in class AbstractTransformer
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
doTransform
protected java.lang.Object doTransform(java.lang.Object src,
java.lang.String encoding)
throws TransformerException
- Specified by:
doTransform
in class AbstractTransformer
- Throws:
TransformerException
getPriorityWeighting
public int getPriorityWeighting()
- Description copied from interface:
DiscoverableTransformer
- If 2 or more discoverable transformers are equal, this value can be used to select the correct one
- Specified by:
getPriorityWeighting
in interface DiscoverableTransformer
- Returns:
- the priority weighting for this transformer. This is a value between
DiscoverableTransformer.MIN_PRIORITY_WEIGHTING
and DiscoverableTransformer.MAX_PRIORITY_WEIGHTING
.
setPriorityWeighting
public void setPriorityWeighting(int weighting)
- Description copied from interface:
DiscoverableTransformer
- If 2 or more discoverable transformers are equal, this value can be used to select the correct one
- Specified by:
setPriorityWeighting
in interface DiscoverableTransformer
- Parameters:
weighting
- the priority weighting for this transformer. This is a value between
DiscoverableTransformer.MIN_PRIORITY_WEIGHTING
and DiscoverableTransformer.MAX_PRIORITY_WEIGHTING
.
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.