org.apache.synapse.mediators.elementary
Class EnrichMediator

java.lang.Object
  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
EnrichMediator()
           
 
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

CUSTOM

public static final int CUSTOM
See Also:
Constant Field Values

ENVELOPE

public static final int ENVELOPE
See Also:
Constant Field Values

BODY

public static final int BODY
See Also:
Constant Field Values

PROPERTY

public static final int PROPERTY
See Also:
Constant Field Values

INLINE

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

EnrichMediator

public EnrichMediator()
Method Detail

mediate

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.

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

getSource

public Source getSource()

getTarget

public Target getTarget()

setSource

public void setSource(Source source)

setTarget

public void setTarget(Target target)


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