Class 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 Description
      XQueryMediator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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
    • 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)
      • getProcessorProperties

        public List<org.apache.synapse.mediators.MediatorProperty> getProcessorProperties()
      • 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