public class MessagePropertiesTransformer extends AbstractMessageTransformer
A configurable message transformer that allows users to add, overwrite, rename and delete
properties on the current message. Users can set a List of 'deleteProperties' regular
expressions to remove the matching properties 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.
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypesPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
MessagePropertiesTransformer() |
checkReturnClass, doTransform, isSourceDataTypeSupported, transform, transform, transformdispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, unregisterSourceType, unregisterSourceTypegetAnnotation, getAnnotations, setAnnotationsequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transformprocessinitialisedisposesetNamegetNamesetMuleContextsetEndpointpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic Object transformMessage(MuleMessage message, String outputEncoding)
AbstractMessageTransformertransformMessage in class AbstractMessageTransformerprotected void deleteProperties(MuleMessage message)
protected void addProperties(MuleMessage message)
protected void renameProperties(MuleMessage message)
protected void renameInScope(String oldKey, String newKey, PropertyScope propertyScope, MuleMessage message)
public void setDeleteProperties(List<String> deleteProperties)
setDeleteProperties(String...)public void setDeleteProperties(String... deleteProperties)
public Map<String,TypedValue> getAddProperties()
public void setAddTypedProperties(Map<String,TypedValue> addProperties)
public void setRenameProperties(Map<String,String> renameProperties)
renameProperties - the renameProperties to setpublic String getGetProperty()
public void setGetProperty(String getProperty)
public boolean isOverwrite()
public void setOverwrite(boolean overwrite)
public PropertyScope getScope()
public void setScope(PropertyScope scope)
public String getScopeName()
PropertyScopepublic void setScopeName(String scopeName)
scopeName - The string value name for a PropertyScopeCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.