Class EnrichMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- 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
Fields Modifier and Type Field Description static StringACTION_REMOVEstatic intBODYstatic intCUSTOMstatic intENVELOPEstatic intINLINEstatic intKEYstatic intPROPERTY-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description EnrichMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsInlineExpressions()SourcegetSource()TargetgetTarget()booleanisContentAltering()This is used to indicate whether message payload get modified during mediationbooleanmediate(MessageContext synCtx)Invokes the mediator passing the current message for mediation.voidsetContainsInlineExpressions(boolean containsInlineExpressions)voidsetNativeJsonSupportEnabled(boolean nativeJsonSupportEnabled)voidsetSource(Source source)voidsetTarget(Target target)-
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
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
-
KEY
public static final int KEY
- See Also:
- Constant Field Values
-
ACTION_REMOVE
public static final String ACTION_REMOVE
- See Also:
- Constant Field Values
-
-
Method Detail
-
mediate
public boolean mediate(MessageContext synCtx)
Description copied from interface:MediatorInvokes 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)
-
isContentAltering
public boolean isContentAltering()
Description copied from interface:MediatorThis is used to indicate whether message payload get modified during mediation- Specified by:
isContentAlteringin interfaceMediator- Overrides:
isContentAlteringin classAbstractMediator- Returns:
- whether mediator modify the payload
-
setNativeJsonSupportEnabled
public void setNativeJsonSupportEnabled(boolean nativeJsonSupportEnabled)
-
containsInlineExpressions
public boolean containsInlineExpressions()
-
setContainsInlineExpressions
public void setContainsInlineExpressions(boolean containsInlineExpressions)
-
-