org.apache.synapse.mediators.xquery
Class XQueryMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.xquery.XQueryMediator
All Implemented Interfaces:
AspectConfigurable, Mediator, SynapseArtifact

public class XQueryMediator
extends 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
XQueryMediator()
           
 
Method Summary
 void addAllDataSourceProperties(List<MediatorProperty> list)
           
 void addAllVariables(List<MediatorVariable> list)
           
 void addVariable(MediatorVariable variable)
           
 List<MediatorProperty> getDataSourceProperties()
           
 Value getQueryKey()
           
 String getQuerySource()
           
 SynapseXPath getTarget()
           
 List<MediatorVariable> getVariables()
           
 boolean isUseDOMSource()
           
 boolean mediate(MessageContext synCtx)
          Performs the query and attached the result to the target Node
 void setQueryKey(Value queryKey)
           
 void setQuerySource(String querySource)
           
 void setTarget(SynapseXPath source)
           
 void setUseDOMSource(boolean useDOMSource)
           
 
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
 

Constructor Detail

XQueryMediator

public XQueryMediator()
Method Detail

mediate

public boolean mediate(MessageContext synCtx)
Performs the query and attached the result to the target Node

Parameters:
synCtx - The current message
Returns:
true always

getQueryKey

public Value getQueryKey()

setQueryKey

public void setQueryKey(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)

getDataSourceProperties

public List<MediatorProperty> getDataSourceProperties()

getVariables

public List<MediatorVariable> getVariables()

getTarget

public SynapseXPath getTarget()

setTarget

public void setTarget(SynapseXPath source)

addAllDataSourceProperties

public void addAllDataSourceProperties(List<MediatorProperty> list)

isUseDOMSource

public boolean isUseDOMSource()

setUseDOMSource

public void setUseDOMSource(boolean useDOMSource)


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