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

    • 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)
      • isContentAltering

        public boolean isContentAltering()
        Description copied from interface: Mediator
        This is used to indicate whether message payload get modified during mediation
        Specified by:
        isContentAltering in interface Mediator
        Overrides:
        isContentAltering in class AbstractMediator
        Returns:
        whether mediator modify the payload
      • setNativeJsonSupportEnabled

        public void setNativeJsonSupportEnabled​(boolean nativeJsonSupportEnabled)
      • containsInlineExpressions

        public boolean containsInlineExpressions()
      • setContainsInlineExpressions

        public void setContainsInlineExpressions​(boolean containsInlineExpressions)