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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllDataSourceProperties(List<org.apache.synapse.mediators.MediatorProperty> list) voidaddAllVariables(List<MediatorVariable> list) voidaddVariable(MediatorVariable variable) List<org.apache.synapse.mediators.MediatorProperty> org.apache.synapse.mediators.Valueorg.apache.synapse.util.xpath.SynapseXPathbooleanbooleanbooleanmediate(org.apache.synapse.MessageContext synCtx) Performs the query and attached the result to the target NodevoidsetQueryKey(org.apache.synapse.mediators.Value queryKey) voidsetQuerySource(String querySource) voidsetTarget(org.apache.synapse.util.xpath.SynapseXPath source) voidsetUseDOMSource(boolean useDOMSource) Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getArtifactIdentifier, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorId, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportCloseStatisticsWithError, reportOpenStatistics, setArtifactIdentifier, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorId, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
Constructor Details
-
XQueryMediator
public XQueryMediator()
-
-
Method Details
-
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
-
setQuerySource
-
addAllVariables
-
addVariable
-
getProcessorProperties
-
getVariables
-
getTarget
public org.apache.synapse.util.xpath.SynapseXPath getTarget() -
setTarget
public void setTarget(org.apache.synapse.util.xpath.SynapseXPath source) -
addAllDataSourceProperties
-
isUseDOMSource
public boolean isUseDOMSource() -
setUseDOMSource
public void setUseDOMSource(boolean useDOMSource) -
isContentAltering
public boolean isContentAltering()- Specified by:
isContentAlteringin interfaceorg.apache.synapse.Mediator- Overrides:
isContentAlteringin classorg.apache.synapse.mediators.AbstractMediator
-