Class XpathExtensionUtil


  • public class XpathExtensionUtil
    extends Object
    Utility class to support custom xpath context extensions
    • 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 org.jaxen.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