org.apache.synapse.mediators.xquery

## Class XQueryMediator

- java.lang.Object
- - org.apache.synapse.mediators.AbstractMediator
  - - org.apache.synapse.mediators.xquery.XQueryMediator

- All Implemented Interfaces:
    org.apache.synapse.aspects.AspectConfigurable, org.apache.synapse.Mediator, org.apache.synapse.SynapseArtifact

      public class XQueryMediator
      extends org.apache.synapse.mediators.AbstractMediator

  The XQueryMediator provides the means to extract and manipulate data from XML documents using XQuery . It is possible to query against the current SOAP Message or external XML. To query against the current SOAP Message ,it is need to define custom variable with any name and type as element,document,document_element By providing a expression ,It is possible to select a custom node for querying.The all the variable that have defined in the mediator will be available during the query process .Basic variable can use bind basic type. currently only support * string,int,byte,short,double,long,float and boolean * types. Custom Variable can use to bind XML documents ,SOAP payload and any basic type which create through the XPath expression .

- - ### Field Summary

    - ### Fields inherited from class org.apache.synapse.mediators.AbstractMediator

      `log, trace, traceState`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XQueryMediator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAllDataSourceProperties(List<org.apache.synapse.mediators.MediatorProperty> list)`
    `void` | `addAllVariables(List<MediatorVariable> list)`
    `void` | `addVariable(MediatorVariable variable)`
    `List<org.apache.synapse.mediators.MediatorProperty>` | `getProcessorProperties()`
    `org.apache.synapse.mediators.Value` | `getQueryKey()`
    `String` | `getQuerySource()`
    `org.apache.synapse.util.xpath.SynapseXPath` | `getTarget()`
    `List<MediatorVariable>` | `getVariables()`
    `boolean` | `isContentAltering()`
    `boolean` | `isUseDOMSource()`
    `boolean` | `mediate(org.apache.synapse.MessageContext synCtx)` Performs the query and attached the result to the target Node
    `void` | `setQueryKey(org.apache.synapse.mediators.Value queryKey)`
    `void` | `setQuerySource(String querySource)`
    `void` | `setTarget(org.apache.synapse.util.xpath.SynapseXPath source)`
    `void` | `setUseDOMSource(boolean useDOMSource)`

    - ### 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XQueryMediator

          public XQueryMediator()

  - ### Method Detail

    - #### mediate

          public boolean mediate(org.apache.synapse.MessageContext synCtx)

      Performs the query and attached the result to the target Node
      Parameters:
        `synCtx` - The current message
      Returns:
        true always

    - #### getQueryKey

          public org.apache.synapse.mediators.Value getQueryKey()

    - #### setQueryKey

          public void setQueryKey(org.apache.synapse.mediators.Value queryKey)

    - #### getQuerySource

          public String getQuerySource()

    - #### setQuerySource

          public void setQuerySource(String querySource)

    - #### addAllVariables

          public void addAllVariables(List<MediatorVariable> list)

    - #### addVariable

          public void addVariable(MediatorVariable variable)

    - #### getProcessorProperties

          public List<org.apache.synapse.mediators.MediatorProperty> getProcessorProperties()

    - #### getVariables

          public List<MediatorVariable> getVariables()

    - #### getTarget

          public org.apache.synapse.util.xpath.SynapseXPath getTarget()

    - #### setTarget

          public void setTarget(org.apache.synapse.util.xpath.SynapseXPath source)

    - #### addAllDataSourceProperties

          public void addAllDataSourceProperties(List<org.apache.synapse.mediators.MediatorProperty> list)

    - #### isUseDOMSource

          public boolean isUseDOMSource()

    - #### setUseDOMSource

          public void setUseDOMSource(boolean useDOMSource)

    - #### isContentAltering

          public boolean isContentAltering()

      Specified by:
        `isContentAltering` in interface `org.apache.synapse.Mediator`
      Overrides:
        `isContentAltering` in class `org.apache.synapse.mediators.AbstractMediator`

Copyright © 2005–2017 Apache Software Foundation. All rights reserved.