Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.transformer.simple
Class MessagePropertiesTransformer

    java.lang.Object
      org.mule.transformer.AbstractTransformer
          org.mule.transformer.AbstractMessageAwareTransformer
              org.mule.transformer.simple.MessagePropertiesTransformer

All Implemented Interfaces:
  MuleContextAware, Initialisable, NamedObject, BaseTransformer, Transformer

    public class MessagePropertiesTransformer

extends AbstractMessageAwareTransformer
implements MuleContextAware

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`.

Field Summary

Fields inherited from class org.mule.transformer.AbstractTransformer
`DEFAULT_TRUNCATE_LENGTH, endpoint, logger, name, returnClass, sourceTypes`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Constructor Summary
`MessagePropertiesTransformer()`

Method Summary
`Object` | `clone()`
`Map` | `getAddProperties()`
`List` | `getDeleteProperties()`
`Map` | `getRenameProperties()`
`boolean` | `isOverwrite()`
`void` | `setAddProperties(Map addProperties)`
`void` | `setDeleteProperties(List deleteProperties)`
`void` | `setMuleContext(MuleContext context)`
`void` | `setOverwrite(boolean overwrite)`
`void` | `setRenameProperties(Map renameProperties)`
`Object` | `transform(MuleMessage message, String outputEncoding)`

Methods inherited from class org.mule.transformer.AbstractMessageAwareTransformer
`doTransform, isSourceTypeSupported`

Methods inherited from class org.mule.transformer.AbstractTransformer
`checkReturnClass, generateTransformerName, getEncoding, getEndpoint, getName, getReturnClass, getSourceTypes, initialise, isAcceptNull, isConsumed, isIgnoreBadInput, isSourceTypeSupported, registerSourceType, setEndpoint, setIgnoreBadInput, setName, setReturnClass, toString, transform, transform, unregisterSourceType`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MessagePropertiesTransformer

    public MessagePropertiesTransformer()

Method Detail

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

### setMuleContext

    public void setMuleContext(MuleContext context)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`
  Overrides:
    `setMuleContext` in class `AbstractTransformer`

### transform

    public Object transform(MuleMessage message,
                            String outputEncoding)
                     throws TransformerException

  Specified by:
    `transform` in class `AbstractMessageAwareTransformer`
  Throws:
    `TransformerException`

### getDeleteProperties

    public List getDeleteProperties()

### setDeleteProperties

    public void setDeleteProperties(List deleteProperties)

### getAddProperties

    public Map getAddProperties()

### setAddProperties

    public void setAddProperties(Map addProperties)

### getRenameProperties

    public Map getRenameProperties()

  Returns:
    the renameProperties

### setRenameProperties

    public void setRenameProperties(Map renameProperties)

  Parameters:
    `renameProperties` - the renameProperties to set

### isOverwrite

    public boolean isOverwrite()

### setOverwrite

    public void setOverwrite(boolean overwrite)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.