org.mule.transformers.simple
Class MessagePropertiesTransformer
java.lang.Object
org.mule.transformers.AbstractTransformer
org.mule.transformers.AbstractEventAwareTransformer
org.mule.transformers.simple.MessagePropertiesTransformer
- All Implemented Interfaces:
- Cloneable, Initialisable, UMOBaseTransformer, UMOTransformer
- public class MessagePropertiesTransformer
- extends AbstractEventAwareTransformer
A configurable message transformer that allows users to add, overwrite and delete
properties on the current message. Users can set a List
of
'deleteProperties' names to remove from the message and can also set a Map
of 'addProperties' that will be added to the message and possibly overwrite
existing properties with the same name.
If #overwrite
is set to false
, and a property exists on
the message (even if the value is null
, it will be left intact.
The transformer then acts as a more gentle 'enricher'. The default setting is
true
.
Methods inherited from class org.mule.transformers.AbstractTransformer |
checkReturnClass, generateTransformerName, getEndpoint, getFinalReturnClass, getName, getNextTransformer, getReturnClass, initialise, isAcceptNull, isIgnoreBadInput, isSourceTypeSupported, isSourceTypeSupported, nextTransform, registerSourceType, setEndpoint, setIgnoreBadInput, setName, setNextTransformer, setReturnClass, toString, transform, unregisterSourceType |
MessagePropertiesTransformer
public MessagePropertiesTransformer()
clone
public Object clone()
throws CloneNotSupportedException
- Specified by:
clone
in interface UMOBaseTransformer
- Overrides:
clone
in class AbstractTransformer
- Throws:
CloneNotSupportedException
transform
public Object transform(Object src,
String encoding,
UMOEventContext context)
throws TransformerException
- Specified by:
transform
in class AbstractEventAwareTransformer
- Throws:
TransformerException
getDeleteProperties
public List getDeleteProperties()
setDeleteProperties
public void setDeleteProperties(List deleteProperties)
getAddProperties
public Map getAddProperties()
setAddProperties
public void setAddProperties(Map addProperties)
isOverwrite
public boolean isOverwrite()
setOverwrite
public void setOverwrite(boolean overwrite)
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.