org.mule.module.xml.expression
Class AbstractXPathExpressionEvaluator
java.lang.Object
org.mule.module.xml.expression.AbstractXPathExpressionEvaluator
- All Implemented Interfaces:
- MuleContextAware, ExpressionEvaluator, Disposable, Initialisable, NamedObject
- Direct Known Subclasses:
- BeanPayloadExpressionEvaluator, XPathExpressionEvaluator
public abstract class AbstractXPathExpressionEvaluator
- extends Object
- implements ExpressionEvaluator, Initialisable, Disposable, MuleContextAware
Provides a base class for XPath property extractors. The XPath engine used is jaxen (http://jaxen.org) which supports
XPath queries on other object models such as JavaBeans as well as Xml
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractXPathExpressionEvaluator
public AbstractXPathExpressionEvaluator()
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext in interface MuleContextAware
initialise
public void initialise()
throws InitialisationException
- Specified by:
initialise in interface Initialisable
- Throws:
InitialisationException
inject
public void inject()
throws Exception
- Throws:
Exception
evaluate
public Object evaluate(String expression,
MuleMessage message)
-
- Specified by:
evaluate in interface ExpressionEvaluator
getPayloadForXPath
protected Object getPayloadForXPath(MuleMessage message)
throws TransformerException
- Throws:
TransformerException
addNamespaces
protected void addNamespaces(NamespaceManager manager,
org.jaxen.XPath xpath)
getXPath
protected org.jaxen.XPath getXPath(String expression,
Object object)
throws org.jaxen.JaxenException
- Throws:
org.jaxen.JaxenException
getXPathClassName
protected String getXPathClassName(Object object)
createXPath
protected abstract org.jaxen.XPath createXPath(String expression,
Object object)
throws org.jaxen.JaxenException
- Throws:
org.jaxen.JaxenException
extractResultsFromNodes
protected List<?> extractResultsFromNodes(List<?> results)
dispose
public void dispose()
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose in interface Disposable
getNamespaceManager
public NamespaceManager getNamespaceManager()
setNamespaceManager
public void setNamespaceManager(NamespaceManager namespaceManager)
getMuleContext
public MuleContext getMuleContext()
extractResultFromNode
protected abstract Object extractResultFromNode(Object result)
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.