org.mule.transformer.simple
Class ExpressionTransformer
java.lang.Object
org.mule.transformer.AbstractTransformer
org.mule.transformer.AbstractMessageAwareTransformer
org.mule.transformer.simple.ExpressionTransformer
- All Implemented Interfaces:
- Initialisable, NamedObject, BaseTransformer, Transformer
public class ExpressionTransformer
- extends AbstractMessageAwareTransformer
This transformer will evaluate one or more expressions on the current message and return the
results as an Array. If only one expression is defined it will return the object returned from
the expression.
You can use expressions to extract
- headers (single, map or list)
- attachments (single, map or list)
- payload
- xpath
- groovy
- bean
and more.
This transformer provides a very powerful way to pull different bits of information from the
message and pass them to the service.
Methods inherited from class org.mule.transformer.AbstractTransformer |
checkReturnClass, generateTransformerName, getEndpoint, getName, getReturnClass, getSourceTypes, isAcceptNull, isConsumed, isIgnoreBadInput, isSourceTypeSupported, registerSourceType, setEndpoint, setIgnoreBadInput, setName, setReturnClass, toString, transform, unregisterSourceType |
ExpressionTransformer
public ExpressionTransformer()
addArgument
public void addArgument(ExpressionTransformer.Argument argument)
removeArgument
public boolean removeArgument(ExpressionTransformer.Argument argument)
initialise
public void initialise()
throws InitialisationException
- Template method were 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
RecoverableException
- if an error occurs that can be recovered from
transform
public Object transform(MuleMessage message,
String outputEncoding)
throws TransformerException
- Specified by:
transform
in class AbstractMessageAwareTransformer
- Throws:
TransformerException
getArguments
public List getArguments()
setArguments
public void setArguments(List arguments)
isReturnSourceIfNull
public boolean isReturnSourceIfNull()
setReturnSourceIfNull
public void setReturnSourceIfNull(boolean returnSourceIfNull)
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.