Class EnrichMediator

  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.elementary.EnrichMediator
All Implemented Interfaces:
AspectConfigurable, Mediator, SynapseArtifact

public class EnrichMediator
extends AbstractMediator

Syntax for EnrichMediator

This mediator will first get an OMElement from the source. Then put it to the current message according to the target element.

Both target and source can specify a type. These are the types supported

custom : xpath expression should be provided to get the xml envelope : the soap envelope body : first child of the soap body property : synapse property

When specifying the source one can clone the xml by setting the clone to true. The default value for clone is false.

When specifying the target one can replace the existing xml. replace is only valid for custom and body types. By default replace is true.

Field Summary
static int BODY
static int CUSTOM
static int ENVELOPE
static int INLINE
static int PROPERTY
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
Constructor Summary
Method Summary
 Source getSource()
 Target getTarget()
 boolean mediate(MessageContext synCtx)
          Invokes the mediator passing the current message for mediation.
 void setSource(Source source)
 void setTarget(Target target)
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, getType, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final int CUSTOM
See Also:
Constant Field Values


public static final int ENVELOPE
See Also:
Constant Field Values


public static final int BODY
See Also:
Constant Field Values


public static final int PROPERTY
See Also:
Constant Field Values


public static final int INLINE
See Also:
Constant Field Values
Constructor Detail


public EnrichMediator()
Method Detail


public boolean mediate(MessageContext synCtx)
Description copied from interface: Mediator
Invokes the mediator passing the current message for mediation. Each mediator performs its mediation action, and returns true if mediation should continue, or false if further mediation should be aborted.

synCtx - the current message for mediation
true if further mediation should continue


public Source getSource()


public Target getTarget()


public void setSource(Source source)


public void setTarget(Target target)

Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.