org.apache.synapse.util.xpath.ext
Class XpathExtensionUtil

java.lang.Object
  extended by org.apache.synapse.util.xpath.ext.XpathExtensionUtil

public class XpathExtensionUtil
extends Object

Utility class to support custom xpath context extensions


Constructor Summary
XpathExtensionUtil()
           
 
Method Summary
static Function getFunctionContext(MessageContext ctxt, String namespaceURI, String prefix, String localName)
          Returns a Function Context extension registered for given QName/namespaceURI+prefix+localName combination
static List<SynapseXpathFunctionContextProvider> getRegisteredFunctionExtensions()
          Get all registered function context extensions.
static List<SynapseXpathVariableResolver> getRegisteredVariableExtensions()
          Get all registered variable context extensions.
static Object resolveVariableContext(MessageContext ctxt, String namespaceURI, String prefix, String localName)
          Returns an object resolved by Variable Context extension registered for given QName/namespaceURI+prefix+localName combination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XpathExtensionUtil

public XpathExtensionUtil()
Method Detail

getRegisteredVariableExtensions

public static List<SynapseXpathVariableResolver> getRegisteredVariableExtensions()
Get all registered variable context extensions. Synapse will look for synapse.properties property synapse.xpath.var.extensions

Returns:
List of Synapse Xpath Variable Context Providers

getRegisteredFunctionExtensions

public static List<SynapseXpathFunctionContextProvider> getRegisteredFunctionExtensions()
Get all registered function context extensions. Synapse will look for synapse.properties property synapse.xpath.func.extensions

Returns:
List of Synapse Xpath Function Context Providers

getFunctionContext

public static Function getFunctionContext(MessageContext ctxt,
                                          String namespaceURI,
                                          String prefix,
                                          String localName)
Returns a Function Context extension registered for given QName/namespaceURI+prefix+localName combination

Parameters:
ctxt - Synapse Message Context
namespaceURI - binding namespace in xpath expression
prefix - binding prefix string in xpath expression
localName - binding localname string in xpath expression
Returns:
jaxen Function object for corresponding extension

resolveVariableContext

public static Object resolveVariableContext(MessageContext ctxt,
                                            String namespaceURI,
                                            String prefix,
                                            String localName)
Returns an object resolved by Variable Context extension registered for given QName/namespaceURI+prefix+localName combination

Parameters:
ctxt - Synapse Message Context
namespaceURI - binding namespace in xpath expression
prefix - binding prefix string in xpath expression
localName - binding localname string in xpath expression
Returns:
Object variable resolved by corresponding extension


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